Safely remove SATA disk from a running Linux system

Stop using the disk for anything. Then unmounted any file systems on the disk.

sudo umount ...

Deactivate any LVM groups.

sudo vgchange -an

Prevent disk damage with stop system using disk.

echo 1 | sudo tee /sys/block/{disk}/device/delete

Once you’ve done that, it should be safe to unplug SATA disk from running system.


Kawin Viriyaprasopsook

System administrator at Zercle Technology Co., Ltd.
System admin กากๆ
ชอบดู Anime ญี่ปุ่น

Leave a Reply