FS#21231 - AIF does not detect partitions at /dev/xvda on a Xen virtual machine

Attached to Project: Release Engineering
Opened by Sven (avanc) - Wednesday, 13 October 2010, 06:39 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:50 GMT
Task Type Bug Report
Category AIF
Status Closed
Assigned To No-one
Architecture x86_64
Severity Medium
Priority Normal
Reported Version 2010.05
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

I wanted to install Arch Linux in virtual environment. The harddisk are located at /dev/vxd*. aif doesn't detect these partitions during "Prepare Hard Drive". Therefore, the setup fails and I cannot continue the installation.

A workaround is to mount the partition manually at /mnt/ and patch aif so it doesn't insist on setting up the partitions:
http://colinux.wikia.com/wiki/Howto:_ArchLinux_install_from_iso_with_rescue_fs#Stage_2:_Prepare_the_final_filesystem_and_install_ArchLinux_on_it

There should be an option to set the partitions by hand.
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:50 GMT
Reason for closing:  Deferred
Comment by Dieter Plaetinck (Dieter_be) - Thursday, 09 December 2010, 08:29 GMT
This can be fixed trivially.
I.e. like https://github.com/Dieterbe/aif/commit/f7aa729579c4f81392446a9a775376f8438ab776
but now we should do:

- #scsi/sata devices, and virtio blockdevices (/dev/vd*)
- for dev in $(ls | egrep '^[sv]d')
+ #scsi/sata devices (sd*), virtio (vd*) and xen (vxd*) block devices
+ for dev in $(ls | egrep '^(s|vx?)d')

However, I don't like how we're "running behind" the kernel's blockdevice naming. I wonder if there is a more generic, robust way to find blockdevices like these.
Comment by Dieter Plaetinck (Dieter_be) - Monday, 13 December 2010, 20:38 GMT
can you confirm that there is also a corresponding entry for your xvda device in /sys/block ?
and can you tell me what /sys/block/xvda/device/type contains? (if it exists) Maybe cat all files in /sys/block/xvda/device/
Comment by Dieter Plaetinck (Dieter_be) - Wednesday, 19 January 2011, 12:15 GMT
Sven?
Comment by Sven (avanc) - Wednesday, 19 January 2011, 23:48 GMT
Sorry for the delay.
/sys/block/xvda/device/devtype says "vbd"
Comment by Alexey (skobkin) - Saturday, 22 October 2011, 15:50 GMT
Same problem with Virtio devices under KVM (/dev/vda). And fix solution from first comment does not work already.
Comment by Dieter Plaetinck (Dieter_be) - Sunday, 25 December 2011, 20:55 GMT
i hope /sys/block/xvda/uevent also contains a DEVTYPE variable which equals 'vbd'
if so, this fix should work:
https://github.com/Dieterbe/aif/commit/7d9f34b3bf2be04b6cf6ec5ccd3efed6b5c1a08d
can anyone running Xen confirm?
Comment by Sven (avanc) - Wednesday, 28 December 2011, 17:16 GMT
Unfortunatelly, /sys/block/xvda/uevent contains the following content:

MAJOR=202
MINOR=0
DEVNAME=xvda
DEVTYPE=disk
Comment by Tom Gundersen (tomegun) - Saturday, 10 March 2012, 11:15 GMT
Just a suggestion: would it not be easier to rely on udev, and just use /dev/disk/by-*/* ? That should give you all the devices...

Loading...