[mythtv-users] OT: follies with RAID

Nick F nikos.f at gmail.com
Mon Feb 9 16:53:11 UTC 2009

On Mon, Feb 9, 2009 at 9:44 AM, Yan Seiner <yan at seiner.com> wrote:

>  Martin Bene wrote:
>> Should be fairly easy: remove sdd from the raid array, partition it, add
>> /dev/sdd1 to the array.
>> cat /proc/mdstat
>> ==> Check that the array is fully operable, i.e that there are no failed
>> drives/partitions (if output is the same as  in your mail, it's OK)
>> mdadm --fail /dev/md10 /dev/sdd
>> ==> device /dev/sdd is marked as failed in the raid array
>> mdadm --remove /dev/md10 /dev/sdd
>> ==> device /dev/sdd is completely removed from the array
>> sfdisk -d /dev/sdg | sfdisk /dev/sdd
>> ==> repartition sdd just like sdg - if you don't have sfdisk on your
>> system, just partition the drive manually using fdisk
>> mdadm --add /dev/md10 /dev/sdd1
>> ==> Add partitioned device back into array. This will cause a resync of
>> /dev/sdd1.
>> Your memory is very good.... Worked like a charm.  I'm always skittish
> about messing with raid; I don't do it enough to have a lot of confidence in
> my own knowledge.
I made the same mistake when setting up my RAID5 - ended up with one drive
directly there, instead of as a partition.  Using similar mdadm commands I
fixed it - but noticed that there is still some RAID superblock on the
equivalent of my sdd.  So - when I reinstalled everything from scratch on my
server (as part of upgrading to Fedora 10), there was an error in my
mdadm.conf - and the array was picking up the block from sdd, rather than
sdd1 - and failing on assembly.  Took me ages to figure out what was wrong -
but fixing it in mdadm.conf worked.  I never did figure out how to scratch
all residues of the RAID array that was on sdd.

I am amazed at how good a piece of work mdadm is, and how it can survive
even an idiot like me hacking away trying to fix things, without losing any
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090209/138dc380/attachment.htm>

More information about the mythtv-users mailing list