Talk:How to hot-swap SATA disks on Linux
From Leo's Notes
This page was last edited on 21 September 2023, at 08:46.
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