In Homelab (this is beta zfs in windows, with risks):
since family members use windows and I use ZFS on Proxmox host for NAS, this solution has been wanted, and after fair amount of testing, got it to work.
First add an extra virtual or physical hardrive Windows VM or Windows bare metal, for the ZFS file system.
When I add as virtual disk to Win VM I used bus device SCSI and RAW file format.
Then in Windows OS installed from
https://github.com/openzfsonwindows/openzfs
the exe file
https://github.com/openzfsonwindows...-2.2.3rc5/OpenZFSOnWindows-debug-2.2.3rc6.exe
# Go through installation, accepting the question of adding to PATH when prompted
# then per https://openzfsonosx.org/wiki/Windows_pool
# List Disks available
wmic diskdrive list brief
# if second disk not visible use windows Disk Management to mount/enable second new added disk and try listing discs with wmic again.
# Create pool on second newly added disk (called "disk 1" in my case, disk 0 is windows OS install ) named tank (or other name).
zpool.exe create -O casesensitivity=insensitive -O normalization=formD -O compression=lz4 -O atime=off -o ashift=12 tank PHYSICALDRIVE1
#then do:
zpool.exe import
# should now see pool named tank (or other chosen name).
zpool.exe import tank
# then as normal, but with .exe
zfs.exe create tank/data
# recommend not mounting on separate drive (automatically shows up and D: or E: as default) by following this
https://openzfsonosx.org/wiki/Windows_driveletter
zfs set driveletter=off tank
zpool export tank
zpool import tank
zfs mount tank
# it is now usable at c:\tank\data
You will now have full ZFS functionality just remember to use .exe, incl making snapshots.
zfs.exe send / receive works locally on windows between diffrent data mounts or between local pools if you have more than one pool, with 2.2.3rc6.exe
Install ssh.exe on windows. (google as needed how)
Setup ssh-keygen.exe without password prompt logged in as as Administrator.
Upload the key to Proxmox server and make the server accept ssh login with keys. test ssh.exe login works as planned with no password prompt.
Now I really wanted the ability send through SSH the local win snapshots to Proxmox. The way to do that is WSL.
in Powershell, run as admin per the following:
https://learn.microsoft.com/en-us/windows/wsl/install
wsl --install
reboot
then
wsl --install -d <DistroName>
# I used Debian..![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
# Inside WSL for all commands below
#make sure you are Powershell admin as you enter wsl
#inside wsl prompt don't use the local zpool or zfs
#use
#zpool.exe and zfs.exe
#they will access the mounted zpool / data drive you created in Windows environment, no problem:
#but the zfs.exe send / receive would only work for me with ssh.exe when run inside WSL (I could not get piped zfs.exe send ...| ssh.exe....to work without using WSL.
#create snapshot
zfs.exe snapshot tank/d@test0
#first zfs send [ dest directory is automatically created in first regular zfs send command, at receiving server ]
zfs.exe send tank/d@test0 | ssh.exe root@192.168.X.Y zfs receive proxmoxpool/data@$(date +%m%d%Y-%H%M)
# OBSERVE command line above has 2 exe, and one none .exe, since receiving server is Proxmox but all local commands, inside WSL, are .exe.
#once the first transmission worked successfully, incremental are also possible
zfs.exe snapshot tank/d@test1
zfs.exe send -i tank/d@test0 tank/d@test1 | ssh.exe root@192.168.X.Y zfs receive -v proxmoxpool/data@$(date +%m%d%Y-%H%M)
# ----end inside WSL
# I think it would be good before Windows shutdown
zpool.exe export tank
# if you remember / can script it. Given the beta stage. It needs zpool.exe import after every re-start. (can be automated I read)
Now I just need to create a script inside WSL that can get triggered outside WSL, by windows .BAT / Scheduler, even if WSL is not started by family members, project for later.
P.S.
this is useful,
https://github.com/bahamas10/zfs-prune-snapshots
but be careful, don't forget to specify pool/data, when using the
"zfs-prune-snapshots 1w pool/data"
or similar.
D.S.
since family members use windows and I use ZFS on Proxmox host for NAS, this solution has been wanted, and after fair amount of testing, got it to work.
First add an extra virtual or physical hardrive Windows VM or Windows bare metal, for the ZFS file system.
When I add as virtual disk to Win VM I used bus device SCSI and RAW file format.
Then in Windows OS installed from
https://github.com/openzfsonwindows/openzfs
the exe file
https://github.com/openzfsonwindows...-2.2.3rc5/OpenZFSOnWindows-debug-2.2.3rc6.exe
# Go through installation, accepting the question of adding to PATH when prompted
# then per https://openzfsonosx.org/wiki/Windows_pool
# List Disks available
wmic diskdrive list brief
# if second disk not visible use windows Disk Management to mount/enable second new added disk and try listing discs with wmic again.
# Create pool on second newly added disk (called "disk 1" in my case, disk 0 is windows OS install ) named tank (or other name).
zpool.exe create -O casesensitivity=insensitive -O normalization=formD -O compression=lz4 -O atime=off -o ashift=12 tank PHYSICALDRIVE1
#then do:
zpool.exe import
# should now see pool named tank (or other chosen name).
zpool.exe import tank
# then as normal, but with .exe
zfs.exe create tank/data
# recommend not mounting on separate drive (automatically shows up and D: or E: as default) by following this
https://openzfsonosx.org/wiki/Windows_driveletter
zfs set driveletter=off tank
zpool export tank
zpool import tank
zfs mount tank
# it is now usable at c:\tank\data
You will now have full ZFS functionality just remember to use .exe, incl making snapshots.
zfs.exe send / receive works locally on windows between diffrent data mounts or between local pools if you have more than one pool, with 2.2.3rc6.exe
Install ssh.exe on windows. (google as needed how)
Setup ssh-keygen.exe without password prompt logged in as as Administrator.
Upload the key to Proxmox server and make the server accept ssh login with keys. test ssh.exe login works as planned with no password prompt.
Now I really wanted the ability send through SSH the local win snapshots to Proxmox. The way to do that is WSL.
in Powershell, run as admin per the following:
https://learn.microsoft.com/en-us/windows/wsl/install
wsl --install
reboot
then
wsl --install -d <DistroName>
# I used Debian..
# Inside WSL for all commands below
#make sure you are Powershell admin as you enter wsl
#inside wsl prompt don't use the local zpool or zfs
#use
#zpool.exe and zfs.exe
#they will access the mounted zpool / data drive you created in Windows environment, no problem:
#but the zfs.exe send / receive would only work for me with ssh.exe when run inside WSL (I could not get piped zfs.exe send ...| ssh.exe....to work without using WSL.
#create snapshot
zfs.exe snapshot tank/d@test0
#first zfs send [ dest directory is automatically created in first regular zfs send command, at receiving server ]
zfs.exe send tank/d@test0 | ssh.exe root@192.168.X.Y zfs receive proxmoxpool/data@$(date +%m%d%Y-%H%M)
# OBSERVE command line above has 2 exe, and one none .exe, since receiving server is Proxmox but all local commands, inside WSL, are .exe.
#once the first transmission worked successfully, incremental are also possible
zfs.exe snapshot tank/d@test1
zfs.exe send -i tank/d@test0 tank/d@test1 | ssh.exe root@192.168.X.Y zfs receive -v proxmoxpool/data@$(date +%m%d%Y-%H%M)
# ----end inside WSL
# I think it would be good before Windows shutdown
zpool.exe export tank
# if you remember / can script it. Given the beta stage. It needs zpool.exe import after every re-start. (can be automated I read)
Now I just need to create a script inside WSL that can get triggered outside WSL, by windows .BAT / Scheduler, even if WSL is not started by family members, project for later.
P.S.
this is useful,
https://github.com/bahamas10/zfs-prune-snapshots
but be careful, don't forget to specify pool/data, when using the
"zfs-prune-snapshots 1w pool/data"
or similar.
D.S.
Last edited: