LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   deleting SCSI disk and forcing it to start again without hot-plugging (https://www.linuxquestions.org/questions/linux-newbie-8/deleting-scsi-disk-and-forcing-it-to-start-again-without-hot-plugging-703963/)

alirezan1 02-11-2009 02:53 PM

deleting SCSI disk and forcing it to start again without hot-plugging
 
Hello,

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...

Thanks

jailbait 02-11-2009 03:29 PM

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.

----------------
Steve Stites

alirezan1 02-11-2009 03:49 PM

Quote:

Originally Posted by jailbait (Post 3440152)
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.

----------------
Steve Stites

Hello

I don't think I followed, but yes, everything is unmounted.


All times are GMT -5. The time now is 01:08 AM.