Name

raidsetfaulty

Synopsis

raidsetfaulty mddevice memberdevice

Use raidsetfaulty to mark a member disk as failed. For example, if you suspect there are problems with a disk, but the md driver hasn’t yet kicked it out of the array, you can use raidsetfaulty to fail the disk manually. Once a disk is failed, you can use raidhotremove to pull it out of the array.

Options

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

Example usage

The following marks /dev/sdd1, a member of /dev/md0, as failed:

# raidsetfaulty /dev/md0 /dev/sdd1

Once raidsetfaulty is executed, /proc/mdstat will show that the disk has failed. If a spare disk is available, recovery will automatically begin:

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
read_ahead 1024 sectors
md0 : active raid1 sdb1[2] sdd1[0](F) sdf1[1]
      17920384 blocks [2/1] [_U]
      [>....................]  recovery =  4.2% (764480/17920384)
finish=10.4min speed=27302K/sec
unused devices: <none>

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.