Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do you structure your shares?

Featured Replies

I have a fileserver and I'm in the middle of deciding whether to take my single share with multiple folders or create different shares.  It's really only myself accessing my shares along with various devices in the house (Apple TV's, Roku, etc) accessing media through Plex.

But, it would be nice to have flexibility. For example, to provide my wife access to a folder called "Wife's folder" or the kids to have access to their own folders.

Currently, I have a share called "Shared" and within that are main folders.

 

Backups

Family
Finances

Other
Media
Work

Inside the Family folder, I have folders for each family member with documents, report cards, etc.  I'd like to be able to make those folders accessible, but not the parent.  Not too sure if that's possible.

So I'm curious how others with a family have structured their shares/folders?
 

  • Community Expert
1 hour ago, csimpson said:

Inside the Family folder, I have folders for each family member with documents, report cards, etc.  I'd like to be able to make those folders accessible, but not the parent.  Not too sure if that's possible.

 

You can but it has issues with who can access those folders (and permissions).   Here is a link to a thread on how to set it up:

 

      https://forums.unraid.net/topic/137806-creat-a-user-share-containing-a-portion-of-another-user-share/#comment-1251067

 

Be sure to read it carefully and that you fully understand exactly who has access to those folders that you share using this method.  (You may need to create a "super user" for the 'Family' folder and only turn-on access to that base folder only when it becomes necessary for administrative reasons!)  

 

Now about the other issue.  I, personally, would make the Media folder its own share.  Same way with Backups.  Probably the same with Family.  The other stuff would depend on you want to have access to it.  (I can't believe your boss would be happy if anyone on your LAN-- except you -- would have access to the contents of the Work folder...)

  • Author
28 minutes ago, Frank1940 said:

 

You can but it has issues with who can access those folders (and permissions).   Here is a link to a thread on how to set it up:

 

      https://forums.unraid.net/topic/137806-creat-a-user-share-containing-a-portion-of-another-user-share/#comment-1251067

 

Be sure to read it carefully and that you fully understand exactly who has access to those folders that you share using this method.  (You may need to create a "super user" for the 'Family' folder and only turn-on access to that base folder only when it becomes necessary for administrative reasons!)  

 

Now about the other issue.  I, personally, would make the Media folder its own share.  Same way with Backups.  Probably the same with Family.  The other stuff would depend on you want to have access to it.  (I can't believe your boss would be happy if anyone on your LAN-- except you -- would have access to the contents of the Work folder...)

Right now I'm the only one with access to the single share with the folders. 
 

I'm not sure if there's a better way to set up shares/folders for families than what I've done? 

  • Community Expert
39 minutes ago, csimpson said:

I'm not sure if there's a better way to set up shares/folders for families than what I've done? 

 

When it all boils down, it is your choice and should be based on how you want to work and access your shares....

  • Author
1 hour ago, Frank1940 said:

 

When it all boils down, it is your choice and should be based on how you want to work and access your shares....

Yes, I understand that. But I'm curious what others have done after organizing folders for 30 years. My current method has worked well for the last 10 years on my old server.  But I do find I make it more efficient by shuffling things around from time to time. For example, I have several thousand scanned and digital documents. Bank statements, report cards, insurance documents, Home listings, lawyers documents,  etc. I'm curious if others sort things into archival folders for older documents or if they order things by subject matter. 

For home videos and photos, I have 36,000 videos and photos (1.4TB) since 1988. I just fonished scanning in about 5000 photos from photos boxes from the early to mid 90's. There's also a bunch of DVDs I still need to rip from the early to mid 2000's. So... I have a "Family Photos" and "Family Videos" in my Media folder (not Share). They're organized by:

<date>
   <contributor>
      <media>

So for example:
<Media>
   <Family>
      <Photos>
      <2023>
         <Mom>
           < Ipad>
            <IPhone>
         <Dad>

            <Ipad>
            <IPhone>
         <Kid 1>

            <Ipad>
            <IPhone>

etc.

The reason for separating is because Apple stores things as img_0001 and img_0002 and files can be overwritten from different people and devices.

Plex has indexed Home videos and Photos and plays back on all the various household devices. There's 9 tv's, 4 phones, 4 ipads in the house and all of them are connected to Plex. This seems to work well for now.

And that's when it comes to shares. having a separate media share would also give access to family photos and videos.  That's not so much of an issue, but then I'm also curious why to have a separate media share rather than a folder in a "shared" share?

 

Edited by csimpson

  • Community Expert

I use a raidz1 ZFS disk setup and use zfs as my main shares in smb.
*waiting on unraid to finish and fix smb. I almost don't have to edit the defaults anymore...
https://forums.unraid.net/topic/151422-feature-request-custom-smb-with-out-unraids-default-config-options/?do=findComment&comment=1365921
^Which is one reason why I would want to edit the smb conf manuly ...

So I start with a zfs data set and go into shares tab and fix/make sure the dataset created is set to the correct pool for data storage.
image.png.79fb4bda80458dbd32238494a1e1d0f5.png


Depending on application / samba / etc structure of data. I then use sub folders within my datasets

image.thumb.png.d23aed0c7af79ab3eeed5ee2747295d6.png

image.thumb.png.4c2d9be07172686d04956e2ab44927e4.png

I like zfs as my primary as there are some fun things you can do such as setup shadow copies and backups within samba... This is done through unriad with zfs snapshots.

This is done more with snapshots and a script and small edits to smb shares.

Example documentation:
https://www.truenas.com/docs/scale/scaletutorials/shares/smb/addsmbshadowcopies/#:~:text=About SMB Shadow Copies&text=By default%2C all ZFS snapshots,within the SMB share path.

its all in the smb per share setting to enable this options with smb
https://forum.openmediavault.org/index.php?thread/43915-install-zfs-snapshot-and-enable-samba-shadow-copy-previous-versions-for-windows/

I use a user script and snapshot plugin to accomplish this:

image.thumb.png.b53966c019389e7100509b35df976441.png

Script is a compilation of others forum users works to make zfs snapshots:

#!/bin/bash

#v0.2
########################simple-snapshot-zfs#######################
###################### User Defined Options ######################

# List your ZFS datasets.  You can add/remove sets
DATASETS=("vm-zfs/Brandon" "vm-zfs/CCTV" "vm-zfs/DLNA" "vm-zfs/DnD" "vm-zfs/Elliott" "vm-zfs/ISO" "vm-zfs/Logan" "vm-zfs/Nextcloud" "vm-zfs/Program-Installers-PCRepair" "vm-zfs/William")
# readarray -t DATASETS < <(zfs list -o name -H)  # when replacing DATASETS above, should return all pools/Datasets, but not thouroughly tested yet

# Set Number of Snapshots to Keep
SHANPSHOT_QTY=10

###### Don't change below unless you know what you're doing ######
##################################################################

timestamp=$(date "+%Y-%m-%d-%H:%M")
echo "Starting Snapshot ${timestamp}"
echo "_____________________________________________________________"

# Function to create snapshot if there is changed data
create_snapshot_if_changed() {
  local DATASET="$1"
  local WRITTEN
  WRITTEN=$(zfs get -H -o value written "${DATASET}")

  if [[ "${WRITTEN}" != "0" ]]; then
    local TIMESTAMP
    TIMESTAMP="$(date '+%Y-%m-%d-%H%M')"
    zfs snapshot "${DATASET}@${TIMESTAMP}"
    echo "Snapshot created: ${DATASET}@${TIMESTAMP}"
  else
    echo "No changes detected in ${DATASET}. No snapshot created."
  fi
}

# Function to prune snapshots
prune_snapshots() {
  local DATASET="$1"
  local KEEP="${SHANPSHOT_QTY}"
  
  local SNAPSHOTS=( $(zfs list -t snapshot -o name -s creation -r "${DATASET}" | grep "^${DATASET}@") )
  local SNAPSHOTS_COUNT=${#SNAPSHOTS[@]}

  echo "Total snapshots for ${DATASET}: ${SNAPSHOTS_COUNT}"

  local SNAPSHOTS_SPACE
  SNAPSHOTS_SPACE=$(zfs get -H -o value usedbysnapshots "${DATASET}")
  echo "Space used by snapshots for ${DATASET}: ${SNAPSHOTS_SPACE}"

  if [[ ${SNAPSHOTS_COUNT} -gt ${KEEP} ]]; then
    local TO_DELETE=$((SNAPSHOTS_COUNT - KEEP))
    for i in "${SNAPSHOTS[@]:0:${TO_DELETE}}"; do
      zfs destroy "${i}"
      echo "Deleted snapshot: ${i}"
      echo "_____________________________________________________________"
    done
  else
   echo "_____________________________________________________________"
  fi
}

# Iterate over each dataset and call the functions
for dataset in "${DATASETS[@]}"; do
  create_snapshot_if_changed "${dataset}"
  prune_snapshots "${dataset}"
done

echo "----------------------------Done!----------------------------"


and paths are viewable for smb in snapshot plugin:
image.thumb.png.37aa41121c68074b7a2ec5d8564461f5.png

extra smb share setting example:
 

[Brandon]
vfs objects = shadow_copy2
shadow:snapdir = .zfs/snapshot
shadow:sort = desc
shadow:format = zfs-auto-snap_monthly-%Y-%m-%d-%H%M


my shadow snap dir would become:
vm-zfs/Brandon(Snapshots)/%Y-%m-%d-%H%M
and fill in and fix the above...

for Plex - DLNA:
I separate picture form tv shows form movie.

But this starts at the dataset level first then sub folders with in the data set.

Edited by bmartino1
forum hickup and strue with data - spelling

  • Community Expert
5 hours ago, csimpson said:

I have a fileserver and I'm in the middle of deciding whether to take my single share with multiple folders or create different shares.  It's really only myself accessing my shares along with various devices in the house (Apple TV's, Roku, etc) accessing media through Plex.

But, it would be nice to have flexibility. For example, to provide my wife access to a folder called "Wife's folder" or the kids to have access to their own folders.

Currently, I have a share called "Shared" and within that are main folders.

 

Backups

Family
Finances

Other
Media
Work

Inside the Family folder, I have folders for each family member with documents, report cards, etc.  I'd like to be able to make those folders accessible, but not the parent.  Not too sure if that's possible.

So I'm curious how others with a family have structured their shares/folders?
 


Since the folders are sub folders with in a folder you would need to use the smb extra config and make the sub folder shares.
*note the array has to be stopped to edit this...

settings > smb:
image.thumb.png.e9713c00b1620308ed442aeac8bf18f4.png

Here you would make your own smb share:

example:

[appdata]
        path = /mnt/user/appdata
        comment = Docker Data on Cache Drive
        browseable = no
        # Public
        public = yes
        writeable = yes
        case sensitive = auto
        preserve case = yes
        short preserve case = yes
        vfs objects = catia fruit streams_xattr
        fruit:encoding = native

 

So make a share name:

Wife:
 

[Wife]
        path = /mnt/user/shared/wife
        comment = Wife Folder Share
        browseable = no
        # Public
        public = yes
        writeable = yes
        case sensitive = auto
        preserve case = yes
        short preserve case = yes
        vfs objects = catia fruit streams_xattr
        fruit:encoding = native

 

  • Author

Great responses, thank-you! What are the community's thoughts on storing Family Photos and Videos in the Media folder? I'm not sure if it belong there or in the "Family" folder?

  • Community Expert

I personally separate them. its personal preference.

While it can make duplicates. I usual reserve media content for public facing, while other content as private. So in my use case, dlna is my media folder.
While pictures are in individual user data folder, similar to old nt style roaming profiles. That I map per user when they log in.
 

I can see a structure folder with media contain media files of picture/ movies.

But for my use case, I didn't want some file to be public facing. And in the even of a Plex memory leak / error in server I didn't want those files accessible.

I would keep family photo together in the family folder. and only put them in media if you want them public to the world.

  • Author
17 hours ago, bmartino1 said:

I personally separate them. its personal preference.

While it can make duplicates. I usual reserve media content for public facing, while other content as private. So in my use case, dlna is my media folder.
While pictures are in individual user data folder, similar to old nt style roaming profiles. That I map per user when they log in.
 

I can see a structure folder with media contain media files of picture/ movies.

But for my use case, I didn't want some file to be public facing. And in the even of a Plex memory leak / error in server I didn't want those files accessible.

I would keep family photo together in the family folder. and only put them in media if you want them public to the world.

Hmmm, that makes sense.  Currently, I have my family photos and videos in my media folder.  It's mainly because it makes it easier to have
 

Host Path 3: /mnt/user/Shared/Media/

mapped to:
 

Container Path: /data


But if I were to have a separate share for Media and the family photos/videos were in the Family Folder (outside of the Media share), how would I add them to Plex? Currently, I could just change:

 

Host Path 3: /mnt/user/Shared/

and then add the folders in the Plex Library to be 
 

/data/Family/Photos


But that would allow Plex to have access to everything. Not a big deal because I don't serve up content outside of my home and there's no remote access through Plex, but... when my 17 year old goes off to school, I may want to change it so she can access it externally.  Maybe...

  • Community Expert

to add more path to plex you make a docker path variable for file access and then go to setting and add the path in docker.

SO edit the plex docker tempalte and click
image.png.dc538e3738b857547c6fbdfa2c0ae230.png

example data fill in:
image.thumb.png.8ca33ca6a77b3c2740cd2422d136ef57.png

 

image.thumb.png.ac73a158ca813c9566761317a54c38a5.png

then go to plex wrench(setting) > Manage > Libraries > add library
image.thumb.png.45b1bd55c3b3517a89dd6983a0e25582.png


image.thumb.png.486fe351533d98d739231e75d578c650.png

now you have that folder public facing in Plex media library

Edited by bmartino1

  • Community Expert

you can make sub folders within plex as well and have a /photo main folder
then use container path /photo/%users%

this way Plex only needs a single library of /photo added to generate.

  • Author

Beautiful!  Thank-you @bmartino1 - I'll try this when I'm back home!  This is awesome!

[ADDED]: Worked perfectly!!!

Edited by csimpson

  • Author
8 hours ago, bmartino1 said:

you can make sub folders within plex as well and have a /photo main folder
then use container path /photo/%users%

this way Plex only needs a single library of /photo added to generate.

Sorry,  I’m not quite following this?

  • Author

Ahhh okay, I understand. Thank-you!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.