ZFS on OSX and Windows

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE

ZFS is a perfect solution now for mutual use (important data, large data ex 20TB disks, redundancy with copies=2 or encryption with a key per filesystem) or disaster backups (external offline - beside backup syncs)

ZFS on OSX or Windows is up to date Open-ZFS 2.2.3 with release candidate beta state but mainly due driver/integration/installer issues.
If you find problems, report to the zfsonosx or zfsonwindows issue trackers


How do I handle ZFS on Windows USB disks
- I always name usb pools "usb"
- I create three batch files on the desktop

poolstate.bat with file content:
zpool list
timeout /t 5

import_usb_pool.bat with file content:
zpool import -f usb
timeout /t 5

export_usb_pool.bat with file content:
zpool export -f usb
timeout /t 5

Execute the file via a mouse right click and "run as administrator"
Prior an unplug, export or check state as ZFS hangs (reboot required) when you just unplug a single disk pool
 
Last edited:
  • Like
Reactions: smithse79

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
OpenZFS 2.2.3rc3
  • Fix input of passwords
  • fix suspended pools block reboots
  • minor smb fixes
I have had problems to install as the former driver
/windows/system32/drivers/OpenZFS.sys from the former version seems to be blocked.

I had to do a "manual" deinstall
-/windows/system32/drivers/OpenZFS.sys rename to openzfs.xx (rename possible, delete not)
- reboot
- remove OpenZFS Storagevolumes in device manager
- Installation of rc3
- ok
 

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
New release of ZFS on Windows zfs-2.2.3rc4, it is fairly close to upstream OpenZFS-2.2.3
with draid and Raid-Z expansion


rc4:
  • Unload BSOD, cpuid clobbers rbx
Most of the time this is not noticeable, but in registry-has-changed-callback
during borrowed-stack handling, rbx changing has interesting side-effects,
like BSOD at unload time.
This means 2.2.3rc1-rc3 can have BSOD at unload time. If you wish to avoid that,
rename Windows/system32/drivers/openzfs.sys to anything not ".sys", then reboot.
The system will come back without OpenZFS, and you can install rc4.


btw
Open-ZFS on OSX and Windows is still rc/ beta.
Problems are mainly around OSX or Windows integration not ZFS.

Try it and report problems to reach a stable state asap.
Issues · openzfsonwindows/openzfs
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
Am currently reactivating status and alert reports in napp-it cs on Windows via tls email, normally quite complicated..

In Windows, you can send TLS mail directly from powershell.
Edit the following script and replace =xx= values

Code:
$fromEmail = "=from="
$toEmail = "=to="
$subject = "=subject="
$body = "=body="       # mailbody
$Password = "=pw="

$smtpServer = "=smtpserver="
$smtpPort = =port=   #  587

$mailMessage = New-Object System.Net.Mail.MailMessage($fromEmail, $toEmail, $subject, $body)
$mailMessage.IsBodyHtml = $true

$smtpClient = New-Object System.Net.Mail.SmtpClient($smtpServer, $smtpPort)
$smtpClient.EnableSsl = $true
$smtpClient.Credentials = New-Object System.Net.NetworkCredential($fromEmail, $Password)

try {
  $smtpClient.Send($mailMessage)
  Write-Output "success"
} catch {
  Write-Error "send error: $($_.Exception.Message)"
}

Open a powershell admin terminal

1. allow script execution:
Set-ExecutionPolicy unresticted

2. edit mailtemplate.ps1 and replace =from=, =to= etc
with your values

3. start script
/path/mailtemplate.ps1

4. disable script execution
Set-ExecutionPolicy resticted


##
If you want to use gmail:
##################
- Login to your account
- enable 2FA
in the 2FA area you can create an app password
Use this app password together with your accountname xyz@gmail.com to send mails

For a different from, create an alias at gmail
 
  • Like
Reactions: unwind-protect

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
Development of Open-ZFS on Windows has reached a next step.
New Release candidate Open-ZFS 2.2.3 rc5 on Windows

it is fairly close to upstream OpenZFS-2.2.3

rc5:
  • VHD on ZFS fix
  • fix mimic ntfs/zfs feature
  • port zinject to Windows
  • fix keylocation=file://
  • fix abd memory leak
A ZFS Pool is now detected of type zfs and no longer ntfs
ZFS seems quite stable. Special use cases, special hardware environments or compatibility with installed software needs broader tests.

If you are interested in ZFS on Windows as an additional filesystem beside ntfs and ReFS, you should try the release candidates (for basic tests you can use a USB device if you do not have a free partition) and report problems to the OpenZFS on Windows issue tracker or discuss.

Jeder der Interesse an ZFS on Windows hat, sollte das installieren und Probleme im Issue Tracker oder Issue Discuss melden
 

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
In the meantime there are two problems discovered with Open-ZFS on Windows 2.2.3 rc5
- a compatibility problem with AOMEO backupper (crash after setup)
- zfs get mounted does not return a value

rc6 is underway to adress these

please report all remaining problems to the issue tracker or discuss
Releases · openzfsonwindows/openzfs (github.com)
 
Last edited:
  • Like
Reactions: unwind-protect

Koop

Well-Known Member
Jan 24, 2024
402
302
63
I was reading up on the Windows versions, sounds dangerous but really cool. I hope they are able to get it working without major issues eventually.
 

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
Open-ZFS 2.2.3 rc6 für Windows


Open-ZFS 2.2.3 rc6 für Windows
Releases · openzfsonwindows/openzfs

Avoids a BSOD problem on updates when AOMEI backupper is installed
(disables zvol support in registry)

what I have found
keyload via prompt when keysource is file works now
echo "1234" | zfs load-key -L prompt tank/data

Where I still have problems:
(Please report all remaining problems in issue tracker)
  • Snap access via Explorer ex in p:\.zfs\snapshot\snap (Explorer hangs)
  • Remote Replikation problems with netcat and Free-BSD, OSX, Linux,Illumos from/to Windows (tried nc64 1.12, nmap netcat and cygwin64 netcat.
 

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
Newly discovered problems with file rename, robocopy and rclone,

This shows that it is essential that many are testing the release candidates that becomes better and better to find and report remaining problems.
 

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
File systems under Windows

1. *FAT*

This is basically the medieval market.
Nothing about it that makes a file system particularly fast or secure.
Advantage: Any Windows or third-party OS can use it.

2. NTFS
This has been the standard Windows file system since Windows NT.
One of the better file systems with very good compatibility between Windows versions and is bootable.
However, it lacks the two crucial improvements of newer file systems such as ZFS, which was developed by Sun for Solaris around 20 years ago.

- it cannot guarantee atomic write operations.
These are the smallest write actions that must never be carried out only partially, such as writing a stripe across the disks of a RAID or writing a data block and updating the associated metadata.

- it cannot detect faulty data blocks.
e.g. silent data errors, uneven mirrors or errors in the chain RAM > driver > controller > cable > disk.

These two problems can be controlled with copy on write and real-time checksums on metadata and individual data blocks.

3. ReFS
In addition to btrfs and ZFS, Windows ReFS (Resilent FileSystem) supports both. It is available in Windows Server. The refs.sys driver is also included in Windows 10/11.

You can therefore also use ReFS in Windows 10/11 by
- using a commercial partition tool or Windows Server to format
- activating ReFS via a registry hack
- using "Dev-Drive" in the current Windows 11 23H2. These are ReFS volumes for developers who want something particularly fast/secure. I see it as a broad beta test. ReFS is supposed to be fully integrated into Windows 11 and will also be bootable in the future.

To create a ReFS dev drive:
- Create a volume, assign a running letter e.g. R and format it e.g. via Powershell and
Format-Volume -DriveLetter R -DevDrive

You can check the formatting, especially the ReFS version with
fsutil fsinfo refsinfo r:

Please note
- ReFS is not yet bootable
- ReFS is still being improved, so there are different versions that are not always compatible
Windows 11 23H2 uses ReFS v 3.10 (3.ten)

4.ZFS
Actually the ultimate. Can already be used under Windows but is still beta (release candidate 6).
It is also not (yet) as fast as ntfs/ReFS but has far more features, especially snaps, encryption/compress/dedup, sync write and hybrid pools for small io, plus much easier handling.
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
If you want to use ReFS:
ReFS is getting new features, fixes and soon bootable.

Partly if you mount ReFS in r/w mode, it is automatically updated without mount option then in an older Windows, so ReFS is like Windows: Update only, no downgrade.

 
  • Like
Reactions: T_Minus

smithse79

Active Member
Sep 17, 2014
207
39
28
45
I just found this and am super excited. I am a Windows Admin by trade and not really into Linux. However, I have been running ZFS for over 10 years on CentOS and loved the FS, but not the OS. I'm running TrueNAS Core now and not really a fan. Being able to run my file server on Windows would make my life immeasurably simpler. I will be watching this closely
 

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
OpenZFS on Windows 2.2.6 rc6

Hold up!

So the mount/unmount code was completely re-written, which is a large amount of source code changes. There is a
higher than usual risk for regression. (As in, BSODs).
But if everything works, the mounts should be more recognised by the system, you should be able to run both
zfs mount as well as mountvol and see driveletter mounts (like E:\\) as well as lower dataset mounts (E:\\dataset)
The way Storport (zvol support) interacts with the driver also had to change.
Unmounting (and exporting) is now without special hacks, and much cleaner. There might still be corner case issues remaining.
Changing properties driveletter and mountpoint should in theory re-mount the datasets on the fly, without needing to export/import.

rc6:
  • Fix leaks of SecurityDesciptor
  • Fix vnode leaks, root znode
  • Explorer stackoverflow fix in reparse points
  • Mount / Unmount, snapshot mount fixes
  • set driveletter remount fixes
  • Deep stack fix for Storport query
  • Fix weird extra newlines in command output
  • Attempt fix to work with VSS
  • New tunable windows_load_security
New tunable windows_load_security can be set to 0 to skip loading Security Descriptors from Storage, in the
hopes of being able to import older OpenZFSOnWindows pools where they were wrong.


Jorgen Lundman
I have posted a new build for rc6.
I believe I have fixed setting driveletter, mounting of snapshots, some unmounting issues.
So if you can, please check your issues again, even if I didn't list them, and remind me of any issues that are still present.


 
  • Like
Reactions: itronin

Koop

Well-Known Member
Jan 24, 2024
402
302
63
Nice, just really cool to see this getting plugged away at. Big kudos to the big brains on this.
 

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
OpenZFS on Windows 2.2.6 rc7
  • Delayed read/write could BSOD.
Just one fix, but felt it was big enough to push a fix for right away.
 
  • Like
Reactions: TRACKER

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
Hope that ZFS on Windows becomes usable soon as there are two unique features on Windows systems

1. ntfs ACL
Only Solaris/Illumos based SMB s´servers come near. Linux/SAMBA and Posix ACL are a pain.

2. SMB direct/RDMA
Much faster as ip based SMB with a much lower latency and CPU load. SMB direct on Linux/SAMBA is not ready.
Usually you need a Windows Server as SMB server. Windows 11 Pro can be a client only.

I have seen that Windows 11 Pro for Workstations claims SMB direct support over Windows 11 Pro.
Has anyone tested this ex with one of the many new RDMA capable nics 20G+ to do SMB direct between Windows clients without a Windows Server?


update
Use Windows Server 2022 Essentials as SMB server for a high performance workgroup with SMB Direct. It is nearly in the price range of a better Windows 11 but limited to single CPU, 10 Cores and 25 users. No extra Cals or CPU/Core licence cost

ZFS performance with SMB direct
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,468
1,356
113
DE
Would be desirable if OSX and Windows can become platform nr 3 and 4 for OpenZFS

1730246374834.png
 
Last edited: