Access a ZFS volume in Windows?

You'd think this would have been asked but I can't seem to find it so...

Let's say I have a ZFS setup in this enclosure (8 bay USB3 JBOD):
https://web.archive.org/web/20111018042134/http://www.sansdigital.com/towerraid-/tr8uplusb.html

Now, I'm going to be running it on my Mac direct attached but I'd like to be able to access the files when I boot into Windows as well. With HFS+ volumes Apple was kind enough to provide a means for doing this. However, I can't find one for ZFS.

The only solution I've come across is using Open Solaris in a Virtual Machine to mount the drives. However, I've also heard more than a few nightmares about doing this and it leading to massive failures... Yeah, kind of the exact opposite of what I want.

So, essentially, what is the current best means of accessing a ZFS volume attached to Windows? I'd be happy with read-only access if necessary.

Oh, intended OS is Windows 7.


Solution 1:

There is no OS level support for ZFS in Windows.

As other posters have said, your best bet is to use a ZFS aware OS in a VM.

Options are:

  • Open Solaris
  • FreeBSD
  • Linux (through zfs-fuse, or zfs-on-linux)

One other possibility is to get hold of a small low-powered computer (say an Atom based system) to connect to the drives and act as a network head unit to the disks sharing the data out through the network through a standard protocol like CIFS (Samba). Then you can run the ZFS aware OS direct on the metal.

Solution 2:

zfs-win

  • https://github.com/dominicusin/zfs-win (automatically exported from https://code.google.com/archive/p/zfs-win/ – thanks to Tiberiu-Ionuț Stan for the hint)
  • GNU GPL v2
  • requires Dokan

… read-only drive can be mounted …

— and I guess that further development might enable write access.

Following installation on Windows 7:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>chdir "C:\Program Files (x86)"

c:\Program Files (x86)>zfs-win
ZFS for Windows

usage:
  mount <mountpoint> <dataset> <pool ..>
  list <pool ..>

examples:
  zfs-win.exe mount "m:\" "rpool/ROOT/opensolaris" "\\.\PhysicalDrive1" "\\.\PhysicalDrive2"
  zfs-win.exe list "Virtual Machine-flat.vmdk"

Whilst editing the compatibility section of the OpenZFS wiki I was advised that zfs-win can not read ZFS pool version 28. (I don't do code, so from the source I can't tell which version is supported – sorry.)

Solution 3:

There's a native ZFS implementation for Windows (10 only?) available at:

https://github.com/openzfsonwindows/ZFSin

The discussion here indicates that it's a high-quality port:

https://news.ycombinator.com/item?id=15549190

Solution 4:

ZFS in virtual machine can work just fine if follow one simple rule never ever lie to ZFS. ZFS goes to great length to keep your data from getting corrupted (checksums, copy-on-write, dittoblocks, mirrors or raid-z, etc) so you should do everything in your power to let ZFS directly access your disks. All the horror stories of virtualized ZFS issues come from some level of buffered IO from virtualization software buffers, disk controller cache or even windows with writethrough cache if you're dumb enough to use virtual disks instead of whole raw disks. Each virtualization package does raw disks slightly differently, but VMWare Workstation, VMWare Fusion and VirtualBox all support it without too much effort.

You mentioned attaching it to your Mac, so you could either use something OSX native like ZEVO (formerly Z-410) or run a ZFS virtual machine just like you would from Windows 7. If your moving your pool between mac/windows (ZEVO <-> VM) you'll want to zpool export poolname before switching. No need if your booting the same VM on both sides. You should strive to have no virtual disks (vmdk files) hosted on HFS+ or NTFS but instead make one of the external disks (or an partition of your internal disk) bootable so you can boot it non-virtually without too much effort.

Of note if your Mac has Thunderbolt you can use that instead of USB2 or FireWire to connect multiple disks for ZFS. Something like a SonnetTech Thunderbolt PCIe bridge (ExpressCard or PCIe) combined with an eSATA or SAS card (or even a USB3 card) will be orders of magnitudes faster than regular USB2.