-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files shared from ZFS are mysteriously marked "sparse", breaking Windows VHD files. #316
Comments
Did you set I recall testing Windows10 backup tool to ksmbd, and something like this should do the trick:
It was on ext4 though. Can you test on ext4 to make sure it's not some weird interaction with ZFS that is causing issues ? |
I already had I tried creating a zvol for that share, and formatting the zvol ext4, and that allows Windows to create the VHDX file without it getting marked as sparse. The Windows Image Backup ( ksmbd-ext4-zvol-not-sparse.pcapng.gz |
I tried setting that location as backup target again, and when it went to check the location for usability, it gave a much shorter pcap, just a session setup request. ksmbd-ext4-zvol-session-setup-fail.pcapng.gz
Here's the current config. It also now gives a kernel oops:
|
@DanaGoyette Can you check your ksmbd have this patch ? |
If I'm guessing correctly about how to check, maybe Proxmox doesn't have that change in yet. See their changelog I'm not sure how to rebuild Proxmox's kernel, so I may have to just wait for them to pick up that null pointer dereference. |
Maybe, yes. It seems like they are different issues. Let me check your dumps first. |
Have you checked it with samba ? |
With plan Samba, both the VHD creation tool and the Windows Image Backup work with the ext4 zvol, as well as with a normal ZFS filesystem. I'll have to grab a pcap of those sometime. |
@DanaGoyette Thanks for your check! Could you please help me reproduce this issue to check it at detail ?
|
It's built into Windows:
The system image backup does tend to take a long time, depending on source and target and network speed, and its progress bar is rather useless. I usually leave only the system image enabled, that is, only the bottommost checkbox, not any of the libraries. https://www.ionos.ca/digitalguide/server/configuration/windows-11-backup/ The VHD creation tool will be much easier to reproduce with, though... it fails quickly, rather than much later as with the system image backup. |
I finally got around to buying a second RDMA-supporting NIC, so I'd like to try it out, but what I can find online seems to say that RDMA requires ksmbd, not userspace smbd. I'd like to try ksmbd again, but are there any updates to this issue? If nothing has changed, I won't bother swapping NICs around yet. |
@DanaGoyette Can you try to check it with ext4 or xfs?, not zfs |
ZFS violates the kernels licene. And zfs is not in linux kernel mainline, This is completely unsupported. |
I was having a miserable time trying to get the leftover system image backup tool in Windows 11 to work on a ksmbd-shared ZFS directory. It would repeatedly fail with various cryptic error messages, despite
tcpdump saying that it was creating the vhdx file just fine.
The same backup job works just fine with the old Samba.
When one result for one of the error codes said to go create a VHD file and set Windows to back up to that instead, I tried to create one on my ZFS share:
Start -> type "disks" -> Manage Disks and Volumes -> fill out with a share as the location -> click Create.
And voila, I finally got a useful error message!
Aha, there's the problem!
Double-checking with tcpdump, it looks like Windows is requesting to create the file with file attributes 0x0, and getting back a file with file attributes 0x220 (requires archived: yes, sparse: yes).
ksmbd-zfs-why-sparse.pcapng.gz
I already tried setting
share:fake_fscaps = 0
, but that didn't change anything.I'm using Proxmox (Debian 12), but I had to build a newer ksmbd-tools because the one included in Debian showed zero files in any of my shares.
The text was updated successfully, but these errors were encountered: