Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

Accessing .zfs/snapshots through SMB does not work

Description

TrueNAS asked me to report this so here we go.

Setting
“zfs set snapdir=visible [dataset name]”
and then through SMB, trying to access the folder
.zfs/snapshot/[a snapshot]
will make my ssh window go a little crazy.

TrueNAS also asked me to create a ticket here and attach all dumped core files in /var/db/system/cores/

Problem/Justification

None

Impact

None

Attachments

3
  • 21 Apr 2024, 11:17 AM
  • 21 Apr 2024, 04:03 AM
  • 19 Apr 2024, 04:47 PM

is duplicated by

Activity

Show:

Andrew Walker April 23, 2024 at 2:11 PM

Also two of my Windows machines don’t show the previous versions tab at all (a third machine does), so the official method may not even work for everyone.

This sounds like potentially a configuration issue (GPO) on your Windows client.

VSS doesn’t work there

man mount_smbfs on macos. It has ability to mount SMB shares based on snapshots.

ajp_anton April 21, 2024 at 1:04 PM

Thanks, now it works. Or at least it doesn’t cause stack traces, and accessing the folder is much faster. It still shows the snapshot as empty the first few times I try to access it, but after it finally shows the contents, it seems to do so consistently. Maybe it’s a Windows-thing.

I’m accessing it with Windows just because I’m curious and checking out this whole snapshots via SMB feature. Also two of my Windows machines don’t show the previous versions tab at all (a third machine does), so the official method may not even work for everyone.

There’s going to be a Mac using this at some point, and according to the internet it pretty much has to use this folder as VSS doesn’t work there, but I don’t have a Mac to test with so Windows it is for now. You’re saying there’s another way?

Andrew Walker April 21, 2024 at 11:18 AM

I’ve uploaded new replacement packages as Samba_packages2.zip

Andrew Walker April 21, 2024 at 10:44 AM

Out of curiosity, why are you trying to access the ZFS snapshot directory directly on Windows? The supported method for retrieving previous versions of files is via shadow copies (which is works on Windows, Linux, and MacOS – although in latter two cases is slightly cumbersome).

I’ll have updated packages for you to test by end of day today or early tomorrow.

ajp_anton April 21, 2024 at 4:10 AM

I stand corrected on expose_snapdir. It’s just Windows that randomly shows the folder as empty, after “working on it” for a while. I’m guessing the reason it takes a while are the stack traces.

I uploaded a new dump2.zip containing the core dumps when using your samba package. Not sure if I should use the debug version here, I’m just using the regular one.

Complete

Details

Assignee

Reporter

Labels

Department

Services

Priority

More fields

Katalon Platform

Created April 19, 2024 at 4:49 PM
Updated June 10, 2024 at 12:20 PM
Resolved April 19, 2024 at 7:42 PM

Flag notifications