ZFS: Mount partition from ZVOL with volmode=dev

Paul Chakravarti paul.chakravarti at gmail.com
Sun Dec 28 18:15:27 UTC 2014


> > Sorry - I should have been clearer. The zvol shows up on the host
> > system but the partitions aren’t exposed to geom.
>
> That's exactly what volmode=dev does, if you want geom ones don't
> specify volmode.

OK, that make sense

> > Using volmode=default (geom - vfs.zfs.vol.mode=1) causes the installer to fail
> > when you try to create a UFS filesystem under bhyve - it is possible to get
> > round this by creating the partitions manually but my preference would be to
> > use volmode=dev.
> 
> What error do you get?


If you try a UFS install on a device with volmode=geom you get the following error message (zfs install or creating partitions manually outside the VM works fine):

    Error mounting partition /mnt: mount: /dev/vtbd0p2: Invalid argument

This has been discussed on freebsd-virtualisation (https://lists.freebsd.org/pipermail/freebsd-virtualization/2014-August/002748.html) where they recommend setting volmode=dev

I actually think I have solved my immediate problem (though it is a bit cumbersome)- if I create my template vol with volmode=dev I can send/recv a snapshot to create a clone with volmode=geom, mount the partition on the host system and edit the contents, and then send/recv a second clone with volmode=dev.

Thanks, Paul




More information about the freebsd-fs mailing list