[fedora-virt] hot add scsi disk supposed to work on f12 qemu/kvm host?

Gianluca Cecchi gianluca.cecchi at gmail.com
Fri Dec 11 15:28:10 UTC 2009


Hello,
F12 with qemu-kvm updated components.
Also installed virt-manager 0.8.1 from updates-testing repo.

I have a CentOS 5.4 guest x86_64.
If I remember well (probably from the kvm test day for which I don't
find the full log I found at time...), hot add of scsi disk should
work if there is already a scsi disk into the guest (and if the guest
supports it).
I presume CentOS 5.4 supports in general hot add of scsiu disks, as I
do this sometimes to SAN connected disks.
So I have this pre-condition with an sda device already configured and
used on a running guest.
I add a new scsi disk, but I don't see any new disk in guest.
I have acpihp kernel module loaded in guest.
>From posts in other mailing lists it seems that probably I should also
have pci_hotplug kernel module, but I don't find it under
2.6.18-164.6.1.el5 kernel ....

When I add the disk from virt-manager (it doesn't say that it will be
operational after next reboot, btw) I see a new controller in guest
and not a new disk attached to the same controller....  and in dmesg:
sym1: <895a> rev 0x0 at pci 0000:00:06.0 irq 11
sym1: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym1: SCSI BUS has been reset.
scsi2 : sym-2.2.3

and in messages:
Dec 10 17:21:04 c54vm1 kernel: PCI: Ignore bogus resource 6 [0:0] of
0000:00:02.0
Dec 10 17:21:04 c54vm1 kernel: decode_hpp: Could not get hotplug
parameters. Use defaults
Dec 10 17:21:04 c54vm1 kernel: PCI: Enabling device 0000:00:06.0 (0000 -> 0003)
Dec 10 17:21:04 c54vm1 kernel: ACPI: PCI Interrupt 0000:00:06.0[A] ->
Link [LNKB] -> GSI 11 (level, high) -> IRQ 11
Dec 10 17:21:04 c54vm1 kernel: sym1: <895a> rev 0x0 at pci 0000:00:06.0 irq 11
Dec 10 17:21:04 c54vm1 kernel: sym1: No NVRAM, ID 7, Fast-40, LVD,
parity checking
Dec 10 17:21:04 c54vm1 kernel: sym1: SCSI BUS has been reset.
Dec 10 17:21:04 c54vm1 kernel: scsi2 : sym-2.2.3

But fdisk -l gives no added scsi disk.

tried also with:
[root at c54vm1 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan

but nothing.
[root at c54vm1 ~]# find /sys -iname "*scan"
gives
/sys/class/scsi_host/host2/scan
/sys/class/scsi_host/host0/scan
/sys/devices/pci0000:00/0000:00:04.0/host0/target0:0:0/0:0:0:0/rescan

in /sys filesystem, this is the situation about the newly added controller


[root at c54vm1 ~]# ll /sys/devices/pci0000\:00/0000\:00\:06.0/host2/
total 0
drwxr-xr-x 2 root root    0 Dec 10 17:21 power
lrwxrwxrwx 1 root root    0 Dec 11 15:23 scsi_host:host2 ->
../../../../class/scsi_host/host2
lrwxrwxrwx 1 root root    0 Dec 11 15:23 spi_host:host2 ->
../../../../class/spi_host/host2
--w------- 1 root root 4096 Dec 11 15:23 uevent

while for the controller related to sda:
[root at c54vm1 ~]# ll /sys/devices/pci0000\:00/0000\:00\:04.0/host0/
total 0
drwxr-xr-x 2 root root    0 Dec 10 12:57 power
lrwxrwxrwx 1 root root    0 Dec 10 12:57 scsi_host:host0 ->
../../../../class/scsi_host/host0
lrwxrwxrwx 1 root root    0 Dec 10 12:57 spi_host:host0 ->
../../../../class/spi_host/host0
drwxr-xr-x 4 root root    0 Dec 10 12:57 target0:0:0
--w------- 1 root root 4096 Dec 10 12:57 uevent



any hint or clarification about current hot add of scsi (or virtio) disks?
And also about suggested disk type (ide vs scsi vs virtio) in case of
RHEL/CentOS 4 and 5 guests with F12 hosts.

Thanks in advance,
Gianluca




More information about the Fedora-virt mailing list