Name

raidhotremove

Synopsis

raidhotremove mddevice memberdevice

raidhotremove removes a failed disk or a spare disk from an array. This is useful, in combination with raidhotadd, for replacing a failed disk with a new, working disk. You could also use raidhotremove to remove a spare disk from an array so that it can be used in another array, which is helpful when only one spare disk is available on a system with multiple arrays. In that case, you could use raidhotremove to pull the spare disk from a fully functional array and insert it into an array to make up for a failed disk.

There might be some instances when a disk is generating errors at the bus level, but hasn’t been marked as failed by the md driver. In that case, first use raidsetfaulty to fail the drive manually, then use raidhotremove to pull it out of the array.

Options

raidhotremove has no command-line options. It takes an md device and a member disk as its only arguments.

Example usage

The following removes /dev/sdc1 from the array /dev/md0:

# raidhotremove /dev/md0 /dev/sdc1

Tip

raidhotremove and raidhotadd are merely software interfaces to the Linux kernel. They operate independently of any hardware connected to the system. Using these commands does not mean you can safely disconnect and reconnect drives from a powered-on system. Doing this with hardware that does not support hot-swap could result in a complete, unrecoverable system failure. For more information on hot-swap, consult the Hot-Swap and Single connector attachment ...

Get Managing RAID on Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.