
On Wed, Oct 17, 2012 at 01:51:35PM +1100, Peter Ross wrote:
Hi Russell,
http://en.wikipedia.org/wiki/ZFS#Storage_pools."
"ZFS filesystems are built on top of virtual storage pools called zpools."
The management commands are zfs and zpool. The man pages don't have any "zvols" in it but Wikipedia's article has.
zfs(8) on my linux system mentions mostly "volumes" but also "zvols" aka "zfs volumes". almost all commands look like zfs create [-ps] [-b blocksize] [-o property=value] ... -V size volume zfs destroy [-fnpRrv] filesystem|volume zfs clone [-p] [-o property=value] ... snapshot filesystem|volume zfs rename filesystem|volume|snapshot zfs set property=value filesystem|volume|snapshot ... zfs inherit [-r] property filesystem|volume|snapshot ... zfs receive | recv [-vnFu] filesystem|volume|snapshot # zfs create -V 2g pool/volumes/vol1 # zfs set shareiscsi=on pool/volumes/vol1 the page has zfsonlinux specific info (like device nodes under /dev/zvol) but the generic "volumes" info should be relevant to all current ports of zfs. zfs create [-ps] [-b blocksize] [-o property=value] ... -V size volume Creates a volume of the given size. The volume is exported as a block device in /dev/zvol/path, where path is the name of the vol ume in the ZFS namespace. The size represents the logical size as exported by the device. By default, a reservation of equal size is created. The FreeBSD man page at the following URL mentions volumes, same as the zfsonlinux man page. http://www.freebsd.org/cgi/man.cgi?query=zfs&manpath=FreeBSD+9.0-RELEASE the text for 'zfs create' is almost identical to the linux version. zfs create [-ps] [-b blocksize] [-o property=value] ... -V size volume Creates a volume of the given size. The volume is exported as a block device in /dev/zvol/{dsk,rdsk}/path, where path is the name of the volume in the ZFS namespace. The size represents the logical size as exported by the device. By default, a reservation of equal size is created.
Reading http://zfsonlinux.org/example-zvol.html
Never tried (or even thought of trying) to partition "something" created with "zfs create" under FreeBSD.. Don't think I can do that - I don't have block devices..
A VM given a zvol can partition it just like any other disk. dunno about freebsd, but on linux i can also access the partitions from the ZFS server (although i wouldn't want to mount one RW while the VM was running). # ls -l /dev/zvol/export/{sid,sid-*} brw-rw---T 1 libvirt-qemu kvm 230, 144 Oct 17 15:46 /dev/zvol/export/sid brw-rw---T 1 root disk 230, 145 Sep 8 17:10 /dev/zvol/export/sid-part1 brw-rw---T 1 root disk 230, 146 Sep 8 17:10 /dev/zvol/export/sid-part2
Anyway, would a zvol be significantly better than a file in the zfs as I do now?
performance wise? yes, definitely management convenience? almost certainly. e.g. zfs snapshot instead of qemu-img snapshot. craig -- craig sanders <cas@taz.net.au> BOFH excuse #372: Forced to support NT servers; sysadmins quit.