ZVOL or equivalent

Moderators: jhartley, MSR734, nola

ZVOL or equivalent

Post by grahamperrin » Sun Nov 11, 2012 3:23 pm

Following an interesting discussion about virtual machines in irc://irc.freenode.net/#zfs and irc://irc.freenode.net/#zfsonlinux I read:


With ZEVO Community Edition 1.1.1, option -V is invalid for the zfs create subcommand.

So I wonder whether anything equivalent is planned …

Postscript: in the MacZFS area, under Snow Leopard ZFS Research (2009-09-02):

Germano Caronni wrote:

zfs-119 at least has no suggestion of support for zvols. Not sure about later versions. …
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

In the ZEVO wiki

Post by grahamperrin » Mon Dec 31, 2012 4:16 am

I'm having a dull moment. Is the following knowledge base item related, comparable to ZVOL?

Using Files For Pool Devices
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: ZVOL or equivalent

Post by ghaskins » Mon Dec 31, 2012 2:41 pm

grahamperrin wrote:So I wonder whether anything equivalent is planned …


Note that as far as I can tell, ZVOLs are really just a convenience mechanism. You can achieve the same concept by using any kind of "block device in a file" on top of ZFS, such as loopback files (linux), vmdk (VmWare, etc), or sparsebundles (OSX). In each of those examples, you effectively end up with the same concept of a zvol (that is, a logical container for blocks that is backed by ZFS data integrity/redundancy). You could turn-around and surface, say, a sparsebundle as an iSCSI LUN (assuming you had an iSCSI initiator for OSX) or use it as a block device for a guest, just like a ZVOL. The difference is, its not wrapped up in a neat ZFS oriented interface. This is somewhat akin to the zfs share[nfs|afp] stuff. Its not that you can't share nfs mount points, just zfs sharenfs makes it simple and easy.

Kind Regards,
-Greg
ghaskins Offline


 
Posts: 52
Joined: Sat Nov 17, 2012 9:37 am

Re: ZVOL or equivalent

Post by rahvee » Sat Feb 16, 2013 8:27 pm

@ghaskins - You're partially right, not really. When you create a zvol, you're creating a new zfs filesystem, with its own zfs properties, and no filesystem mounted. Some of the most obvious distinctions there are, different auto-snapshot properties if you want, different compression & sync options, different blocksize (by default a zvol has 8k blocksize which more accurately represents a physical disk instead of the 128k blocksize which is default for zfs filesystem)... And a zvol automatically creates the refreservation appropriate for your volume size, for the intended purpose of ensuring the zvol won't run out of space just because some other filesystem in the pool consumes space. In a zvol, you get to bypass all the posix filesystem code, which contributes also a performance benefit.

While many people, including myself, will get by just fine by creating a zfs filesystem, and putting a vmdk file inside the filesystem, it's definitely not the same thing as creating a zvol and using a vmdk wrapper around the raw zvol. A vmdk wrapper around a zvol raw device performance, reliability, and feature set, is measurably better than a vmdk file inside a filesystem.

Still, using the vmdk file inside the zfs filesystem is a good solution (much better than what mac has built-in without zevo). So most people, including myself, will be happy to move forward this way, and just wish we could use the zvol for the marginal extra benefits that it provides. At least, without the zvol option available, I can still do COW snapshots and send/receive. Those are the biggest most important features IMHO.
rahvee Offline


 
Posts: 2
Joined: Sat Feb 16, 2013 11:52 am

Re: ZVOL or equivalent

Post by ghaskins » Sat Feb 16, 2013 9:00 pm

rahvee wrote:@ghaskins - You're partially right, not really. When you create a zvol, you're creating a new zfs filesystem, with its own zfs properties, and no filesystem mounted. Some of the most obvious distinctions there are, different auto-snapshot properties if you want, different compression & sync options, different blocksize (by default a zvol has 8k blocksize which more accurately represents a physical disk instead of the 128k blocksize which is default for zfs filesystem)... And a zvol automatically creates the refreservation appropriate for your volume size, for the intended purpose of ensuring the zvol won't run out of space just because some other filesystem in the pool consumes space.


Correct me if I am wrong, but couldn't you emulate this by using a 1:1 mapping between a zfs filesystem and the blockdevice-file? Not as convenient as using zfs to create a zvol, agreed, but functionality wise, you should be able to still achieve everything you mention above (snapshot context, compression, sync options, blocksize, and even reservations) with a 1:1 model.

In a zvol, you get to bypass all the posix filesystem code, which contributes also a performance benefit.


Excellent point. I hadn't really thought of it from that angle...though I'd still take a less convenient and lower performing workaround over the alternative (not being able to back my virtual block devices from a zpool at all) ;)

Kind Regards,
-Greg
ghaskins Offline


 
Posts: 52
Joined: Sat Nov 17, 2012 9:37 am

Re: ZVOL or equivalent

Post by BjoKa » Mon Feb 25, 2013 4:53 pm

grahamperrin wrote:Postscript: in the MacZFS area, under Snow Leopard ZFS Research (2009-09-02):

Germano Caronni wrote:

zfs-119 at least has no suggestion of support for zvols. Not sure about later versions. …


Just to add a data point:

Under MacZFS, support for ZVOLs is on the roadmap. But don't hold your breath, progress is very slow due to lack of developers. MacZFS is essentially a 1.5 man show with 1-2 releases per year. (Next maintenance release probably around April.)
BjoKa Offline


 
Posts: 14
Joined: Sat Feb 02, 2013 3:18 pm
Location: Germany

Link

Post by grahamperrin » Wed Jul 10, 2013 8:34 am

BjoKa wrote:… Under MacZFS, support for ZVOLs is on the roadmap. …


Noted with thanks, in the MacZFS prototype area, progress: ZVOLs do not show in diskutil or Disk Utility arbitration
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron