OpenStackのKVMインスタンスにマウント出来るVolume数について


* 検証中のOpenStackのKVM InstanceにどれだけVolumeがAttachできるか調べてみたところ、/dev/vda から /dev/vdaa の 27個で頭打ちだった
* nova volume-attachコマンドでそれ以上attachしても特にエラーは帰ってこないが、実際にはInstanceにAttachされておらず、nova-compute.logにはlibvirtError: internal error No more available PCI addressesと吐き出されている
* そのInstance上でlspciしてみたらこんな感じ
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:05.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:06.0 RAM memory: Red Hat, Inc Virtio memory balloon
00:07.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:08.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:09.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:0a.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:0b.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:0c.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:0d.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:0e.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:0f.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:10.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:11.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:12.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:13.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:14.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:15.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:16.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:17.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:18.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:19.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:1a.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:1b.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:1c.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:1d.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:1e.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:1f.0 SCSI storage controller: Red Hat, Inc Virtio block device

* PCIのデバイス番号は0x00 – 0x1fまでなので、それにあたってるのねー
* ついでにQemuのPCIについてみておく
* hw/pci/pci.c
* PCIは[[:]:].という感じに表記される
/*
* Parse [[:]:], return -1 on error if funcp == NULL
* [[:]:]., return -1 on error
*/
int pci_parse_devaddr(const char *addr, int *domp, int *busp,
unsigned int *slotp, unsigned int *funcp)
{

* domainは0以外はうけつけない – PCIBus *pci_get_bus_devfn(int *devfnp, PCIBus *root, const char *devaddr)
if (dom != 0) {
fprintf(stderr, "No support for non-zero PCI domains\n");
return NULL;
}

* bus,slot,funcの値についての制限
if (dom > 0xffff || bus > 0xff || slot > 0x1f || func > 7)
return -1;

* さて、QemuでPCIバスを増やすことはできるんだろうか?