Re: Upgrading a software RAID

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

 



On Sat May 30, 2009 at 04:03:04PM -0400, Maxime Boissonneault wrote:

>
> Robin Hill a écrit :
>> On Sat May 30, 2009 at 02:11:52PM -0400, Maxime Boissonneault wrote:
>>
>>> Now, GRUB loads (it was on /dev/md0 which is a RAID1 composed of sd*1), 
>>> and it tries to load Ubuntu, but it just won't load.
>>>     
>> How far does it get with booting?  It should boot the kernel but fail to
>> find the root filesystem (if it's an initrd problem anyway).
>>   
> It says :
> Loading, please wait...
> Check root = bootarg cat /proc/cmdline or missing modules, devices : cat 
> /proc/modules ls /dev
> ALERT! /dev/md1 does not exist. Dropping to a shell!
> BusyBox v1.1.3 (Debian 1:1.1.3-5ubuntu12) Built-in shell (ash)
> Enter 'help' for a list of built-in commands.
>
> (initramfs)
>
Okay, that's what I'd expect.

>>> You said that I would have to edit initrd... what is that and what do I 
>>> have to change in it ?
>>>     
>> The initrd is the ramdisk which the kernel boots to first, containing
>> the various modules and utility programs (like mdadm) needed to access
>> the main root filesytem.  A quick search suggests that you need to run
>> 'update-initramfs -u' on Ubuntu.  You'll need to boot off the CD and
>> chroot onto the new array first though - something like:
>>
>>  - Boot off CD
>>  - Assemble the RAID arrays
>>  - Create a mount point for the new array (mkdir /mnt/newroot)
>>  - Mount the root filesystem (mount /dev/md1 /mnt/newroot)
>>  - Mount the proc filesystem (mount -o bind /proc /mnt/newroot/proc)
>>  - Mount the sys filesystem (mount -o bind /sys /mnt/newroot/sys)
>>  - Mount the dev filesystem (mount -o bind /dev /mnt/newroot/dev)
>>  - Chroot to the new array (chroot /mnt/newroot /bin/bash)
>>  - Mount the boot filesystem (mount /boot)
>>  - Update the initramfs (update-initramfs -u)
>>  - Unmount the boot filesystem (umount /boot)
>>  - Exit the chroot (exit)
>>  - Unmount the dev filesystem (umount /mnt/newroot/dev)
>>  - Unmount the sys filesystem (umount /mnt/newroot/sys)
>>  - Unmount the proc filesystem (umount /mnt/newroot/proc)
>>  - Unmount the root filesystem (umount /mnt/newroot)
>>  - Reboot
>>
>> That's just from memory though, so watch out for any warnings/errors.
>> The other issue you _may_ have is the raid5 module missing from the
>> initrd - you'd best check that raid5 is listed in
>> /etc/initramfs/modules.
>
> RAID5 should not be missing, my /home was a RAID5.
Yes, but /home is only mounted after it's accessed the root partition.
It can then read any modules from the root partition, so the raid5
module could still be missing from the initrd.  I suspect it'll have
included it though.

> The alternate CD explicitly allows me to mount with a drive (say
> /dev/md1). Could I just do this and update-initramfs -u, then reboot?
You should be able to, yes.  Worth a try anyway - it's certainly the
easiest option.

> Why would I have to mount all of these filesystems ? The only thing I cared 
> about before was /boot -> /dev/md0, / -> /dev/md1 and /home -> /dev/md2.
>
All these filesystems are standard, so will be taken care of
automatically under normal conditions.  When you're doing a chroot,
you'll need to take care of them manually though (otherwise most
commands will fail to run under the chroot).

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@xxxxxxxxxxxxxxx> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachment: pgpcloFGY3CfZ.pgp
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