SOLVED Share zfs snapshots with cifs

Status
Not open for further replies.

hikingpete

Dabbler
Joined
Sep 2, 2015
Messages
22
I have created a dataset that is shared with CIFS. I've configured a periodic snapshot task for its pool. I can see snapshots at /mnt/[pool]/[dataset]/.zfs/snapshot/. Changed files seem to be visible to WIndows' "Previous Versions" interface.

What I'm trying to do is configure a (additional) CIFS share that shows the snapshots of this dataset. I have configured two shares as follows:
{path: /mnt/pool/dataset, name: dataset},
{path: /mnt/pool/dataset/.zfs/snapshot, name: datasetSnapshots}

When I try to access the datasetSnapshots share using smbclient I get the error message 'NT_STATUS_NOT_SUPPORTED listing \*'. My best guess is that this is a result of '.zfs' appearing in the 'veto files' configuration setting that I can't seem to control. How can I verify this, and what do I do if this is indeed the case? The file /etc/local/smb4.conf seems to be overwritten every time I restart the CIFS service.
 
L

L

Guest
You are correct. The smb4.conf gets overwritten. I would love to see this go into a feature request for the future. Current behavior is that snapshots not be exposed to users.
 

hikingpete

Dabbler
Joined
Sep 2, 2015
Messages
22
Thanks for the response, but I'm still struggling with what my next step is. I need to enable access to the snapshots - is my only option to abandon FreeNAS then? Can anybody recommend any alternatives?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,543
Snapshots are presented through 'previous versions' on Windows client (through vfs_shadowcopy2). No extra config needed if I recall correctly.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
Snapshots are presented through 'previous versions' on Windows client (through vfs_shadowcopy2). No extra config needed if I recall correctly.
You do need to choose which snapshot task is exposed, since only one can be. I'm not sure if the last-created one is still automagically chosen, but the option of manually choosing one was added in one of the 9.3.0 releases.

No extra config beyond that.
 

hikingpete

Dabbler
Joined
Sep 2, 2015
Messages
22
After looking a bit further at Windows Previous Versions, I realize now that I can open previous versions of folders - and indeed the entire share itself. I hadn't realized this, and now I understand why nobody has bothered with this feature. Thanks everybody for trying to help me out here.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
After looking a bit further at Windows Previous Versions, I realize now that I can open previous versions of folders - and indeed the entire share itself. I hadn't realized this, and now I understand why nobody has bothered with this feature. Thanks everybody for trying to help me out here.
It does have the major limitation of only being able to export a single snapshot task. I don't remember why that was, but it was a complicated scenario.
 

hikingpete

Dabbler
Joined
Sep 2, 2015
Messages
22
That's an interesting point, and would certainly be a nice feature. It would be very nice to have a small number of high-frequency snapshots, and then more lower frequency snapshots.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
That's an interesting point, and would certainly be a nice feature. It would be very nice to have a small number of high-frequency snapshots, and then more lower frequency snapshots.
You'll have to choose which of those snapshot tasks you wish to export, for the foreseeable future.
 
Status
Not open for further replies.
Top