Talk:How to hot-swap SATA disks on Linux

From Leo's Notes
Last edited on 22 September 2023, at 00:39.

Thank for your Notes! I have an external USB-C connected Storage and I need in addition doing send a sleep command to the disk before I delete the disk in the system. Without this the disk is not spinning down.

hdparm -Y /dev/sdx                            # the disk is spinning down

echo 1 |sudo tee /sys/block/sdx/device/delete # the disk will not waked up through the system and the disk could safely removed
Hey, thanks for that. I've added that into my notes. Leo (talk)