Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a software RAID 10 array which I recently noticed went into a degraded state. The OS is CentOS 5.8.

It has 4x 500GB drives in 3 different arrays:
/dev/md0 is RAID 1 and mounted to /boot (200MB ext3)
/dev/md1 is RAID 10 and is swap (4GB swap)
/dev/md2 is RAID 10 and is the main system and data device (895GB ext3)

One of the drives has failed but only /dev/md2 (main system and data array) is degraded.
Here's the full mdadm and /proc/mdstat output... http://pastebin.com/VL0uYdU9

The problem seems to be failed sectors on one of the drives...

Dec  9 04:25:37 hostname smartd[3199]: Device: /dev/sdb, 1 Currently unreadable (pending) sectors
Dec  9 04:25:37 hostname smartd[3199]: Device: /dev/sdb, 1 Offline uncorrectable sectors

Replacing the drive ASAP is the ideal option. However I won't have physical access to the server for the next few weeks. I have backups going to another device on the network anyway so we should be covered if another drive goes (the mirror of the already failed drive).

Is there a way I can resize the file system of /dev/md2 down to under 500GB, so I can then migrate the degraded RAID 10 to a 3 drive RAID 1 array?
And can this be attempted online (full, verified, backups being made of course)?
I don't have access to the server for loading a recovery CD.

share|improve this question
add comment

1 Answer

The linux software RAID 10 does not support any form of reshaping. Your only option to change it is, backup, to take it offline, build a new volume, and restore your data.

share|improve this answer
    
Is there a way to remove another drive from the RAID 10 array, leaving only 2 drives. Removing the correct drive so the system/data is still intact. Then re-partition/re-format that drive as a solo drive and image the system and data across. Set it as the boot drive and restart. Then take the 2 remaining drives in the RAID 10, delete that array and build into a RAID 1 mirror, copy the data back over to that, set it as the boot array. Reboot. Then add that 3rd solo drive as the 3rd drive in the RAID 1 mirror? –  benbradley Jan 15 '13 at 19:40
    
I guess, that might be theoretically possible, maybe, but I would never try it. If you are really interested in trying that, then I would suggest you create a virtual machine that mimics your production environment exactly, and then see if you can make it work. –  Zoredache Jan 15 '13 at 19:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.