Access a ZFS volume in Windows?

28

16

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.

Doug S.

Posted 2011-05-26T23:09:50.787

Reputation: 305

What do you mean by "direct attached"? By Ethernet? – sblair – 2011-05-26T23:19:08.360

Ah, I see the single USB port now. It says that it supports PC, Mac and Linux, so presumably a driver/software is provided? Do you have control over the file system? – sblair – 2011-05-26T23:29:48.473

It's a good looking enclosure :) – Dmitri Nesteruk – 2013-11-30T14:28:24.893

Answers

8

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.

Majenko

Posted 2011-05-26T23:09:50.787

Reputation: 29 007

This is the option i opted for, before seeing this post, now im here, trying to figure out how to do the mount, before i power up all 6 of my actual physical zfs drives, to mount them on a vbox solaris, to share them off for NAS access on the host win7ultt64. trying to figure out this last part. im thinking the zfs-win solution is just steering me away from this setup. anybody figure out how to actually access them on win host through the vbox solaris? Is that using RAW disk method or something? – Brian Thomas – 2017-01-26T03:46:24.637

1@BrianThomas you run a vm with all the zfs pool disks as raw disks, then in the VM you set up some way to share, like nfs, samba, sftp/sshfs, iscsi, and then just use it from any other machine on the network with whatever client programs support it (such as samba and windows sharing). And make sure the VM doesn't use unsafe caching. – Peter – 2017-03-20T19:01:12.793

You can attach ZFS filesystems to Windows with software alternatives that are available to Windows that enable read-write access, not just through VM solutions. Just look at zfs-win for example which uses the Dokan libraries, which also enables Windows to read Linux formatted drives like Ext2/4, by hooking to ExFAT.sys in Windows. – None – 2017-06-02T18:30:20.763

@user94959 5 years ago you couldn't. You may notice this question is that old, as is the answer. – Majenko – 2017-06-02T21:58:32.753

20

zfs-win

… 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.)

Graham Perrin

Posted 2011-05-26T23:09:50.787

Reputation: 1 147

The link to Dokan is broken, and from the name alone I'm not sure what's being referred to (a lot of different things come up when you search it on Google). – Wowfunhappy – 2018-08-15T16:32:48.637

Nevermind, I found it, see suggested edits.

I don't suppose there's a precompiled version of zfs-win available anywhere? – Wowfunhappy – 2018-08-15T16:41:20.767

+1 just because although I haven't tried the ZFS support, I've been looking for something like this for ages. Native SFTP mount support without having to pay some nasty big company? I'm all over it like hyenas on a downed water buffalo. – Kent Fredric – 2012-07-15T08:30:01.347

I was just about to suggest this. I believe there are also FUSE versions for linux variants to access ZFS as well. – Matt H – 2013-01-18T02:26:19.380

12

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.

notpeter

Posted 2011-05-26T23:09:50.787

Reputation: 899

I was able to set this up pretty easily on VirtualBox, but one thing I'm concerned about is the lack of support for SMART commands. If I try to run smartctl on my drive that's passed through raw, it still shows up as Device Model: VBOX HARDDISK. If smartctl commands aren't going through, does that mean that ZFS is limited to a subset of its usual commands as well? – brismuth – 2016-04-11T22:01:24.487

I believe that OpenZFS under linux only uses read/write/checksum failures to assess disk failure. ZFS on Solaris will respond to predicted failures triggers from fmadm (which monitors SMART data) but I'm pretty sure SMART data is not directly considered under linux. – notpeter – 2016-04-16T03:53:22.550

9

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

https://github.com/lundman/zfsin

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

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

jjw

Posted 2011-05-26T23:09:50.787

Reputation: 191

8

I'll bet by the age of this thread that you've already moved on, but I'll put my two cents in for the sake of anyone else who still has questions on this matter.

I have built several NAS machines using ZFS as the file system. One of the easiest to use is either FreeNAS or NAS4Free. I've also used Solaris before the previous two offered de-duplication and encryption in their ZFS release versions. As was mentioned, you can use the Atom processors with success as a low power motherboard solution. Just be sure to feed them as much RAM as the board can support to make up for the lack of power from the CPU. Obviously, a NAS isn't quite as fast as a local disk, but it's better than not reaping the benefits of ZFS at all.

I've used a VM to access some USB sticks that I in turn formatted with ZFS in a RaidZ pool. I then shared them tho the host machine through a virtualized LAN connection. While it did work, I don't know what kind of reliability or performance issues you would be up against doing something like that. USB drives are so inherently slow that no worthwhile data would have been obtainable from that setup... so, I never bothered to test it. However, I imagine there would be a lot of CPU overhead doing something like that.

In all, if you have the budget, I would suggest doing a NAS over a VM. Last month I built one with a small Chenbro case and a Supermicro Atom board. I fed it 4GB of RAM and 4x3TB SATA drives in RaidZ. It bench-marked at 135MBps sustained. I've not performed any other tests.

Craig

Posted 2011-05-26T23:09:50.787

Reputation: 191

1

Using a ZFS aware OS in a virtual machine is your best bet. ZFS is pretty robust and supports importing and exporting pools form different OSes so there should be no massive failures or nightmares doing it.

jlliagre

Posted 2011-05-26T23:09:50.787

Reputation: 12 469

1

I have completely reliable zfs read write access in windows 7. Windows 7 thinks it is an NTFS share over SMB. Here's how. The NAS is an Ubuntu 13.04, with native zfs installed. Not fuse, via the ubuntu-zfs metapackage, which installs 0.6.1-1~raring package. This is running on a 32 bit old desktop computer resuscitated out of an old closet. 1 gig of ram, soon to be upgraded to 2gb. MSI 845-G Max motherboard. Attached to this is an 8 drive Sansdigital box, connected via portmultiplier. In there is 4 3 TB barracuda drives. And a 120 GB Vertex 3 SSD as a cache and a log. I created a zpool of raidz2 of the 4 disks, plus the cache and log. Then I executed :zfs set sharenfs=on 'zpoolname' This gives a mild error that the share may or may not work. THen I create folder inside my zpool in the "computer" device of root nautilus. Then I share the folder. Voila .....

A network accessible zfs inside windows 7, which reports it as NTFS. I can do a "map network drive" in windows 7, and I now have a 10 terabyte ntfs drive in windows 7. Obviously it is not bootable. And it is only as reliable as all of the hardware it is composed of. But, I have dedup on, compression on, and it should survive a loss of 1 or 2 of my 3 Terabyte drives.

I hope this works for someone else.

John.

Posted 2011-05-26T23:09:50.787

Reputation: 19

It is not access to ZFS from windows, it is access to ZFS from Ubuntu and share with SAMBA = SMB (with nautilus GUI) - https://en.wikipedia.org/wiki/Samba_(software).

– osgx – 2018-05-29T16:03:14.083

0

Aparrently there is a commercial tool claiming read support for 'Sun ZFS'...

http://www.ufsexplorer.com/download_stdr.php

"as well as access to files on Sun ZFS,"

Not sure how good it is / haven't tried it yet.

Dreamcat4

Posted 2011-05-26T23:09:50.787

Reputation: 1 261

0

I don't think it's possible at the moment. I haven't found ZFS drivers for Windows, but the code is open-source so it should be possible to write one.

Andrew Cooper

Posted 2011-05-26T23:09:50.787

Reputation: 1 249

1@naught101 fortunately MacZFS and its successor O3X were not developed by Oracle. The latter is based on and a contributor to the OpenZFS project, which is unambiguously under the CDDL. Now, that licence is GPL-incompatible, but even the notoriously-picky FSF agrees it is a Free Software licence. Oracle's newer zpool versions aren't compatible, of course, but the only feature that seems to be a big issue there is encryption, because the OZFS feature-flag implementation has allowed most features to be replicated without increasing the zpool version. – Darael – 2015-12-31T15:11:12.123

1*debatably open source, in the way oracle "open source" products usually are. – naught101 – 2013-09-18T14:10:11.213

0

I've recently tested this on my Gentoo desktop at work. Create a zvol on a *nix of your choice, format it to NTFS and share via samba. Active Directory permissions work fine, the only slight annoyance is samba has to be stopped to rollback a snapshot, but that's not really a big deal as it can be done in seconds. My plan is to create a live copy of all my users data and snapshot it daily. More as a means of reclaiming accidently deleted files than a true backup. Now I just need to talk them into letting me buy another server.

anon

Posted 2011-05-26T23:09:50.787

Reputation: 1