Skip to contentSkip to conversation

Manually fail a disk?

DISCUSSION Robert L. Harris 2 participants 3 messages Jan 19, 2003 MD RAID

lore
Share & tools
lore
#0 lore raw

I've got a disk that's starting to fail hard. It's generating alot of
errors in dmesg and /var/log/messages. If the raid disk gets any usage it'll lock up the box it's spewing errors so fast. I can't get out to physically yank the disk until Tues but need it off-lined now. Is there a way to tell mdtools (version 0.42-33) to mark a disk faulty and not use it?

Robert

:wq!
---------------------------------------------------------------------------
Robert L. Harris | PGP Key ID: FC96D405

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'

#1 lore raw
Quoted 6 lines

I've got a disk that's starting to fail hard. It's generating alot of
errors in dmesg and /var/log/messages. If the raid disk gets any usage it'll lock up the box it's spewing errors so fast. I can't get out to physically yank the disk until Tues but need it off-lined now. Is there a way to tell mdtools (version 0.42-33) to mark a disk faulty and not use it?

I'll assume this is a RAID-1 or RAID-5 and that you're not trying this on a non-redundant array...

# mdadm /dev/md0 --fail /dev/sda1
# mdadm /dev/md0 --remove /dev/sda1

The first command fails /dev/sda1 (a member of /dev/md0) and the second command removes it from /dev/md0.

If you are using raidtools try:

# raidsetfaulty /dev/md0 /dev/sda1
# raidhotremove /dev/md0 /dev/sda1

--
Derek Vadala, [email protected], http://www.cynicism.com/~derek

#2 lore raw

raidsetsetfaulty gave back an error (scrolled off the screen and the machine has since seized up. raidhotremove pretty much hung up trying to get disk access. I was hoping I could tell the kernel or the md driver to mark it bad and take it out of the array.

Thus spake Derek Vadala ([email protected]):

Quoted 22 lines
Quoted 6 lines

I've got a disk that's starting to fail hard. It's generating alot of
errors in dmesg and /var/log/messages. If the raid disk gets any usage it'll lock up the box it's spewing errors so fast. I can't get out to physically yank the disk until Tues but need it off-lined now. Is there a way to tell mdtools (version 0.42-33) to mark a disk faulty and not use it?

I'll assume this is a RAID-1 or RAID-5 and that you're not trying this on a non-redundant array...

# mdadm /dev/md0 --fail /dev/sda1
# mdadm /dev/md0 --remove /dev/sda1

The first command fails /dev/sda1 (a member of /dev/md0) and the second command removes it from /dev/md0.

If you are using raidtools try:

# raidsetfaulty /dev/md0 /dev/sda1
# raidhotremove /dev/md0 /dev/sda1
Quoted 7 lines

--
Derek Vadala, [email protected], http://www.cynicism.com/~derek

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

:wq!
---------------------------------------------------------------------------
Robert L. Harris | PGP Key ID: FC96D405

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'