unable to boot from the second disk of a RAID1 array - error 21

Bug #360832 reported by Mathias Gug
4
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
New
High
Unassigned

Bug Description

Binary package hint: grub

Running on jaunty RC with a system installed on a RAID1 array. Starting the system with only the second drive plugged in gives a grub error 21. Moving the second disk to be the primary drive will make the system boot correctly from the degraded array.

Related branches

Mathias Gug (mathiaz)
Changed in grub (Ubuntu):
importance: Undecided → High
Mathias Gug (mathiaz)
Changed in grub (Ubuntu):
milestone: none → ubuntu-9.04
Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 360832] Re: unable to boot from the second disk of a RAID1 array - error 21

I have performed a new installation into a kvm of today's Jaunty amd64 server.

2 disks, 2 GB apiece, qcow2.

Both are partitioned into a single raid partition, raid1 together,
serving / on ext3. No separate /boot, or swap partition. Note that I
needed 256MB of memory for this to work.

I was then able to boot degraded in each of the following four cases:

kvm -hda server1.img
kvm -hdb server1.img
kvm -hda server2.img
kvm -hdb server2.img

That's using each of my disks, in each of the first and second disk position.

In all 4 cases, grub found a bootloader, started the kernel and
initramfs noticed that a disk was missing.

I have not yet been able to reproduce the problem, Mathias. There
must be something with the way in which libvirt calls kvm that's
introducing this problem...

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

<soren> mathiaz, kirkland: Mind you, IIRC, libvirt always tells kvm to use extboot.
<soren> I don't think extboot knows how to fall back if it fails to boot from something.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Here is the kvm command line that fails with an grub error 21:

/usr/bin/kvm -M pc -m 128 -smp 1 -monitor pty -boot c -drive file=/home/mathiaz/vm/tests_isos/jaunty-server-amd64-raid1/vm//root2.qcow2,if=virtio,index=1,boot=on -drive file=/home/mathiaz/vm/isos/9.04-20090414/jaunty-server-amd64.iso,if=ide,media=cdrom,index=2 -net nic,macaddr=52:54:00:a2:34:e9,vlan=0,model=virtio -net tap,fd=10,script=,vlan=0 -usb -vnc 0.0.0.0:0

Revision history for this message
Mathias Gug (mathiaz) wrote :

And the associated libvirt file:

<domain type='kvm'>
        <name>jaunty-server-amd64-raid1</name>
        <uuid>1c3d9419-3c1d-493b-9ce7-c4a3cf6d1409</uuid>
        <memory>131072</memory>
        <vcpu>1</vcpu>
        <features>
                <acpi/>
        </features>
        <os>
                <type>hvm</type>
                <boot dev='hd' />

        </os>
        <clock offset='utc'/>
        <on_poweroff>destroy</on_poweroff>
        <on_reboot>reboot</on_reboot>
        <on_crash>destroy</on_crash>
        <devices>

                <!-- <disk type='file' device='disk'><source file='/home/mathiaz/vm/tests_isos/jaunty-server-amd64-raid1/vm//root1.qcow2'/><target dev='hda' bus='virtio'/></disk> -->
<disk type='file' device='disk'><source file='/home/mathiaz/vm/tests_isos/jaunty-server-amd64-raid1/vm//root2.qcow2'/><target dev='hdb' bus='virtio'/></disk>
                <disk type='file' device='cdrom'><source file='/home/mathiaz/vm/isos/9.04-20090414/jaunty-server-amd64.iso'/><target dev='hdc'/><readonly/></disk>
                <interface type='network'>
                        <mac address='52:54:00:a2:34:e9'/>
                        <source network='default' />
                        <model type='virtio'/>
                </interface>
                <graphics type='vnc' listen='0.0.0.0'/>
        </devices>
</domain>

Revision history for this message
Mathias Gug (mathiaz) wrote :

Here is the kvm command line that can boot successfully from the second device:

usr/bin/kvm -M pc -m 128 -smp 1 -monitor pty -boot c -drive file=/home/mathiaz/vm/tests_isos/jaunty-server-amd64-raid1/vm//root2.qcow2,if=virtio,index=0,boot=on -drive file=/home/mathiaz/vm/isos/9.04-20090414/jaunty-server-amd64.iso,if=ide,media=cdrom,index=2 -net nic,macaddr=52:54:00:a2:34:e9,vlan=0,model=virtio -net tap,fd=10,script=,vlan=0 -usb -vnc 0.0.0.0:0

And its associated libvirt file:

<domain type='kvm'>
        <name>jaunty-server-amd64-raid1</name>
        <uuid>1c3d9419-3c1d-493b-9ce7-c4a3cf6d1409</uuid>
        <memory>131072</memory>
        <vcpu>1</vcpu>
        <features>
                <acpi/>
        </features>
        <os>
                <type>hvm</type>
                <boot dev='hd' />

        </os>
        <clock offset='utc'/>
        <on_poweroff>destroy</on_poweroff>
        <on_reboot>reboot</on_reboot>
        <on_crash>destroy</on_crash>
        <devices>

                <!-- <disk type='file' device='disk'><source file='/home/mathiaz/vm/tests_isos/jaunty-server-amd64-raid1/vm//root1.qcow2'/><target dev='hda' bus='virtio'/></disk> -->
<disk type='file' device='disk'><source file='/home/mathiaz/vm/tests_isos/jaunty-server-amd64-raid1/vm//root2.qcow2'/><target dev='hda' bus='virtio'/></disk>
                <disk type='file' device='cdrom'><source file='/home/mathiaz/vm/isos/9.04-20090414/jaunty-server-amd64.iso'/><target dev='hdc'/><readonly/></disk>
                <interface type='network'>
                        <mac address='52:54:00:a2:34:e9'/>
                        <source network='default' />
                        <model type='virtio'/>
                </interface>
                <graphics type='vnc' listen='0.0.0.0'/>
        </devices>
</domain>

The only difference with between the two libvirt file is the dev attribute in the device target defintion.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.