ZFS dataset for each SMB share, or not?

MikeyG

Patron
Joined
Dec 8, 2017
Messages
442
I've experimented with both. Currently settled on one for each share. I ran into issues where snapshots through windows explorer did not work correctly on subfolders (when opening a snapshot, it only opened it on root). I also like seeing the space used/compressed space of each dataset/share and having more fine grained control over things like record size. I've only got about 8 shares though. I think if I had much more I'd be more likely to condense them together.

The pro for me with having them all in one dataset was a reduction in the number of snapshots (I currently have a series for each dataset) and the ability to move files between shares without reading/writing all the data for the files being moved.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
I've experimented with both. Currently settled on one for each share. I ran into issues where snapshots through windows explorer did not work correctly on subfolders (when opening a snapshot, it only opened it on root). I also like seeing the space used/compressed space of each dataset/share and having more fine grained control over things like record size. I've only got about 8 shares though. I think if I had much more I'd be more likely to condense them together.

The pro for me with having them all in one dataset was a reduction in the number of snapshots (I currently have a series for each dataset) and the ability to move files between shares without reading/writing all the data for the files being moved.

In 11.3 we're adding a new shadow copy module as default that uses libzfs. It properly handles issues with nested datasets (or sharing out a subdirectory located in a ZFS dataset).
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
OK I guess I'll stick with one dataset per share, sounds like it's the more well-trodden path. It's just a bit annoying to have to re-create 'periodic snapshot tasks' for every share.
 

MikeyG

Patron
Joined
Dec 8, 2017
Messages
442
OK I guess I'll stick with one dataset per share, sounds like it's the more well-trodden path. It's just a bit annoying to have to re-create 'periodic snapshot tasks' for every share.
Why not one recursive task on a parent dataset? That's what I do.
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
hmmm, I probably should have created a parent SMB dataset, and made each share a child. As it is now, my share datasets don't have any parent.
 

MikeyG

Patron
Joined
Dec 8, 2017
Messages
442
You could always add it at the top level, or just make a dataset and move the others underneath.
 

MikeyG

Patron
Joined
Dec 8, 2017
Messages
442
You should be able to use zfs send/receive to send a snapshot of a dataset to a location underneath another one.
 
Top