Dmitrii Shcherbakov (dmitriis) wrote on 2017-02-02:

In general with a proper guest kernel support hot-plug of block devices
should work both with virtio and virtio-scsi on any arch:

http://www.linux-kvm.org/page/Hotadd_pci_devices#Add_a_disk

Verified that using a xenial host and a xenial guest (using just libvirt
and qemu without openstack, nova, cinder, ceph).

Both addition and removal worked fine.

ii libvirt-bin 1.3.1-1ubuntu10.5 amd64 programs for the libvirt library
ii qemu-system 1:2.5+dfsg-5ubuntu10.6 amd64 QEMU full system emulation binaries
ii qemu-system-x86 1:2.5+dfsg-5ubuntu10.6 amd64 QEMU full system emulation 
binaries (x86)

guest kernel:
uname -r
4.4.0-59-generic

dmesg:

PCI hot-plug:

фев 02 19:26:29 xenial kernel: pci 0000:00:09.0: [1af4:1001] type 00 class 
0x010000
фев 02 19:26:29 xenial kernel: pci 0000:00:09.0: reg 0x10: [io 0x0000-0x003f]
фев 02 19:26:29 xenial kernel: pci 0000:00:09.0: reg 0x14: [mem 
0x00000000-0x00000fff]
фев 02 19:26:29 xenial kernel: pci 0000:00:09.0: BAR 1: assigned [mem 
0xc0000000-0xc0000fff]
фев 02 19:26:29 xenial kernel: pci 0000:00:09.0: BAR 0: assigned [io 
0x1000-0x103f]
фев 02 19:26:29 xenial kernel: virtio-pci 0000:00:09.0: enabling device (0000 
-> 0003)
фев 02 19:26:29 xenial kernel: virtio-pci 0000:00:09.0: virtio_pci: leaving for 
legacy driver
фев 02 19:26:36 xenial kernel: do_trap: 63 callbacks suppressed
фев 02 19:26:36 xenial kernel: traps: pool[3033] trap int3 ip:7fd0284bb9eb 
sp:7fcffac7b5b0 error:0
фев 02 19:27:11 xenial kernel: scsi 2:0:0:1: Direct-Access QEMU QEMU HARDDISK 
2.5+ PQ: 0 ANSI: 5

SCSI hot-plug:
фев 02 19:27:11 xenial kernel: sd 2:0:0:1: Attached scsi generic sg2 type 0
фев 02 19:27:11 xenial kernel: sd 2:0:0:1: [sdb] 41943040 512-byte logical 
blocks: (21.5 GB/20.0 GiB)
фев 02 19:27:11 xenial kernel: sd 2:0:0:1: [sdb] Write Protect is off
фев 02 19:27:11 xenial kernel: sd 2:0:0:1: [sdb] Mode Sense: 63 00 00 08
фев 02 19:27:11 xenial kernel: sd 2:0:0:1: [sdb] Write cache: enabled, read 
cache: enabled, doesn't support DPO or FUA
фев 02 19:27:11 xenial kernel: sd 2:0:0:1: [sdb] Attached SCSI disk
фев 02 19:28:13 xenial kernel: input: spice vdagent tablet as 
/devices/virtual/input/input6
фев 02 19:28:57 xenial kernel: sd 2:0:0:1: [sdb] Synchronizing SCSI cache
фев 02 19:28:57 xenial kernel: sd 2:0:0:1: [sdb] Synchronize Cache(10) failed: 
Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
фев 02 19:28:57 xenial kernel: sd 2:0:0:1: [sdb] Sense Key : Illegal Request 
[current]
фев 02 19:28:57 xenial kernel: sd 2:0:0:1: [sdb] Add. Sense: Logical unit not 
supported

# added vda - virtio
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 256G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 255,5G 0 part
  ├─ubuntu--vg-root 252:0 0 253,5G 0 lvm /
  └─ubuntu--vg-swap_1 252:1 0 2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
vda 253:0 0 20G 0 disk

# added sdb - virtio-scsi
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 256G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 255,5G 0 part
  ├─ubuntu--vg-root 252:0 0 253,5G 0 lvm /
  └─ubuntu--vg-swap_1 252:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 20G 0 disk
sr0 11:0 1 1024M 0 rom
vda 253:0 0 20G 0 disk

# removed virtio-scsi
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 256G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 255,5G 0 part
  ├─ubuntu--vg-root 252:0 0 253,5G 0 lvm /
  └─ubuntu--vg-swap_1 252:1 0 2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
vda 253:0 0 20G 0 disk

# removed virtio
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 256G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 255,5G 0 part
  ├─ubuntu--vg-root 252:0 0 253,5G 0 lvm /
  └─ubuntu--vg-swap_1 252:1 0 2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom

----

I'm going to take a deeper look at this.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1664737

Title:
  [ARM]  : Unable to use Cinder volumes on ARM

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1664737/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to