Convert a single drive system to RAID



Hi all!
I'm trying to convert a running installation of a Ubuntu server 7.10 AMD64 running on a single drive to a RAID 1 system, but I'm stuck at the boot with a BusyBox shell.

The machine has two identical SATA drives, the system is at the moment installed on partition /dev/sda1 (/dev/sda2 being the swap partition).
These are the steps I did until now:

1. made a backup of the system on an external drive
2. cfdisk /dev/sdb to have exactly the same partitions of /dev/sda
3. created md0 device node (mknod /dev/md0 b 9 0)
4. installed mdadm
5. created raid device:

mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb1

6. checked /proc/mdstat (it's ok)
7. created filesystem on /dev/md0
8. mounted /dev/md0 on /mnt/md0 and copied data from /dev/sda1 (/) to /dev/md0 (/mnt/md0/) via rsync excluding content of /sys, /proc, /dev, /mnt
9. edited grub menu in /mnt/md0:
modified menu.lst just in "root" argument with "root=/dev/md0"
10. edited /etc/fstab in /mnt/md0 specifying that root has to be mounted from /dev/md0
11. chrooted to /mnt/md0
12. updated ramdisk with update-initramfs
13. installed grub on the new raid disk:

root (hd1,0)
setup (hd1)

All went ok
14. rebooted and changed BIOS setting to start from the new disk


At that point, grub starts, but after about 1 minute I get an error and then a BusyBox shell.
This is the error:

Check root= bootarg cat /proc/cmdline
or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/md0 does not exist. Dropping to a shell!

If I check with "cat /proc/cmdline" I get the following:

root=/dev/md0 ro quiet splash

which looks to be correct
List of modules shows that raid modules and md_mod are present.
Command mdadm is present
If I give the command:

mdadm --assemble /dev/md0

I get the following:

mdadm: CREATE user root not found
mdadm: CREATE group disk not found
mdadm: /dev/md0 not identified in config file.

"ls -l /dev/md0" shows that device md0 is present (or at least, it seems):

brw-rw---- 1 0 0 9, 0 /dev/md0

Any help or suggestion would be greatly appreciated.

Fortunately I still get a fully working system if I boot from the first hard drive.
.



Relevant Pages

  • Re: Problem with software-raid/lvm after reinstallation (2.6)
    ... my old installation, and I had a bit of problems. ... installed and restore from the backups you made prior to the reinstall. ... have incompatibilities between Sid and Etch: md raid, lvm, ext. ... If the drives have S.M.A.R.T. ...
    (Debian-User)
  • RE: SATA RAID Array and Windows reload
    ... I'm not trying to load Windows onto my RAID array, ... RAID array for data. ... I did install the nVidia drivers from Windows after installation. ... > 1st,you must remove all drives except the RAID set and cdrom during ...
    (microsoft.public.windowsxp.hardware)
  • HELP Recover software RAID5...
    ... I am hoping some brilliant sysadm can help me recover my software raid 5. ... Over Time as the media drive was filled up, I add additional drives to the ... mdadm: /dev/sdh1 requires wrong number of drives. ... mdadm: /dev/sdh has wrong uuid. ...
    (comp.os.linux.misc)
  • Re: SATA RAID Array and Windows reload
    ... able to assign a drive letter, in DM, to the raid? ... > I'm not trying to load Windows onto my RAID array, ... > I did install the nVidia drivers from Windows after installation. ... and the RAID array is listed as a drive under "Drives" ...
    (microsoft.public.windowsxp.hardware)
  • Re: Raid 0 not booting
    ... Have you tried the origonal winxp cd, with the F6 option to install raid ... 2X 500 GB WD Sata hard drives setup in RAID 0 ... (Raid info is set and saved in bios setup, reads both drives as one, ... I have done a complete installation of Windows XP onto the hard drives ...
    (microsoft.public.windowsxp.help_and_support)