New Dataset in existing CIFS share w/ Snapshots

Status
Not open for further replies.

xCatalystx

Contributor
Joined
Dec 3, 2014
Messages
117
Hiya All,

Had a quick question before i go and change something. Here's the basic layout.
--/Common (Dataset shared with CIFS)
----/subfolder1
----/subfolder2
----/subfolder3

Situation/Problem: Snapshots are every 60mins and kept for 3months. Which is fine for most of the share but subfolder1 has alot of temp junk going in/out and the snapshots are taking up a fair bit of extra space.

Plan:
  1. To rename subfolder1, make a new dataset inside of common called subfolder1.
  2. Move the existing files from the renamed folder to the new dataset.
  3. Create a new periodic snapshot for that dataset with the same options but set it to 7days.
Questions:
  1. Will this have any effect on how CIFS will see the folder? Will the user just see it as another subfolder or am i going to have problems?
  2. Will windows inherit permissions still work for acl's from within the new dataset from Common? ie: Common enforced group 'admins' to have full permissions on all files down the chain.
At this stage I cannot change the folder structure and move it somewhere else. It will just break to much stuff.

Thanks
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Unfortunately, I haven't tested this sort of setup before. A few thoughts:
1) Make sure that you set permissions through the webgui for each dataset individually and confirm that 'permission type' is set to "Windows".
2) The samba module that presents ZFS snapshots to end users through "previous versions" in explorer may not like the fact that you have multiple filesystems / snapshots in a single share.

Why not make "subfolder1" a separate share
\\<freenas>\common\{subfolder2, subfolder3}
\\<freenas>\subfolder1
Then create a shortcut "subfolder1" in "\\freenas\common" that redirects to "\\<freenas>\subfolder1"
 

xCatalystx

Contributor
Joined
Dec 3, 2014
Messages
117
The plan was to setup a separate dataset and share but it was to hard to migrate/change the existing scripts and programs that have hard-coded paths. So i was hoping this could be a band-aid fix for a few months until we can do exactly that.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
The plan was to setup a separate dataset and share but it was to hard to migrate/change the existing scripts and programs that have hard-coded paths. So i was hoping this could be a band-aid fix for a few months until we can do exactly that.
If the script can follow symlinks, you can create a symlink...
Code:
ln -s /mnt/<pool>/subfolder1 /mnt/<pool>/common/subfolder1

then create a shortcut with a slightly different filename that's common enough that users won't get confused "Subfolder1.lnk". Samba by default won't follow symlinks outside of the share path and so I don't believe it will show the symlink to CIFS clients. So in shell you would see:
/mnt/<pool>/common/{subfolder1, Subfolder1.lnk}

in a CIFS client you would see
\\<freenas\common\subfolder1.lnk
 
Status
Not open for further replies.
Top