setup-storage for raid5 + lvm

Holger Parplies wfai at parplies.de
Thu Apr 30 11:41:05 CEST 2009


Hi,

Nicolas Courtel wrote on 2009-04-30 11:11:46 +0200 [Re: setup-storage for raid5 + lvm]:
> 
> >># mdadm --zero-superblock /dev/sda2
> >># /lib/udev/vol_id -u /dev/sda2
> >>6428a2d1-c30d-4916-ab6b-625117989651
> >>[...]
> >
> >Ok, good to know, thanks for testing this. I wonder whether we should do
> >something about this in setup-storage, but I believe that doing mdadm
> >--zero-superblock on each and every non-RAID device is pure overkill.
>
> I agree.  You may want to add a few words in the error message, 
> something like "Failed to obtain UUID [...], check that $device_name is 
> not or has not been a RAID partition".

sorry, I'm not familiar with the code in question, so I don't know if it's
actually possible, but ideally, detecting this failure would trigger possible
remedies to the problem (eg. zeroing the RAID superblock - unless this is
potentially harmful for reasons not obvious to me right now) and then re-try.
I can imagine that this might not be as simple to implement as it sounds.

As an alternative, there could be a "pedantic mode" (triggered by some flag)
which actually does zero each potential superblock (again, unless there is
some reason this might be undesirable). Then, if you hit trouble with a
particular installation, you could simply turn on this flag and see if it
solves your problem without needing to go into any extensive debugging. Having
something that "just works" even in awkward circumstances without manual
intervention does not seem like a bad idea, does it? Thinking about the
complexity of a modern Linux system, though, I tend to agree that something
like that should be turned off by default ;-).

Regards,
Holger


More information about the linux-fai mailing list