Re: Rebuilding a RAID5 array after drive (hardware) failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 26 May 2014 21:57:15 +0200 George Duffield
<forumscollective@xxxxxxxxx> wrote:

> >> - Can it be renamed to md0?
> >
> > Sure.
> > If this is being assembled by the initrd, then either the initrd must set the
> > hostname to "fileserver" before mdadm gets to assemble the array, or the
> > initrd must contain an /etc/mdadm.conf which lists "/dev/md0" has having the
> > UUID of this array.
> >
> > NeilBrown
> >
> 
> I'm learning a few things the hard way here e.g. I had saved my
> mdadm.conf to a file in the home folder of the default user so I could
> reference it later if needs be - no flash, no file.  Next time email
> it to myself.
> 
> If I were to run sudo update-initramfs -u would that restore things or
> pretty much make md127 permanent.

I can't see.  Each distro has their own 'initramfs' building code.
What I would probably do is:
  - run update-initramfs
    mkdir /tmp/i; cd /tmp/i; zcat /boot/initramfs | cpio -idv
      # note, filename might be wrong
  - inspect /tmp/i/etc/mdadm.conf and  fstab etc etc and make sure
    "/dev/md0" is used and "/dev/md127" isn't. 
  - make changes as necessary
  - find | cpio -oc | gzip --best > /boot/initramfs.test

then figure a way to boot from /boot/initramfs.test

> 
> In the event update-initramfs -u is not the way to go, it there an
> example of a good mdadm.conf floating about that I can reference to
> make the necessary changes?

It is really worth making the effort to read the man page and understand how
to make your own /etc/mdadm.conf

   mdadm -Ds

is a good start, but should be examined and edited to make sure it matches
your requirements.

All you really need is:

    ARRAY /dev/md0 UUID=whatever:xxxxxxx......

That is it.

NeilBrown


Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux