trying to expand a zvol-backed bhyve guest which is UFS

Paul Mather paul at gromit.dlib.vt.edu
Mon May 20 12:53:07 UTC 2019


On May 20, 2019, at 5:09 AM, tech-lists <tech-lists at zyxst.net> wrote:

> On Sun, May 19, 2019 at 10:17:35PM -0500, Adam wrote:
>> On Sun, May 19, 2019 at 9:47 PM tech-lists <tech-lists at zyxst.net> wrote:
>>
>>> Thanks very much to you both, all sorted now. I didn't realise there was
>>> a 2TB limit for MBR either. Can I shrink the 4TB to 2TB on the zfs side
>>> without scrambling the ufs on the guest?
>>
>> You can snapshot the zvol to be safe, but you should be able to shrink it
>> to the existing partition size.  If it's a sparse zvol, it may not may  
>> that
>> much difference.
>
> The zvol has about 515GB data. Hopefully zfs is smart enough to shrink
> to the MBR boundary.


A ZVOL is just a container.  ZFS has no implicit knowledge of what you are  
using it for or whether it has any particular partition table inside it.   
It's your responsibility to size the ZVOL appropriately.  (TL;DR: ZVOLs  
have no concept of an "MBR boundary.")

Cheers,

Paul.



More information about the freebsd-stable mailing list