zvol vs plain file for VMs
ashish at FreeBSD.org
Wed Dec 24 09:27:47 UTC 2014
On Mon, 22 Dec 2014 22:14:11 -0500, kpneal at pobox.com said:
| On Mon, Dec 22, 2014 at 10:17:31PM +0530, Ashish SHUKLA wrote:
|| On Mon, 22 Dec 2014 12:34:07 +0100, Nikos Vassiliadis <nvass at gmx.com> said:
|| | On 12/20/14 06:41, Ashish SHUKLA wrote:
|| || On Fri, 19 Dec 2014 19:59:32 +0100, Nikos Vassiliadis <nvass at gmx.com> said:
|| || | Hi,
|| || | I have to convert a mail server to a VM and I don't know what kind of
|| || | storage to use, a plain file or a zvol?
|| || | Are there any pros in using ZVOLs instead of plain files?
|| || | Thanks, Nikos
|| || I don't use FreeBSD for VMs, but theoretically plain file will have filesystem
|| || overhead which ZVOL won't.
|| || HTH
|| | Hi,
|| | Thank you for your reply Ashish!
|| | When you say overhead, you mean overhead on disk or in RAM? could you
|| | explain a bit more?
|| Overhead as in, read/writes to file will go through filesystem driver to block
|| devices, which involves traversing filesystem structures, compared to ZVOL
|| which is likely to be contiguous and is exposed as a block device.
| Wait, is that correct? I doubt it.
| A zvol is created with the 'zfs' command. The man page doesn't say it
| allocates space up front, but rather it says it sets a reservation. This
| is probably the same meaning of reservation that is used for normal datasets.
| It doesn't allocate space on disk, but instead makes a note about basically
| quotas for future allocations of space.
| Furthermore, for the space on disk to be contiguous it must not be COW.
| But ZFS is a COW filesystem. It cannot be both COW and contiguous in use.
| Also, if a zvol bypasses the filesystem code then it wouldn't make sense
| for zvols to be managed with the 'zfs' command. The zpool command would
| make more sense since zpool operates at a lower level than the zfs command.
| The practical upshot of all of this is to say that I don't know what the
| benefit is, but I also would not put any money on the previous response's
| correctness. It can't as simple as described.
Sorry, I confused with ZVOLs with LVM LVs, and misunderstood COW's
implication. My since apologies for the incorrect reply.
Thanks for clarifying it.
Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0
Sent from my Emacs
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 818 bytes
Desc: not available
More information about the freebsd-questions