Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I moved my CentOS soft-RAID1 drives to another box, and now it fails to boot.

When I launched the boot process from the grub menu, I get the following error:

"Unable to access resume device /dev/md1".

(I should notice that before that I got another error related to super-block, which was fixed by re-running the mkinitrd).

Any idea?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

While changing box, it is highly likely that your disks no longer have the same device name as viewed by Linux. This could be because the driver is a different one, or they are just numbered differently. In any case, the disk that used to be /dev/hda may now be /dev/sdb, or something else.

You should boot the new box on a rescue CD (live CD, any distro will work). Then, check how your disks are detected, find their new names, so you can update your configuration.

First, you'll need to update GRUB's config. GRUB does it's best to use "independant" disk names, such as (hd0) and (hd1), but it does map these to real device names in the file /boot/grub/device.map. Update this to be correct for your new box, and rewrite grub to both your disks, using the grub command:

# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> root (hd1,0)
grub> setup (hd1)

Then, check that /etc/fstab and /etc/mdadm/mdadm.conf don't contain any references to your raw disk names. Swap partitions are a frequent culprit, if you didn't put them in a RAID partition.

Reboot, and you should be going! Well, hopefully. Hope this helps.

share|improve this answer
    
Hi. Thanks for the advice. About this bit: " You should boot the new box on a rescue CD (live CD, any distro will work). Then, check how your disks are detected, find their new names, so you can update your configuration. " I just checked out, and the disks are detected in same fashion - i.e. /dev/sda and /dev/sdb are same on both machines (as I'm using SATA drives). Is there any chance the partitions got changed? Or there anything else I can do? Regards. –  SyRenity Feb 8 '10 at 21:47
    
No, it's not possible for the partitions to have been renumbered. It is possible that your installed kernel doesn't detect the new SATA controller. Is the live CD you used considerably newer that the installed kernel? What stage does the error occur at? Does GRUB start booting at all, or just fail immediately? –  Jonathan Clarke Feb 8 '10 at 21:59
    
Actually the installed kernel is newer then Live CD, because it's the last before the latest available, and the Live CD contain one a few versions ago. The error occurs immediately after the boot stage - GRUB just writes "Unable to access resume device /dev/md1", shows it's unable to mount the root devices, and then kernel panic arrives. It's important to notice that before that I had an error "Superblock not found", which occurred because the SATA controller was not in initrd image. I solved this by installing the latest kernel via Live CD (mkinitrd just didn't solve it). Thanks again. –  SyRenity Feb 8 '10 at 22:07
    
Yes, I saw you regenerated the initrd image, always a good move. My last idea would be to try booting with the "noresume" parameter to the kernel (edit the boot line in grub, with the 'e' key). –  Jonathan Clarke Feb 8 '10 at 22:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.