Sharing my Samba and snapshot setup (mapping to single letter and accessing more snapshots)

So I’m pretty new to Rockstor, and I’ve had to make some adjustments vs. my previous DIY NAS.I wanted to share some of my workarounds in case they are useful to others.

One thing that frustrated me initially is the fact that you can only share shares via Samba. In my previous NAS I was able to share a folder, which had several BTRFS subvolumes in it. With Rockstor I was forced to create numerous Samba shares. They are all visible when navigating to the server’s IP address, but the limitations of Windows drive mapping meant that each share would need its own drive letter. The easiest workaround is to just open an explorer window to the server’s IP address, but my wife also uses this. She is not very tech savvy, so it’s important that it can be mapped to a single drive letter.

Mapping multiple shares to a single Windows drive letter

So what I did was create a dummy share called samba_share. Then I just created symlinks in it to each of the shares via the command line and added samba_share to Samba (browseable). The directory looks like this:

lrwxrwxrwx 1 root       root  24 Jul 16 19:29 archives -> /mnt2/datadisk1/archives
lrwxrwxrwx 1 mediashare users 13 Jun 26 22:09 backups -> /mnt2/backups
lrwxrwxrwx 1 root       root  26 Jul 15 08:51 basement_snapshots -> /mnt2/datadisk1/.snapshots
lrwxrwxrwx 1 root       root  21 Jul 16 19:28 media -> /mnt2/datadisk1/media
lrwxrwxrwx 1 root       root  30 Jul 16 19:26 media_archived -> /mnt2/datadisk1/media_archived
lrwxrwxrwx 1 mediashare users 20 Jun 27 16:56 temp -> /mnt2/datadisk1/temp

The view in Windows explorer looks like this:
image

So this way we can navigate to any of the subvolumes (shares) from a single Samba share and single Windows drive letter.

Alternate method for accessing snapshots

I was initially excited about the shadow copy feature on Samba shares, but once I realized that you couldn’t access all the snapshots (i.e. daily, weekly, monthly, yearly) due to having to select a single snapshot naming string, I became less interested.

So what I did instead is to add an additional symlink to the samba_share folder (see above), which lets us directly access ALL the snapshots. So if I browse to my “basement_snapshots\media” folder, it gives me the option to drill into any snapshot that I want. It also means that I can keep all the snapshots hidden. I could be wrong but it seemed that shadow copy required visible snapshots, but I didn’t like the way they showed up as subfolders in Samba (.snapshot_xx), as it added clutter. This method does not require snapshots to be visible.

image

I find this to be more flexible than picking a shadow copy from only one set of snapshot frequency. It’s not quite as slick as being able to access an older version by right-clicking, but it’s very straightforward.

Anyway, just posting this in case it helps anyone or gives them ideas on how to customize their Rockstor.

5 Likes