deleting SCSI disk and forcing it to start again without hot-plugging
I have two SAS SCSI drives on my machine. Sometimes I want to stop the disk in the system so that the system doesn't know anything about it. I first spin them down (sdparm -C stop /dev/sdb) and then I do:
echo 1 > /sys/block/sdb/device/delete
and then the disk is gone...that's fine...
The problem is, I can't get the disk to come up again by writing 1 to /sys/block/sdb/device/rescan since the entry is also gone from the /sys/block...But when I physically pull the disk and insert it back, SAS driver recognizes it and everything goes back to normal...
Is there any way I can simulate the disk pull without actually having to pull the disk every time I stop the disk? I can't pull the disk everytime since many times I'm away from the system and this is impossible...
Do you issue a umount command for every partition on sdb before you try to simulate the disk pull? A mounted partition might be the flaw in your logic.
I don't think I followed, but yes, everything is unmounted.
|All times are GMT -5. The time now is 03:44 PM.|