Thread (8 messages) 8 messages, 3 authors, 2014-05-26

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

From: NeilBrown <hidden>
Date: 2014-05-26 23:03:23

On Mon, 26 May 2014 21:57:15 +0200 George Duffield
[off-list ref] wrote:
quoted
quoted
- 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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help