Bug 684113

Summary: zypper dup on a system with RAID0 config (dmraid) leaves the system in unbootable state
Product: [openSUSE] openSUSE 11.4 Reporter: Robert Schweikert <rjschwei>
Component: BasesystemAssignee: Neil Brown <nfbrown>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: mmarek
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: mkinitrd log file
mkinitrd log file without using -f option

Description Robert Schweikert 2011-03-31 12:45:46 UTC
Ran zypper dup to update from oS 11.3 to oS 11.4 on a system with 2 550 GB drives setup in a RAID 0 config in the BIOS (thus dmraid).

After all packages were installed I rebooted the system, but upon reboot the machine could not find the root partition.

The partition setup

part1 -> /boot (ext2)
part2 -> swap
part3 -> /     (xfs)

I received the message 

Waiting for .......to appear

After timeout I was dropped into a shell. I tried to run dmraid but received a "Command not found" error

dmraid and related libraries and programs should be included in the initrd.
Comment 1 Robert Schweikert 2011-03-31 12:49:54 UTC
After creating a new initrd that contains dmraid I was able to boot the system once I was dropped into the shell by issuing

# dmraid -r
# dmraid -ay
# CTRL-d
Comment 2 Michal Marek 2011-03-31 13:03:17 UTC
Please run mkinitrd in the booted system and attach http://en.opensuse.org/openSUSE:Bugreport_mkinitrd#Logs. Also, the dmraid scripts are part of the dmraid package.
Comment 3 Robert Schweikert 2011-03-31 21:22:24 UTC
Created attachment 422591 [details]
mkinitrd log file

I ran

bash -vx /sbin/mkinitrd -f dmraid &>mkinitrd-log.txt
Comment 4 Michal Marek 2011-03-31 21:28:12 UTC
I assume with an explicit -f dmraid it works? It would be more helpful to see the log when it fails, i.e. just bash -vx /sbin/mkinitrd &>mkinitrd-log.txt.
Comment 5 Robert Schweikert 2011-03-31 21:41:08 UTC
I do not know if the generated initrd works, I am not in a position to reboot the machine at this point, and will not be for a couple of weeks as I will be traveling.
Comment 6 Robert Schweikert 2011-03-31 21:42:00 UTC
Created attachment 422596 [details]
mkinitrd log file without using -f option
Comment 7 Neil Brown 2011-04-06 03:58:35 UTC
The problem could well be 

		    newbd="$newbd $(echo $bd | sed 's/\([a-z]\)[0-9]*$/\1/')"

in
  /lib/mkinitrd/setup/61-dmraid.sh
bd is e.g. 
    /dev/mapper/isw_cbdadbheb_ARRAYp3

and the sed removes the '3' rather than the 'p3'...

But then the 'ARRAY' looks wrong too - should that really be there?
That seems to come from /etc/fstab... What is in /etc/fstab ??
Comment 8 Robert Schweikert 2011-04-06 15:12:42 UTC
I manually added dev/mapper/isw_cbdadbheb_ARRAYp3 to /etc/fstab so I can get the system to boot.

After zypper dup the /etc/fstab entry was as follows:

/dev/disk/by-id/md-uuid-1222f6e8:fef6ea76:035f7613:f442ef6a-part2 swap                 swap       defaults              0 0
/dev/disk/by-id/md-uuid-1222f6e8:fef6ea76:035f7613:f442ef6a-part3 /                    xfs        defaults              1 1
/dev/disk/by-id/md-uuid-1222f6e8:fef6ea76:035f7613:f442ef6a-part1 /boot                ext2       acl,user_xattr        1 2

these were the same entries that were in fstab for 11.3, however in 11.4 this path no longer existed, thus I changed fstab to use the /dev/mapper/.... path
Comment 9 Neil Brown 2011-06-02 06:24:25 UTC
This is the same bug as being discussed in 684291, so resolve this as a duplicate.

*** This bug has been marked as a duplicate of bug 684291 ***