<div dir="ltr">Hello,<div>I seem to remember that online resize of VirtIO disk is possible.</div><div>Now I have an Oracle Linux VM with 2.6.39-400.215.3.el6uek.x86_64 kernel where I resize a disk (/dev/vdb) from 500Gb to 900Gb.</div><div>Apparently the kernel acquired the change because in /var/log/messages I see:</div><div><br></div><div><div>May 31 14:16:16 dbatest3 kernel: virtio_blk virtio6: new size: 1887436800 512-byte logical blocks (966 GB/900 GiB)</div></div><div><br></div><div>but fdisk seems not to be able to recognize it:</div><div><br></div><div><div>[root@dbatest3 ~]# fdisk -l /dev/vdb</div><div><br></div><div>Disk /dev/vdb: 536.9 GB, 536870912000 bytes</div><div>16 heads, 63 sectors/track, 1040253 cylinders</div><div>Units = cylinders of 1008 * 512 = 516096 bytes</div><div>Sector size (logical/physical): 512 bytes / 512 bytes</div><div>I/O size (minimum/optimal): 512 bytes / 512 bytes</div><div>Disk identifier: 0x00000000</div><div><br></div><div>[root@dbatest3 ~]# </div></div><div><br></div><div>oVirt is 4.1.1 with hypervisor running the VM being in CentOS 7.3 with libvirt 2.0.0-10.el7_3.5 and qemu-kvm-ev 2.6.0-28.el7_3.6.1</div><div><br></div><div>I was not able to find the rescan option I eventually need to execute (but I think not necessary because the kernel already detected it).</div><div>Is this a bug in fdisk itself? </div><div>I have an LVM PV on the whole disk, but of course a pvresize doesn&#39;t notice any change in it.</div><div>I verified that in my kernel the ACPI PCI hotplug feature is compiled into the kernel and not as a module:</div><div><br></div><div><div>[root@dbatest3 ~]# grep &quot;CONFIG_HOTPLUG_PCI_ACPI=&quot; /boot/config-2.6.39-400.215.3.el6uek.x86_64 </div><div>CONFIG_HOTPLUG_PCI_ACPI=y</div><div>[root@dbatest3 ~]# </div></div><div><br></div><div>I tried also this:</div><div><br></div><div>echo 1 &gt; /sys/devices/pci0000\:00/0000\:00\:09.0/rescan<br></div><div><br></div><div>because of the tree below:</div><div><br></div><div><div>[root@dbatest3 ~]# ll /sys/devices/pci0000\:00/0000\:00\:09.0/virtio6/</div><div>total 0</div><div>drwxr-xr-x 3 root root    0 May 31 11:45 block</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 device</div><div>lrwxrwxrwx 1 root root    0 May 31 14:19 driver -&gt; ../../../../bus/virtio/drivers/virtio_blk</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 features</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 modalias</div><div>drwxr-xr-x 2 root root    0 May 31 14:18 power</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 status</div><div>lrwxrwxrwx 1 root root    0 May 31 14:16 subsystem -&gt; ../../../../bus/virtio</div><div>-rw-r--r-- 1 root root 4096 May 31 14:16 uevent</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 vendor</div><div>[root@dbatest3 ~]# </div></div><div><br></div><div><div>[root@dbatest3 ~]# ll /sys/devices/pci0000\:00/0000\:00\:09.0/virtio6/block</div><div>total 0</div><div>drwxr-xr-x 7 root root 0 May 31 11:45 vdb</div><div>[root@dbatest3 ~]# </div></div><div><br></div><div><div>[root@dbatest3 ~]# ll /sys/devices/pci0000\:00/0000\:00\:09.0/virtio6/block/vdb/</div><div>total 0</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 alignment_offset</div><div>lrwxrwxrwx 1 root root    0 May 31 14:19 bdi -&gt; ../../../../../virtual/bdi/251:16</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 capability</div><div>-r--r--r-- 1 root root 4096 May 31 14:15 dev</div><div>lrwxrwxrwx 1 root root    0 May 31 14:19 device -&gt; ../../../virtio6</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 discard_alignment</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 ext_range</div><div>drwxr-xr-x 2 root root    0 May 31 14:18 holders</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 inflight</div><div>drwxr-xr-x 2 root root    0 May 31 14:18 power</div><div>drwxr-xr-x 3 root root    0 May 31 14:16 queue</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 range</div><div>-r--r--r-- 1 root root 4096 May 31 14:16 removable</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 ro</div><div>-r--r--r-- 1 root root 4096 May 31 14:16 serial</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 size</div><div>drwxr-xr-x 2 root root    0 May 31 14:18 slaves</div><div>-r--r--r-- 1 root root 4096 May 31 14:19 stat</div><div>lrwxrwxrwx 1 root root    0 May 31 11:45 subsystem -&gt; ../../../../../../class/block</div><div>drwxr-xr-x 2 root root    0 May 31 14:18 trace</div><div>-rw-r--r-- 1 root root 4096 May 31 11:45 uevent</div><div>[root@dbatest3 ~]# </div></div><div><br></div><div>Any hint to avoid guest reboot and have fdisk recognize the happened resize?</div><div>In the future I&#39;m going to upgrade from the current 6.5 version, so that I can also use Virtio-SCSI driver and so standard SCSI commands when adding disks or resizing existing ones, but this VM was &quot;imported&quot; by another environment and I have initially to be stick with it in this precise configuration.</div><div><br></div><div>Thanks in advance,</div><div>Gianluca</div><div><br></div><div><br></div></div>