Best "Share type" for my needs?

Crispin

Explorer
Joined
Jun 8, 2011
Messages
85
Hi folks,

I need to rebuild my 24TB NAS (for other reasons) and want to get it right this time.

I use FreeNAS as:
  • A share server
  • A usenet checker (in jails)
  • A backup server (cron running scripts on local disk)
  • A music / media store
  • A dev server (apache / mysql in separate jails)
  • Photo store
  • Other...
I have various datasets - Media, Dev, Documents, Pics etc

Some of these, Media for example, are used from jails (mount within a jail) NFS share (Kodi) and CIFS. What is be best share-type option for this? Windows or Unix?
Same applies to Dev - it's mapped as a network folder in Win machines but is also mounted inside a webserver jail. Windows or Unix?

I read on some threads that if a mix then Windows is easiest. Is this true? Can you also secure things well with this approach?


Many thanks
Crispin
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hi folks,

I need to rebuild my 24TB NAS (for other reasons) and want to get it right this time.

I use FreeNAS as:
  • A share server
  • A usenet checker (in jails)
  • A backup server (cron running scripts on local disk)
  • A music / media store
  • A dev server (apache / mysql in separate jails)
  • Photo store
  • Other...
I have various datasets - Media, Dev, Documents, Pics etc

Some of these, Media for example, are used from jails (mount within a jail) NFS share (Kodi) and CIFS. What is be best share-type option for this? Windows or Unix?
Your only option in this case is to use Unix permissions type. You will need to turn off oplocks in Samba and make the various changes that I mention in one of the posts in my signature.

Same applies to Dev - it's mapped as a network folder in Win machines but is also mounted inside a webserver jail. Windows or Unix?
Ditto.

I read on some threads that if a mix then Windows is easiest. Is this true? Can you also secure things well with this approach?
Windows permissions type is the only 'supported' configuration for samba shares. You can 'secure things well'.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Thanks for the reply.

I've rebuilt it all but still have odd issues. I've sort of got a duplicate thread here: https://forums.freenas.org/index.ph...ndows-and-unix-permissions.44643/#post-300560

I think the more I've tried to fix it the more I've messed up :(

The reason why "Unix" permissions type on samba shares is not "supported" is because the combination produces "odd issues".

In general it is best to (1) set permissions type on Samba shares to "Windows" and (2) not simultaneously share same dataset through Samba and NFS simultaneously.

Since your planned config violates (2) I pointed you towards using "Unix" permissions type. This is to make permissions on your datasets in a way that your jails and NFS expects.
 
Last edited:

jmcguire525

Explorer
Joined
Oct 10, 2017
Messages
94
Since your planned config violates (2) I pointed you towards using "Unix" permissions type. This is to make permissions on your datasets in a way that your jails and NFS expects.


Sorry to bring up an old thread, but it was relevant to a question I had...

If I store my media in a dataset with windows permission type (allowing me to access it via smb on windows) and also mount the dataset directly within an iocage jail, will this cause any "odd issues"?

Example: for Plex
Code:
iocage fstab -a plex /mnt/storage/media /mnt/media nullfs ro 0 0
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Sorry to bring up an old thread, but it was relevant to a question I had...

If I store my media in a dataset with windows permission type (allowing me to access it via smb on windows) and also mount the dataset directly within an iocage jail, will this cause any "odd issues"?
There are a lot of people using the Plex plugin on FreeNAS, including me, and I am sure the answer to your question is somewhere in the forum, but asking your question on such an old thread is probably not the way to find the answer, generally.
I would point you to this resource even though it is outside the ixsystems forum:
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Sorry to bring up an old thread, but it was relevant to a question I had...

If I store my media in a dataset with windows permission type (allowing me to access it via smb on windows) and also mount the dataset directly within an iocage jail, will this cause any "odd issues"?

Example: for Plex
Code:
iocage fstab -a plex /mnt/storage/media /mnt/media nullfs ro 0 0
Well, I haven't read this particular thread, but it is from before I began working at iX and possibly wrong (I often was and am). It's best to just ask the question directly I personally use ACLs on my plex media share because I can do something like setfacl -a 0 u:972:modify_set:fd:allow,g:smbusers:full_set:fd:allow /mnt/storage/media. This assumes that you have a group "smbusers" that your smb users are a member of (substitute with correct one). 972 is the uid of the plex user in the jail. Once you have done this, smbusers and plex will have read/write/modify access to every file and directory that's created in the media share. If you already have data there winacl -a clone -rv -p /mnt/storage/media.
 

jmcguire525

Explorer
Joined
Oct 10, 2017
Messages
94
@anodos Thank you for the reply... My main concern was that I was mounting the directories correctly (so that there would be no weird issues mentioned in previous comments). This applies to all of my media that is mounted within jails.

If my media datasets have windows ACLs and have SMB shares associated with them, mounting the data directly using...
Code:
fstab -a <jailname> /mnt/storage/media /mnt/media
this should not cause any issues since it is not being linked as an NFS share? Whereas if I were to use NFS to mount the data, it could cause issues since the dataset is already associated with an SMB share.

I just wanted to make sure I have things setup properly. Despite reading up on this I was still unsure if my current method of mounting was correct.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
@anodos Thank you for the reply... My main concern was that I was mounting the directories correctly (so that there would be no weird issues mentioned in previous comments). This applies to all of my media that is mounted within jails.

If my media datasets have windows ACLs and have SMB shares associated with them, mounting the data directly using...
Code:
fstab -a <jailname> /mnt/storage/media /mnt/media
this should not cause any issues since it is not being linked as an NFS share? Whereas if I were to use NFS to mount the data, it could cause issues since the dataset is already associated with an SMB share.

I just wanted to make sure I have things setup properly. Despite reading up on this I was still unsure if my current method of mounting was correct.
Use the GUI to add storage to the jail.
 
Top