mounting/exporting/importing a zfs volume

Victor Sudakov vas at
Tue Feb 12 01:31:08 UTC 2019

Paul Webster wrote:
> mdconfig -a -t vnode -f <path> afaik

Sorry, this does not work. 

root at newserv:~ # mdconfig -a -t vnode /dev/zvol/zroot/vm/mail/disk0
mdconfig: /dev/zvol/zroot/vm/mail/disk0 is not a regular file

There must be some other way.

> once they are mounted you could dd them 

Indeed, I can dd the volume to a regular file:

dd if=/dev/zvol/zroot/vm/mail/disk0 of=/var/tmp/rawimage bs=1m conv=sparse

and then work with the /var/tmp/rawimage (I can mdconfig it) but it's a waste
of disk space.

Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <>

More information about the freebsd-virtualization mailing list