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

Dexuan Cui decui at microsoft.com
Sat Jul 9 02:59:11 UTC 2016


> From: wlosh at bsdimp.com [mailto:wlosh at bsdimp.com] On Behalf Of Warner
> Losh
> Sent: Saturday, July 9, 2016 2:03
> To: Dexuan Cui <decui at microsoft.com>
> > 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
> signaling up the stack so that GEOM re-tastes the drive. The resize code
> was just recently added to camcontrol (I'm assuming that's what you are
> using to force the da driver to requery the size).a

Can you please point out the 'resize' code in da driver and the camcontrol
command?

I used "diskinfo /dev/da1" to force da to inquiry the new disk capacity.

Yeah, it looks my "open for writing" hack can trigger the
g_{raid,label,part}_taste function calls.

> 
> Geom normally retastes the drive when it closes after it has been opened
> for writing, which is why your open hack works.
> 
> Warner
Yes.

Thank you all for the quick replies!

Thanks,
-- Dexuan


More information about the freebsd-geom mailing list