Linux Related SCSI Command
As a result of storage capacity in the previous period, more storage operations, the following records the commonly used operations;
LSSCSI command: Display SCSI Device Information
#lsscsi
[0:0:0:2] Disk IBM 1726-4xx FAStT 0617/dev/sdb
[0:0:0:3] Disk IBM 1726-4xx FAStT 0617/DEV/SDC
[0:0:0:4] Disk IBM 1726-4xx FAStT 0617/DEV/SDD
[0:0:0:5] Disk IBM 1726-4xx FAStT 0617/dev/sde
Explanation: [H (HBA): C (Hba_channel): T (target): L (LUN ID)]
scsi_id command: Querying SCSI Device ID number;
#scsi_id –G–U–S/DEV/SDA
3600a0b80000b174b000000d63efc5c8c
Or
#/lib/udev/scsi_id--page=0x83--whitelisted--DEVICE=/DEV/SDA
3600a0b80000b174b000000d63efc5c8c
HBA wwwn:cat/sys/class/fc_host/host*/node_name
DISK wwwn:ls-l/dev/disk/by_id|grep-v part
Manually Delete path :
First Offlne
echo Offline >/sys/block/device-name/device/state
Then remove
Echo 1 >/sys/block/device-name/device/delete
Manually add path :
echo "c t L" >/sys/class/scsi_host/hostn/scan
echo "scsi Add-single-device 0 0 0 0" >/PROC/SCSI/SCSI
Linux-related SCSI commands