Quote:
Originally Posted by stevea
I' m confused. It looks like they are showing up properly named - no ?
|
Hi stevea, thanks for the follow-up.
Some of the devices got their names properly, some are not. For example these:
Code:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/vg_c4/virtmachines'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
The LV '/dev/vg_c4/virtmachines' should have device name /dev/hda, but actually is named as:
Code:
Disk /dev/sdj: 21.5 GB, 21474836480 bytes
/dev/sdj1 2 20480 20970496 8e Linux LVM
and respectively:
Code:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/vg_c4/virtmachines_1'/>
<target dev='hdb' bus='ide'/>
<alias name='ide0-0-1'/>
<address type='drive' controller='0' bus='0' unit='1'/>
</disk>
is shown as:
Code:
Disk /dev/sdi: 21.5 GB, 21474836480 bytes
/dev/sdi1 * 1 64 512000 83 Linux
/dev/sdi2 64 2611 20458496 8e Linux LVM
As you can see I've named the ASM LVs as target device names sdc to sdj (8 total - first four should be 2GB disks(sdc,sdd,sde,sdf) and the rest four 1GB (sdg,sdh,sdi,sdj) and thus I expect my virtual machine to see them that way:
/dev/hda (first 21.5GB disk)
/dev/hdb (second 21.5GB disk)
/dev/sdc - /dev/sdf - four 2GB disks
/dev/sdg - /dev/sdj - four 1GB disks
but this is not the case.
Any ideas?
Thanks!
---------- Post added at 06:56 PM ---------- Previous post was at 06:12 PM ----------
Update
I've been advised not to use scsi emulation with KVM, but instead to use virtio_blk emulation.
So I did and "converted" the disks to virtio as editing the guest machine XML config file for all ASM disks like this:
old:
Code:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/mapper/vg_c4-virtdisks_node01_asm1'/>
<target dev='sdc' bus='scsi'/>
<address type='drive' controller='0' bus='0' unit='2'/>
</disk>
new:
Code:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/mapper/vg_c4-virtdisks_node01_asm1'/>
<target dev='vdc' bus='virtio'/>
</disk>
After guest machine reboot this is how the devices got renamed:
Code:
[root@node01 ~]# fdisk -l |grep /dev/
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/sda: 21.5 GB, 21474836480 bytes
/dev/sda1 * 1 64 512000 83 Linux
/dev/sda2 64 2611 20458496 8e Linux LVM
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
/dev/sdb1 2 20480 20970496 8e Linux LVM
Disk /dev/vda: 2147 MB, 2147483648 bytes
/dev/vda1 1 1009 2095662 83 Linux
Disk /dev/vdb: 2147 MB, 2147483648 bytes
/dev/vdb1 1 1009 2095662 83 Linux
Disk /dev/vdc: 2147 MB, 2147483648 bytes
/dev/vdc1 1 1009 2095662 83 Linux
Disk /dev/vdd: 2147 MB, 2147483648 bytes
/dev/vdd1 1 1009 2095662 83 Linux
Disk /dev/vde: 1073 MB, 1073741824 bytes
Disk /dev/dm-1 doesn't contain a valid partition table
/dev/vde1 1 1011 1048376+ 83 Linux
Disk /dev/vdf: 1073 MB, 1073741824 bytes
/dev/vdf1 1 1011 1048376+ 83 Linux
Disk /dev/vdg: 1073 MB, 1073741824 bytes
/dev/vdg1 1 1011 1048376+ 83 Linux
Disk /dev/vdh: 1073 MB, 1073741824 bytes
/dev/vdh1 1 1011 1048376+ 83 Linux
Disk /dev/dm-0: 4227 MB, 4227858432 bytes
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/dm-3 doesn't contain a valid partition table
Disk /dev/dm-4 doesn't contain a valid partition table
Disk /dev/dm-5 doesn't contain a valid partition table
Disk /dev/dm-1: 16.7 GB, 16710107136 bytes
Disk /dev/dm-2: 5368 MB, 5368709120 bytes
Disk /dev/dm-3: 5368 MB, 5368709120 bytes
Disk /dev/dm-4: 5368 MB, 5368709120 bytes
Disk /dev/dm-5: 5268 MB, 5268045824 bytes
[root@node01 ~]#
Also, you might notice that disks /dev/sda and /dev/sdb (previously /dev/sdj and /dev/sdi) have shown up - without messing up with their <disk> XML directive. Obviously the naming is controlled somewhere else, but not on the XML file or at least I don't know how and where.
Two questions arose observing the above output:
1. Why is the XML directive 'target dev=name' not working?
2. If one decides to add/reorganize/drop a disk, does this mean that he can expect again change in the naming conventions?
Can someone spread some light please?
Thanks in advance!