On Mon, 2007-10-29 at 22:44 +0100, Luca Berra wrote: > On Mon, Oct 29, 2007 at 11:30:53AM -0400, Doug Ledford wrote: > >On Mon, 2007-10-29 at 09:41 +0100, Luca Berra wrote: > > > >> >Remaking the initrd installs the new mdadm.conf file, which would have > >> >then contained the whole disk devices and it's UUID. There in would > >> >have been the problem. > >> yes, i read the patch, i don't like that code, as i don't like most of > >> what has been put in mkinitrd from 5.0 onward. > in case you wonder i am referring to things like > > emit dm create "$1" $UUID $(/sbin/dmsetup table "$1") I make no judgments on the dm setup stuff, I know too little about the dm stack to be qualified. > >> Imho the correct thing here would not have been copying the existing > >> mdadm.conf but generating a safe one from output of mdadm -D (note -D, > >> not -E) > > > >I'm not sure I'd want that. Besides, what makes you say -D is safer > >than -E? > > "mdadm -D /dev/mdX" works on an active md device, so i strongly doubt the information > gathered from there would be stale > while "mdadm -Es" will scan disk devices for md superblock, thus > possibly even finding stale superblocks or leftovers. > I would strongly recommend against blindly doing "mdadm -Es >> > /etc/mdadm.conf" and not supervising the result. Well, I agree that blindly doing mdadm -Esb >> mdadm.conf would be bad, but that's not what mkinitrd is doing, it's using the mdadm.conf that's in place so you can update the mdadm.conf whenever you find it appropriate. And I agree -D has less chance of finding a stale superblock, but it's also true that it has no chance of finding non-stale superblocks on devices that aren't even started. So, as a method of getting all the right information in the event of system failure and rescuecd boot, it leaves something to be desired ;-) In other words, I'd rather use a mode that finds everything and lets me remove the stale than a mode that might miss something. But, that's a matter of personal choice. Considering that we only ever update mdadm.conf automatically during installs, after that the user makes manual mdadm.conf changes themselves, they are free to use whichever they prefer. The one thing I *do* like about mdadm -E above -D is it includes the superblock format in its output. The one thing I don't like, is it almost universally gets the name wrong. What I really want is a brief query format that both gives me the right name (-D) and the superblock format (-E). -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: CFBFF194 http://people.redhat.com/dledford Infiniband specific RPMs available at http://people.redhat.com/dledford/Infiniband
Attachment:
signature.asc
Description: This is a digitally signed message part