I recently noticed that one of my test servers (running openSuSE 11.1) was showing SMART hard drive pre-failure errors. This server had a spare disk that was identical to the original so I did a:
dd if=/dev/sda of=/dev/sdb
Then powered down the machine, removed the old drive, and moved the second drive to the first SATA channel. It appears however that this isn’t enough to get it going.
Trying manual resume from /dev/disk/by-id/ata-Maxtor_6Y080M0_Y20V5C8C-part1
Resume device /dev/disk/by-id/ata-Maxtor_6Y080M0_Y20V5C8C-part1 not found (ignoring)
Waiting for device /dev/disk/by-id/ata-Maxtor_6Y080M0_Y20V5C8C-part2 to appear:..................Could not find /dev/disk/by-id/ata-Maxtor_6Y080M0_Y20V5C8C-part2.
Want me to fall back to /dev/disk/by-id/ata-Maxtor_6Y080M0_Y20V5C8C-part2? (Y/n)
At this point it drops into what I think is single user mode and I’m not sure where to go from here. I’m sure I can add the old drive back and get it booted if necessary but I’d like to know what I’m missing so if something like this were to happen and I didn’t have the original drive I could restore the system.
The problem is that the entries in /etc/fstab are using the device ID, which has changed since you changed the drive. A simple fix would be to edit the fstab file so that all lines that read
/dev/disk/by-id/ata-Maxtor_6Y080M0_Y20V5C8C-part1
to
/dev/sda1
and so on for the other partitions (note that it tells you the partition number at the end of the ata-Maxtor…).
If you can’t get to the fstab via the single user mode it boots in, you may have to use a live-cd to get there.
Reply back if you run into problems or are unsure how to proceed.
Yes, it still looks for the by-id Maxtor string. I don’t think it’s getting far enough to where it reads the /etc/fstab file since changing it had no effect. I’m not sure where in the early boot process it reads this info from.
I might have some insight into this. Since this was happening so early in the boot cycle I took a guess and put the old drive back in and pulled up the boot loader editor in Yast. Under ‘Optional Kernel Command Line Parameters’ I found this:
Have you done what Monex suggested? I forgot about the entries in /boot/grub/menu.lst. You need to edit that file in the same way you edited the /etc/fstab file. You need to change the root entries in there from the device id’s to /dev/sda2.