Creating shares to be accessed by CIF and NFS.

Status
Not open for further replies.

jluvs2ride

Dabbler
Joined
May 4, 2015
Messages
19
Reconfigured my Dell Poweredge 860 home server to run FreeNAS. This is to provide a fault tolerant central storage for family photos, music, videos, and entertainment media. The resources are to be served to a couple of Raspberry PIs running KODI and a pair of Windows laptops.

I have created datasets to organize the various media and I want to share them using both NFS and CIF protocols. So far, I can browse the CIF shares on my Windows 8 laptop but I am denied permission to write to them. On the Raspberry PI I am unable to even see the NFS Shares.

I have an extensive background in the Microsoft world, but unfortunately few things UNIX/LINUX actually make sense to me.

I have looked at the WIKI, it seems to be written in a foreign language.

If anyone can help with this, I appreciate it.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
for the cifs file creation issues make sure you user has write permissions on the dataset being shared.

NFS doesn't have shares, it hsa exports and they can't just be seen from your Raspberry PI. You have to mount them using the mount command or /etc/fstab.

Lastly you shouldn't share the same data over two protocols if you intend to write data over both protocols. You should just use CIFS for everything.
 

jluvs2ride

Dabbler
Joined
May 4, 2015
Messages
19
I mainly want the Raspberry PIs to READ the data but occasionally I want to use the Windows laptops to update the stored media. I had this dual protocol setup working perfectly with Server 2003, however as it is reaching end of life I thought I would look into an Open Source alternative.
 

Scareh

Contributor
Joined
Jul 31, 2012
Messages
182
suggestion 1:
do away with kodi and install rasplex on your raspberry. Install plex on your server and only use one protocol to share your data (cifs)

suggestion 2:

install kodi, and if i remember correctly you can add samba shares in there instead of nfs. Cifs are the way to go then.
On the permissions part, good luck, it took me a long while to get it all sorted out and working to my liking. Only thing i can say is keep at it :smile:
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I have a situation similar to yours. I manage my media from a mac using AFP, and Kodi reads it using NFS. The trick, as suggested by cyberjock, is to check the read-only box in the NFS shares. Then there should be no conflict.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Just use cifs for everything problem solved.
 

Andy Holmes

Dabbler
Joined
May 5, 2015
Messages
16
Id go with glorious1's recommendation and just have the nfs mount read only as kodi does not require any right access to the video directory. NFS is faster than CIFS due to the lower over head and as you are using a Pi, any improvement in performance maybe good especially if you are watching high bitrate/bluray rips.
 

jluvs2ride

Dabbler
Joined
May 4, 2015
Messages
19
I have a situation similar to yours. I manage my media from a mac using AFP, and Kodi reads it using NFS. The trick, as suggested by cyberjock, is to check the read-only box in the NFS shares. Then there should be no conflict.

OK, so now I know it's possible. The trick is figuring out the permissions it seems.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Permissions don't make CIFS + NFS work properly. The problem is that both Samba and nfsd may try to do conflicting things, at the same time or nearly the same time due to caching. So if you have full rights to the CIFS and NFS share, it is totally possible (and has been found to happen) for you to have corruption because of the conflict.

FreeNAS 10 will prevent you from being able to share a location via 2 protocols at the same time with the possibility of corruption. One will be writable, the other(s) will not be writable. You will have to choose which protocol is potentially writable, the rest will be read-only. Of course, all can be further limited with permissions (no reason to give someone read-only permissions if they should be denied permissions anyway). At least, that's the plan. The code hasn't been written yet afaik.
 

jluvs2ride

Dabbler
Joined
May 4, 2015
Messages
19
Permissions don't make CIFS + NFS work properly. The problem is that both Samba and nfsd may try to do conflicting things, at the same time or nearly the same time due to caching. So if you have full rights to the CIFS and NFS share, it is totally possible (and has been found to happen) for you to have corruption because of the conflict.

FreeNAS 10 will prevent you from being able to share a location via 2 protocols at the same time with the possibility of corruption. One will be writable, the other(s) will not be writable. You will have to choose which protocol is potentially writable, the rest will be read-only. Of course, all can be further limited with permissions (no reason to give someone read-only permissions if they should be denied permissions anyway). At least, that's the plan. The code hasn't been written yet afaik.

I ran a Windows 2003 Server for eight years doing this very thing with no absolutely no problems.

I'm really not interested in being told all the reasons I shouldn't be doing this. If the software isn't capable, that is one thing. However at least one person says that they are using FreeNAS to do this very thing.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I ran a Windows 2003 Server for eight years doing this very thing with no absolutely no problems.

I'm really not interested in being told all the reasons I shouldn't be doing this. If the software isn't capable, that is one thing. However at least one person says that they are using FreeNAS to do this very thing.
LOL you might have been using it that way but it didn't work correctly. I know of 1 Enterprise NAS solution that can share the same data over multiple protocols and provides the locking semantics underneath to do it correctly and you are looking at 100k+ just to get started with that. Windows server was not designed to share the same data over multiple protocols but it could work as you have seen but you don't understand how it works and why it shouldn't work. Go read about this and then come back with something more than, "I did it and it didn't' blow up"(russian roulette work the same way). FreeNAS will let you do this, it's easy just take 2 min to create a nfs export and cifs share that points to the same dataset and boom you are done. I suggest using unix permissions and setting one of them to read-only if you can. Other than that you shouldn't have to do anything special. You will probably run into permission issues because you clearly don't understand things but those issues will not be because of nfs and cifs sharing dataset it will be because of ignorance. Good luck and please post back with your final solution so other people can learn from your experiences.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I ran a Windows 2003 Server for eight years doing this very thing with no absolutely no problems.

I'm really not interested in being told all the reasons I shouldn't be doing this. If the software isn't capable, that is one thing. However at least one person says that they are using FreeNAS to do this very thing.

Wait, so you asked me to elaborate, then told me you aren't interested in the reasons. So why are we even having this discussion. Feel a bit off-put that you'd ask ME to elaborate, then when I did you dismissed it.

Yes, you can *do* it. In fact, I *have* done it at home. Why? Because I'm the only user in the house, and switching from linux (NFS) to windows (CIFS) takes a system reboot. So there is virtually zero risk of me doing something in NFS and CIFS in anything that is even somewhat "simultaneously".

Now, if you have a word file that suddenly doesn't open:

1. What would you blame?
2. Could you even blame the NFS/CFIS problem?
3. How long would it take you to even figure out the file is corrupt? (I'm sure you open every single one of your files regularly to make sure they open properly, right?)

BTW.. doing it on Server 2003 is totally different. Server 2003 doesn't use Samba and nfsd. So the comparison that you did it on Windows is invalid.
 

jluvs2ride

Dabbler
Joined
May 4, 2015
Messages
19
I originally ran my Raspberry PI using SAMBA shares from the Server 2003. After reading about the lower overhead using NFS, I installed and configure UNIX Services for Windows. The Raspberry PI was then able to browse and open the NFS exports running on the Server 2003.

Evidently this is something that no one here knows how to do.

Thank you all for your help.
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Why can't you all just get along? Each side here is misunderstanding what the other is saying and now it is turning into some kind of pissing match. Just stop.

It isn't helping anyone.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I originally ran my Raspberry PI using SAMBA shares from the Server 2003. After reading about the lower overhead using NFS, I installed and configure UNIX Services for Windows. The Raspberry PI was then able to browse and open the NFS exports running on the Server 2003.

Evidently this is something that no one here knows how to do.

Thank you all for your help.

Uh.. this is something that everyone knows how to do. I don't have a clue why you think you are the only one as nobody here has given any information to even give a hint that they don't.But you dismissed my answer explaining it (see post 12 in this thread).


Oh, and for those that may be confused.. Windows Server ≠ FreeBSD and the fact that Windows can do it is still not a valid argument.
 

jluvs2ride

Dabbler
Joined
May 4, 2015
Messages
19
Uh.. this is something that everyone knows how to do. I don't have a clue why you think you are the only one as nobody here has given any information to even give a hint that they don't.But you dismissed my answer explaining it (see post 12 in this thread).


Oh, and for those that may be confused.. Windows Server ≠ FreeBSD and the fact that Windows can do it is still not a valid argument.

If I knew how to do this using BSD, I wouldn't be asking. If you know how why don't you tell me how?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If I knew how to do this using BSD, I wouldn't be asking. If you know how why don't you tell me how?

I already told you, and you already dismissed me.. here's the quote

... The problem is that both Samba and nfsd may try to do conflicting things, at the same time or nearly the same time due to caching. So if you have full rights to the CIFS and NFS share, it is totally possible (and has been found to happen) for you to have corruption because of the conflict.

I'm going to go ahead and exit this thread.
 
Status
Not open for further replies.
Top