RE: How to force GEOM to recalculate the free space after the disk is resized?

2016-07-08 Thread Dexuan Cui via freebsd-geom
> From: wl...@bsdimp.com [mailto:wl...@bsdimp.com] On Behalf Of Warner > Losh > Sent: Saturday, July 9, 2016 2:03 > To: Dexuan Cui > > I'm not familiar with GEOM. > > Can somebody please explain the behavior? > > I'm guessing that the new code in the da driver to do 'resize' isn't properly > sign

RE: How to force GEOM to recalculate the free space after the disk is resized?

2016-07-08 Thread Dexuan Cui via freebsd-geom
Yes, this is also my suspicion. Here with “diskinfo /dev/da1”, geom can already detect the new disk capacity but it just doesn’t update its internal structure for new free space. I think I’ll have to locate the related code and ask geom to re-probe free space on disk capacity change. It would be

Re: How to force GEOM to recalculate the free space after the disk is resized?

2016-07-08 Thread Warner Losh
On Fri, Jul 8, 2016 at 6:19 AM, Dexuan Cui wrote: > Hi, I have a FreeBSD virtual machine (VM) running on Hyper-V and I'm testing > Hyper-V's Disk Online Resizing feature. The feature can expand or shrink the > (virtual) disk capacity of a VM when the VM is running. > > There is an issue with gpa

Re: How to force GEOM to recalculate the free space after the disk is resized?

2016-07-08 Thread Andrey V. Elsukov
On 08.07.16 15:19, Dexuan Cui via freebsd-geom wrote: > I'm not familiar with GEOM. Can somebody please explain the > behavior? > What FreeBSD version do you use? What messages do you see in the console/dmesg after resizing of disk? -- WBR, Andrey V. Elsukov signature.asc Description: OpenPG

Re: How to force GEOM to recalculate the free space after the disk is resized?

2016-07-08 Thread Maxim Sobolev
Smells like a bug in the geom_part where it supposed to re-read the partitions and update its internal structures. The reason why it works when you open dev/da1 for writing is because the geom_part provider that is attached to that disk is destroyed and created anew when you close the fd. -Maxim

How to force GEOM to recalculate the free space after the disk is resized?

2016-07-08 Thread Dexuan Cui via freebsd-geom
Hi, I have a FreeBSD virtual machine (VM) running on Hyper-V and I'm testing Hyper-V's Disk Online Resizing feature. The feature can expand or shrink the (virtual) disk capacity of a VM when the VM is running. There is an issue with gpart or GEOM: after the disk capacity is expanded (or shrunk)