使用 Linux 在 SAN 的儲存架構下
更多文章:
#> lsscsi [2:0:0:0] cd/dvd hp DVD-ROM DTA0N WBD0 /dev/sr0 state=running queue_depth=1 scsi_level=6 type=5 device_blocked=0 timeout=0 [3:0:0:0] tape IBM ULT3580-HH5 D2AD /dev/st0 state=running queue_depth=32 scsi_level=7 type=1 device_blocked=0 timeout=900 [3:0:1:0] tape IBM ULT3580-HH5 D2AD /dev/st1 state=running queue_depth=32 scsi_level=7 type=1 device_blocked=0 timeout=900 [3:0:1:1] mediumx IBM 3573-TL C.20 - state=running queue_depth=32 scsi_level=6 type=8 device_blocked=0 timeout=0 [3:0:2:0] disk IBM 1726-4xx FAStT 0617 /dev/sda <====== state=running queue_depth=32 scsi_level=6 type=0 device_blocked=0 timeout=60 [3:0:2:31] disk IBM Universal Xport 0617 - state=running queue_depth=32 scsi_level=6 type=0 device_blocked=0 timeout=60
TIPs:
IBM FAStT 是 IBM Storage 產品識別
如果沒有 lsscsi 指令,執行 yum install lsscsi
方法一: 用 systool
安裝:yum install sysfsutils
#> systool -c fc_host -v 或 #> systool -c fc_transport -v
方法二:
/sys/class/fc_host/{host#}/port_name
#> cat /sys/class/fc_host/host5/port_name 0x2100001b32837bcd
方法三:
/proc/scsi/{adapter-type}/{host#}
#> cat /proc/scsi/qla2xxx/2 SCSI Device Information: scsi-qla0-adapter-node=5001438004253c81; scsi-qla0-adapter-port=5001438004253c80; <---- WWN scsi-qla0-target-0=50001fe1500e28fd; scsi-qla0-target-1=50001fe1500e28f9; scsi-qla0-target-2=500a09829140a66c;
如果有啟用 multipath,所有 LUN 的裝置路徑為 /dev/mapper/mpathX,不過當使用 pvcreate 將 LUN 新增為 PV 後,執行 pvdisplay -C ,此時的裝置名稱會改為 /dev/dm-X,那爾後作系統維護時,要如何查詢 mpathX 對應哪個 dm-X?
方法一:
[root@bdb3 ~]# dmsetup ls mpath1 (253, 4) rootVG-varLV (253, 1) rootVG-swapLV (253, 3) rootVG-rootLV (253, 0) rootVG-worktmpLV (253, 2)
TIPs:
mpath1 (253,4),4 就是指裝置 /dev/dm-4
方法二:
[root@cdb3-b ~]# multipath -ll mpath1 (360a98000383035537824474d3936556a) dm-4 NETAPP,LUN <====== 這裡 [size=700G][features=3 queue_if_no_path pg_init_retries 50][hwhandler=0][rw] \_ round-robin 0 [prio=4][active] \_ 1:0:1:0 sdb 8:16 [active][ready] \_ 2:0:1:0 sdd 8:48 [active][ready] \_ round-robin 0 [prio=1][enabled] \_ 1:0:0:0 sda 8:0 [active][ready] \_ 2:0:0:0 sdc 8:32 [active][ready]
出現警告訊息:
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
不重開機要能立即使用,可以再切完 partition 後,執行
partprobe /dev/mapper/mpathb
Images 0 | ||
---|---|---|
No images to display in the gallery. |