Bug#526615: fails to install to RAID across virtual (kvm/virtio) disks

Felix Zielcke fzielcke at z-51.de
Tue Aug 4 12:56:11 UTC 2009


Am Dienstag, den 04.08.2009, 14:40 +0200 schrieb martin f krafft:
> also sprach Felix Zielcke <fzielcke at z-51.de> [2009.07.24.1410 +0200]:
> > We currently use in grub-setup ioctl (GET_ARRAY_INFO) and ioctl
> > (GET_DISK_INFO) and unfortunately they return the major and minor of the
> > device and not the name of the device file.
> 
> But you have to somehow map that to the device file later, right?
> 
> mdadm-lab:~# ls -la /dev/vda
> brw-rw---- 1 root disk 254, 0 2009-08-04 13:53 /dev/vda
> 
> /dev/vda is a regular device like any other, except that it uses the
> 'experimental' major number 254. I don't understand why that should
> be treated any differently than e.g. a SCSI disk with major number
> 8.

The problem is that we currently create the filename of the device by
using the major and minor
Like this:

if (major == SCSI_DISK0_MAJOR)
    sprintf (name, "/dev/sd%c", 'a' + minor / 16);

This just doestn't work if the major is for local use according to the
kernel docs.
We could make 254 map to /dev/vda but maybe it's wrong then for someone
else.
Unfortunately I don't know why we have 2 different methods of dealing
with RAID disks.
The ioctl method in grub-setup and the method to just read the md
superblock on all disks and add them to a list in grub-probe.

-- 
Felix Zielcke
Proud Debian Maintainer






More information about the Pkg-grub-devel mailing list