Mdadm troubles in Gutsy

Soldato
Joined
9 May 2005
Posts
7,400
Location
Berkshire
Hoping some one can help me out with this.

I'm trying to get raid 1 working but not having much joy at all.

Basically I have everything syncing and seemingly working correctly with grub installed to the MBR on both drives, however when I fake a drive failure I'm running into problems.

If I unplug the first drive in the array and restart the PC, I eventually get the folowing:

Code:
Starting up ...
Loading, please wait...
stdin: error 0
kinit: name_to_dev_t(/dev/md1) = md1(9,1)
kinit: trying to resume from /dev/md1)
[207.997551] Read-error on swap-device (9:1:8)
kinit: No resume image, doing normal boot
Usage: modprobe [-v] [-V] followed by some stuff suggesting modprobe isn't being used correctly.
mount: cannot read /etc/fstab: No such file or directory
<A string of errors stating no such file or directory>
Target Filesystem doesn't have /sbin/init
BusyBox v1.1.3 (Debian 1:1.1.3-5ubuntu7) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)


I setup softraid using this guide and as I say it all appears to work correctly until I'm actually under failure conditions.

Can anyone please help?
 
I spied once in the gutsy initramfs that mdadm gets called with the '--no-degraded' option, which doesn't start an md device unless all devices are present.

Now I may have the wrong idea here or perhaps overlooking something, but I thought that was completely bonkers myself.

In my case, I extracted the initramfs with "gzip -cd < /boot/initramfs | cpio -iv" into a new folder, changed the offending script (can't remember which offhand, sorry) and recreated it with (find|cpio --create -H newc|gzip -9 > /boot/newinitramfs) - seemed to work as it should after that.

I haven't come across other distro's using --no-degraded in their respective initrd/initramfs so I think its a ubuntu peculiarity.
 
I'll give that a try, thanks.

I'm considering going with Dapper rather than Gutsy as it appears that mondo works correctly under that as well.
 
ok I'm running the command u listed, but i get /boot/initramfs: No such file or directory??

edit:

Am I right in thinking that if you run update on intramfs it builds itself out of what's in /usr/share/initramfs-tools?
 
Last edited:
mdadm is a pain in the *** on Gutsy.. took me many attempts to get the nack of it.. I made the raid on Live Cd and then went to alternate cd.. set first partition as /boot and rest as software raid. All worked out in the end :D
 
Something else that really could do with the 'Ubuntu polish'. The linux raid subsystems are pretty amazing, combined with LVM, and the vast choice of filesystems, make them nice and versatile. Just a shame there's no real nice GUI tools to deal with all that in a nice easy way. Sure, the tools are they but they can be a bit arcane on the old command line. But the mdadm system is tons better than the old raidtools setup.
 
Back
Top Bottom