вторник, 2 апреля 2013 г.

Аналог wget в Power Shell (полезняшка для Server Core)

Если требуется закачать из сети какой-нибудь файлец, то в NIX мире обычно юзают утилиту wget, для аналогичного функционала в MS Windows Sever Core служит такое:
Import-Module bitstransfer
start-bitstransfer -source http://something -destination c:\something
 
 
Upd (2017.05.04)
В PS 3.0 есть еще такой вариант:
Invoke-WebRequest https://live.sysinternals.com/accesschk64.exe -OutFile accesschk64.exe
если без сохранения (-outfile), то выполнится простой веб запрос:

Invoke-WebRequest https://live.sysinternals.com/accesschk64.exe


StatusCode        : 200
StatusDescription : OK
Content           : {77, 90, 144, 0...}
RawContent        : HTTP/1.1 200 OK
                    Accept-Ranges: bytes
                    Content-Length: 402608
                    Content-Type: application/octet-stream
                    Date: Thu, 04 May 2017 08:31:07 GMT
                    ETag: "76fb3d31c988d21:0"
                    Last-Modified: Fri, 17 Feb 2017 0...
Headers           : {[Accept-Ranges, bytes], [Content-Length, 402608], [Content-Type, application/octet-stream], [Date,
                     Thu, 04 May 2017 08:31:07 GMT]...}
RawContentLength  : 402608

четверг, 7 марта 2013 г.

Типы портов FC

Взято отсюда: http://searchvirtualstorage.techtarget.com/definition/Fibre-Channel-port-names

A Fibre Channel (FC) port is a hardware pathway into and out of a node that performs data communications over an FC link. (An FC link is sometimes called an FC channel.)
Port
Full Name Port Function
N-port network port or node port Node port used to connect a node to a Fibre Channel switch
F-port fabric port Switch port used to connect the Fibre Channel fabric to a node
L-port loop port Node port used to connect a node to a Fibre Channel loop
NL-port network + loop port Node port which connects to both loops and switches
FL-port fabric + loop port Switch port which connects to both loops and switches
E-port extender port Used to cascade Fibre Channel switches together
G-port general port General purpose port which can be configured to emulate other port types
EX_port external port Connection between a fibre channel router and a fibre channel switch; on the switch side, it looks like a normal E_port -- but on the router side, it is a EX_port
TE_port trunking E-port Povides standard E_port functions and allows for routing of multiple virtual SANs by modifying the standard Fibre Channel frame upon ingress/egress of the VSAN environment

"Очистка" FC коммутаторов Brocade

В мемориззз, чтобы подключенный свичик не накидал в фабрику левых зон и алиасов, выполняем (на новых свичах тоже!!!):
Заходим под root'ом,
# switchdisable
# cfgdisable
# cfgclear
проверяем, что все удалено и! сохраняем конфиг:
#cfgsave
# passwddefault
# portstatsclear
# portlogclear
# reboot
# configure (с настройкой фабрики! Заранее определяем свободный domain ID в фабрике)

вторник, 5 марта 2013 г.

Наименования и продакт-коды Hitachi mid-range СХД

В меморизз, как соответствуют железяки, наименования и коды:
Hitachi mid-range array model numbers:
  • DF700s – WMS100/AMS200/AMS500/AMS1000
  • DF800 – AMS2100/AMS2300/AMS2500
  • DF850 – HUS110/HUS130/HUS150

четверг, 28 февраля 2013 г.

VMWare ошибка при создании datastore "HostDatastoreSystem.QueryVmfsDatastoreCreateOptions"

Достаточно хорошо освященная тема про неумение VMWare работать с размеченными GPT разделами.
Неплохо освещено здесь: http://www.vexperienced.co.uk/2012/01/02/error-adding-datastores-to-esxi-resolved-using-partedutil/

~ # fdisk -l
***
*** The fdisk command is deprecated: fdisk does not handle GPT partitions.  Please use partedUtil
***
Disk /dev/disks/t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

                                                                                Device Boot      Start         End      Blocks  Id System
/dev/disks/t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7p1   *           1       18937   152108032  83 Linux
/dev/disks/t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7p2           18937       19458     4179969   5 Extended
/dev/disks/t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7p5           18937       19458     4179968  82 Linux swap
Found valid GPT with protective MBR; using GPT

Disk /dev/disks/mpx.vmhba32:C0:T0:L0: 3915776 sectors, 3824K
Logical sector size: 512
Disk identifier (GUID): d53758d8-1fc0-4e83-8292-9cbf38a539fb
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3915742

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            8191        8128   0700
   5            8224          520191        499K   0700
   6          520224         1032191        499K   0700
   7         1032224         1257471        219K   0700
   8         1257504         1843199        571K   0700
Рекомендуют вместо классического fdisk'а пользоваться partedUtil

~ # partedUtil
Not enough arguments

Usage:
 Get Partitions : get <diskName>
 Set Partitions : set <diskName> ["partNum startSector endSector type attr"]*
 Delete Partition : delete <diskName> <partNum>
 Resize Partition : resize <diskName> <partNum> <start> <end>
 Get Partitions : getptbl <diskName>
 Set Partitions : setptbl <diskName> <label> ["partNum startSector endSector type/guid attr"]*
 Fix Partition Table : fix <diskName>
 Create New Label (all existing data will be lost): mklabel <diskName> <label>
 Show commonly used partition type guids : showGuids
 Get usable first and last sectors : getUsableSectors <diskName>
 Fix GPT Table interactively : fixGpt <diskName>
---

~ # ls /dev/disks
mpx.vmhba32:C0:T0:L0
mpx.vmhba32:C0:T0:L0:1
mpx.vmhba32:C0:T0:L0:5
mpx.vmhba32:C0:T0:L0:6
mpx.vmhba32:C0:T0:L0:7
mpx.vmhba32:C0:T0:L0:8
t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7
t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7:1
t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7:2
t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7:5
vml.0000000000766d68626133323a303a30
vml.0000000000766d68626133323a303a30:1
vml.0000000000766d68626133323a303a30:5
vml.0000000000766d68626133323a303a30:6
vml.0000000000766d68626133323a303a30:7
vml.0000000000766d68626133323a303a30:8
vml.01000000002020202020202020202020205731393033304a3753543136304c
vml.01000000002020202020202020202020205731393033304a3753543136304c:1
vml.01000000002020202020202020202020205731393033304a3753543136304c:2
vml.01000000002020202020202020202020205731393033304a3753543136304c:5
-



Диски с :# как раз и есть GPT подразделы, которые нужно "прибить", при этом, vml.*** - это ссылки, их трогать не нужно.
В моем случае командой вида partedUtil mklabel /dev/disks/<disk id> msdos нужно было переразметить только диск вида t10.***
---
~ # partedUtil mklabel /dev/disks/t10.ATA_____ST160LT0152D1AE141________________
___________________W19030J7 msdos
~ # ls /dev/disks
mpx.vmhba32:C0:T0:L0
mpx.vmhba32:C0:T0:L0:1
mpx.vmhba32:C0:T0:L0:5
mpx.vmhba32:C0:T0:L0:6
mpx.vmhba32:C0:T0:L0:7
mpx.vmhba32:C0:T0:L0:8
t10.ATA_____ST160LT0152D1AE141___________________________________W19030J7
vml.0000000000766d68626133323a303a30
vml.0000000000766d68626133323a303a30:1
vml.0000000000766d68626133323a303a30:5
vml.0000000000766d68626133323a303a30:6
vml.0000000000766d68626133323a303a30:7
vml.0000000000766d68626133323a303a30:8
vml.01000000002020202020202020202020205731393033304a3753543136304c

Подразделы удалены, теперь диск можно использовать под datastore.

четверг, 31 января 2013 г.

Драйвер USB2COM (RS-232) для китайского адаптера под Windows 7 x64

При установке китайского девайса он определился как Prolific USB-to-Serial Comm Port, сел на интерфейс COM3, но с ошибкой с кодом 10 (невозможно включить).
Идентификаторы оборудования:
USB\VID_067B&PID_2303&REV_0300
USB\VID_067B&PID_2303
Заюзал дрова для Vista (https://docs.google.com/file/d/0BzRb45v17bnWQkRkWnBTVjFPTDA/edit?usp=sharing), заново опросил оборудование, в результате девайс перелез на COM4 и заработал.
На всякий случай хеш архива - 5a2e3f4700cd470659400bc96ac681ef
Там также еще дрова под MAC/Linux

Upd:
На Гугле требуется еще добавлять какие-то разрешения, залил на 4Shared:
http://www.4shared.com/zip/1k9rCmReba/PL-2303-ProlificRS232-work.html

среда, 30 января 2013 г.

Переход в режим обслуживания (Maintenence Mode) на Hitachi AMS/HUS

В мемориззз...
в основном взято отсюда: http://fcoe.ru/english/setup-examples/31-hitachi
...
Change the Operation Mode from the Normal Mode to the Maintenance Mode.
Check that the “mode” file exists in the following directory:\HiCommand\StorageNavigatorModular\conf.
If there is no mode file, create a mode file (without extension) and write the following letters in one line "StorageNavigatorModular". However, do not insert line feeds.
Store the created mode file in the following place:\HiCommand\StorageNavigatorModular\conf.
Put a checkmark in the array subsystem to operate on the main window, and press the [Ctrl] key, [Shift] key and the [E] key at the same time.
...
То есть создаем файл mode в директории установки HSNM (по-умолчанию, это С:\Program Files\HiCommand\StorageNavigatorModular\conf), внутри этого текстового файла без расширения!!! должно быть в одно слово с учетом регистра
StorageNavigatorModular
в результате при нажатии комбинации клавиш Ctrl+Shift+e в зависимости от системы (AMS или HUS), будет либо дополнительное меню в самом низу экрана настройки СХД, либо появится всплывающее окно (разрешить в IE), также с названием Maintenance.

И вдогонку, явки, пароли:
maintenance
hosyu9500

Некоторые интересные разделы
/encmicro
/drvfirm
/lun_opt
/drvfirm_on
/sslc_init
например,
http://192.168.0.16/normal/ssi/dop_index.htm
http://192.168.0.16/normal/ssi/lunsq_inf.htm