How to properly eject / remove hotswappable sata drive?

Emmett Culley emmett at webengineer.com
Mon Oct 10 19:33:11 UTC 2011


On 10/10/2011 12:24 PM, valent.turkovic at gmail.com wrote:
>> You will have to build it from source. What appears to be the primary
>> site is down, but you can find it here:
>> http://fossies.org/linux/misc/scsiadd-1.97.tar.gz/
> 
> Is scsiadd really necessary ?
> 
> I tried using umount then eject but I get this error:
>      eject: device "/dev/sdb" doesn't have a removable or hotpluggable flag
> 
> Aren't all sata drives removable and hotpluggable?

For non raid drives all I ever have to do is umount the drives partitons.  Once that is successful the drive can be removed.  However, if you have smartctl running, it will start to complain until you put the drive back in.  Or you could restart smartctl with the drive removed.

With raid drives I user mdadm to first fail the partitions on the drive to be remove/replaced, if they haven't failed already.  (Use cat /proc/mdstat to see current status of all raid drives.)

Then use mdadm to remove those partitions from the raid drive.  Then the drive can be removed/replaced.

Emmett


More information about the users mailing list