Pages

Monday, June 27, 2011

Additional SCSI commands for multipath

Some additional commands for multipath and SCSI devices:

To remove a single SCSI device from the partition table:

# echo "scsi remove-single-device 2 0 0 2" > /proc/scsi/scsi

assuming the SCSI ID is 2:0:0:2 which you can obtain from the output of multipath -ll or cat /proc/scsi/scsi among other places, note that the values reference:

HOST:CHANNEL:ID:LUN

To add it back simply change the remove to add in the command above.

You can also rescan the SCSI device, via:

# echo 1 > /sys/class/scsi_device/2\:0\:0\:2/device/rescan

Most of these however will not rescan the multipath daemon to "see" the new sizes. These were among various "options" I saw online, all of which won't really work, but I present here just for reference.

No comments: