Results 1 to 2 of 2
Hi, Is there a proper command that I should be running before unplugging a SATA hard drive from my motherboard's SATA port? Assuming my motherboard supports SATA hot-swapping of course, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-26-2009 #1
- Join Date
- Apr 2008
Properly removing SATA hard drives(hot-swap)
Is there a proper command that I should be running before unplugging a SATA hard drive from my motherboard's SATA port? Assuming my motherboard supports SATA hot-swapping of course, and that the drive has already been unmounted(or never mounted in the first place)
I notice that when I just unplug the drive and run "fdisk -l", it will hang there for 10-20s before completing. This seems to indicate that there's a duration where the PC is trying to detect the drive but it isn't there, then it times out.
So, is there a way for me to let the OS/PC know right before I unplug, that it should switch off the HDD and remove it from its list of detected devices?
I'm using Mandriva 2009 btw.
- 08-27-2009 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Since you indicate that you have unmounted the drive, and then unplugged it (detached the sata/esata cable), then look in /dev for the drive id (sda, sdb, ...). If it is gone, then fdisk -l should not "hang". Sometimes it takes a minute for the system to recognize that it is gone. I also recommend that you do a sync command before unmounting the drive, just to be sure that all the cached data has been flushed to the drive. The umount command should do this, but it's better safe than having a corrupted drive.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!