Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
vzvol(8)		FreeBSD	System Manager's Manual		      vzvol(8)

       vzvol ^a ZFS zvol	management utility

       vzvol [-s|--size	size] [-u|--user name] [-v|--volume name]
       [--pool]	[-t|--type raw|virtualbox] [--file-system filesystem]
       [--import .img] [-p] [--format type zpool/zvol] [--delete zpool/zvol]
       [--list]	[-f]

       vzvol is	a shell-script designated to help automate the process of cre-
       ating a ZFS zvol	for use	as a storage unit for virtualization or	 test-

       vzvol  was  originally  created to allow	you to back a light .VMDK file
       with a zvol for use with	VirtualBox. However, additional	 functionality
       has been	added over time	to make	vzvol a	general-use program.

       -s, --size value=10G

	       Set the size of the zvol. Values	should include a unit suffix like
	       M (Megabytes) or	G (Gigabytes). Defaults	to 10G if unspecified.

       -u, --user name

	       Set the user under which	we grant permissions for the zvol. If unused,
	       your user will automatically be detected.

       -v, --volume name

	       Name of zvol.

       -p, --pool

	       Override	the logic to choose the	zpool you want your zvol on. By	default,
	       this script selects the first zpool available, unless your first	pool is
	       abootpoola (this	script will default to the second listed pool, usually
	       azroota in a default install on FreeBSD).

       -t, --type behaviour

	       Set the disk type behaviour. The	following types	are accepted:

	       -t virtualbox
		       The default behaviour. vzvol will create	a shim VMDK in
		       your HOME to point to the created zvol.

	       -t raw
		       Create a	raw, normal zvol with no shim, in the default location
		       of /dev/zvol/poolname/volumename.

       --file-system type

	       Setting this flag allows	you to format the zvol with your choice	of
	       filesystem. The default for vzvol is to not create a filesystem on the new
	       zvol. Acceptable	type values are	listed below:

	       Filesystems with	support	in FreeBSD:

	       --file-system zfs
	       Creates a ZFS filesystem, using the name	set in --volume	as the
	       pool name. Requires zfs-utils on	Linux.

	       --file-system  ufs
	       Create a	FreeBSD-compatible UFS2	filesystem. Unsupported	on Linux.

	       --file-system fat32
	       Create an MS-DOS	compatible FAT32 filesystem

	       Filesystems which require sysutils/e2fsprogs on FreeBSD:

	       --file-system ext2
	       Create a	Linux-compatible ext2 filesystem.

	       --file-system ext3
	       Create a	Linux-compatible ext3 filesystem.

	       --file-system ext4
	       Creates a Linux-compatible ext4 filesystem.

	       Filesystems which require sysutils/xfsprogs:

	       --file-system xfs
	       Create an XFS filesystem.

       --import	source

	       Import the contents of a	downloaded disk	image to your newly created zvol.
	       This is useful when using a pre-installed VM image, such	as


	       Used with --import to show a progress bar for image data	importation to the
	       vzol. Requires that sysutils/pv be installed.


	       Used to force import or deletion

       --format	type zvol

	       Reformat	a zvol created by vzvol, using the same	options	and arguments as


	       vzvol --format xfs zroot/smartos

       --delete	zvol

	       Delete the zvol you specify. If a .VMDK file is associated with the zvol,
	       the .VMDK will also be deleted. You MUST	specify	the zpool the zvol resides
	       on. You can get this information	from running avzvol --lista or
	       azfs list -t volumea.


	       vzvol --delete zroot/smartos11


	       List all	zvols on your system, the type,	any associated .VMDK files,
	       how much	space on disk is used by the zvol, the maximum size of the zvol
	       capacity, and the filesystem, if	vzvol can determine it.	Imported images
	       will list FS as aimporteda, and any zvol	that doesn't have acustom:FSa set
	       will report aunknowna.

       xfs(8), zpool(8)

       This script is released under the 2-clause BSD license. A(C) 2017, 2018
       RainbowHackerHorse <>

vzvol Version 0.7.0		 08 June 2018			      vzvol(8)


Want to link to this manual page? Use this URL:

home | help