How to hot-swap SATA disks on Linux

From Leo's Notes
Revision as of 01:23, 17 January 2016 by Leo (talk | contribs)
This page was last edited on 17 January 2016, at 01:23.

To remove a SATA on a live Linux system:

  1. Ensure the disk is unmounted.
  2. Ensure the disk isn't used by swap or LVM groups.
  3. Power down the disk by running echo 1 > /sys/block/sdX/device/delete.