<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 31, 2017 at 2:51 PM, Gianluca Cecchi <span dir="ltr">&lt;<a href="mailto:gianluca.cecchi@gmail.com" target="_blank">gianluca.cecchi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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.<wbr>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></blockquote><div><br></div><div>It seems that one of these two commands got the change available:</div><div> </div><div><div>[root@dbatest3 ~]# blockdev --flushbufs /dev/vdb</div></div><div><br></div><div><div>[root@dbatest3 ~]# blockdev --rereadpt /dev/vdb</div><div><br></div><div>Now</div><div>[root@dbatest3 ~]# fdisk -l /dev/vdb</div><div><br></div><div>Disk /dev/vdb: 966.4 GB, 966367641600 bytes</div><div>16 heads, 63 sectors/track, 1872457 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><div><div>[root@dbatest3 ~]# tail -3 /var/log/messages</div><div>May 31 14:16:16 dbatest3 kernel: virtio_blk virtio6: new size: 1887436800 512-byte logical blocks (966 GB/900 GiB)<br></div><div>May 31 15:13:49 dbatest3 kernel: vdb: detected capacity change from 536870912000 to 966367641600</div><div>May 31 15:13:49 dbatest3 kernel: vdb: unknown partition table</div><div>[root@dbatest3 ~]# </div></div><div><br></div><div>I found the hint/suggestion through this proxmox thread:</div><div><a href="http://pve-devel.pve.proxmox.narkive.com/LBZ1yFpv/online-resize-of-virtio-blk">http://pve-devel.pve.proxmox.narkive.com/LBZ1yFpv/online-resize-of-virtio-blk</a><br></div><div><br></div><div>Just in case other guys need the same... ;-)</div></div></div></div>