Friday, June 1, 2012

Linux: Manage SCSI device w/o reboot system

To remove "dead" scsi-devices, type
echo 1> /sys/block/sdX/device/delete
where sdX the dead device is. Be careful, don't remove devices you are currently using! To rescan for (new) scsi-devices type
echo "- - -" > /sys/class/scsi_host/hostX/scan
where X is the host adapter id. (Should be 0) If the Volumesize was changed, then following command re-reads the volume size:
echo 1 > /sys/block/sdc/device/rescan
(tested with custom linux-2.6.20-xen-r7)

No comments:

Post a Comment