Sharing the same volume with CIFS and NFS/AFP

Status
Not open for further replies.

Pktua

Cadet
Joined
Jul 19, 2011
Messages
9
Hi again,

I was wondering if it's possible to share the same volume with CIFS and NFS and/or AFP? The FreeNAS documentation says, that it's possible although not recommended (http://doc.freenas.org/index.php/Sharing_Configuration): Here the doc ist referring to NFS and FTP (and CIFS and AFP).
Is there also a problem (concerning data corruption) if I'm sharing the same volume with CIFS and NFS? Is there still a problem when sharing the same volume with CIFS and AFP (if so, is there only a problem if Windows users start deleting the Mac files or are there other inherent problems?)?

Why am I asking this?
Well until now I was sharing a volume with CIFS to Windows and Ubuntu users. Although the performance was fairly low for the Linux users compared to the Windows users (100-60 MB/s vs. 20 MB/s), I was happy with it (at least it worked).
Recently one of the users bought an iMac with Mac OS X 10.7.3. After having had some hard time configuring the CIFS access on the Mac I finally managed it to get working. But here starts the problem. The Mac user is able to see the CIFS share and can copy from the share and copy to the share. The problem is that copyying files not always works as it should, for example: Sometimes you can copy 50 pictures to the CIFS share without having problems. Another time, when trying to copy the same (!) 50 pictures, the copy process ends suddenly saying "The operation can’t be completed because the item … is in use". So, only the pictures copied before the message arrives, are stored on the CFIS share. Of course there is no application accessing the pictures while I'm copying them to the share. I'm not sure, if that's a similar problem this guy is having: http://forums.freenas.org/showthrea...CIFS-file-mask-access-errors-on-Mac-10-6-10-7
After having done some search via Google I'm not sure if this is a FreeNAS- or Mac-related problem, although I'm tending towards Apple causing the problem as there was already a similar problem with Mac OS X 10.6.3 (http://osxdaily.com/2010/05/02/simple-fix-for-mac-os-x-10-6-3-samba-write-access-problem/) + Windows and Ubuntu users don't have this problems. As far as I can see this is a permission problem (correct me please, if I'm wrong - sorry, I'm no expert).
I shared another volume via NFS to the Mac. There were no problems with it at all.

So here my question: Is it possible to share the same volume with CIFS and NFS (or AFP)? Are there any problems to be expected? If so, which one?


Systems involved:
FreeNAS 8.0.2 Release amd64 (I had problems with 8.0.3 Release p1 x64 so I'm still using 8.0.2)
Windows 7 Premium 64bit (all servicepacks and patches installed)
Ubuntu 11.10 64bit
Mac OS X 10.7.3 Lion

CIFS share is configured with anonymous "guest" access (no password needed).
NFS share is configured with "nobody" access (no password needed).

Pktua
 

louisk

Patron
Joined
Aug 10, 2011
Messages
441
If memory serves, the problem(s) revolve around the two operating systems having different naming requirements, including length, and legal characters.

Have you tried updating the Macs to 10.6.8, or 10.7.3 (depending on whether they are SL or Lion)?

I've been using FreeNAS with CIFS and both Mac and Windows for quite a while and not had these issues.
 

Pktua

Cadet
Joined
Jul 19, 2011
Messages
9
Thank you for your answer!

I'm using Lion 10.7.3.

If that's possible: Could you please post your CIFS-configuration? I have no idea where I made a mistake - indeed, I thought that everything is set correct as both Ubuntu and Windows are working properly.
 

louisk

Patron
Joined
Aug 10, 2011
Messages
441
I've attached the CIFS prefs, but I don't think there is anything special going on there.
 

Attachments

  • Screen Shot 2012-02-15 at 10.39.34 PM.jpg
    Screen Shot 2012-02-15 at 10.39.34 PM.jpg
    89.2 KB · Views: 555
  • Screen Shot 2012-02-15 at 10.39.38 PM.jpg
    Screen Shot 2012-02-15 at 10.39.38 PM.jpg
    89.8 KB · Views: 528

Pktua

Cadet
Joined
Jul 19, 2011
Messages
9
Thank you for the screenshots!

Hmmm, the only difference between my and your configuration is that I'm using the "Anonymous"-Authentication model and that I haven't enabled the "Large RW support".
Of course the "Anonymous"-Authentication model also means that my guest account is set to "guest" and that "Allow guest access", "Only allow guest access" and "Allow Empty Password" are all enabled.
Everything else is the same.
As far as I know the "Large RW support" has only to do with the performance of the NAS but not with my problem (?). So it seems that the "Anonymous" authentication model with "guest"-access are the troulemakers. Have you ever tried to access a CIFS share via Mac OS X when it was set to "Anonymous" access?
 

Pktua

Cadet
Joined
Jul 19, 2011
Messages
9
Hmmm ok - I ended up using "Anonymous" access because I thought that it would be the surest (of course also the least secure) way to get the shares working. In case that everything worked I planned to switch to an user/password-protected access to the shares.
But as there were always some small problems I didn't change the access model - well, one reason was of course also the amount of work needed for doing it ;)

Thx for your postings!

Back to the problem:
If there's anyone having the same problems:
1) Have you ever tried to access a CIFS share via Mac OS X when it was set to "Anonymous" access?
2) Is there a problem (concerning data corruption) if I'm sharing the same volume with CIFS and NFS?
3) Is there still a problem when sharing the same volume with CIFS and AFP (if so, is there only a problem if Windows users start deleting the Mac files or are there other inherent problems?)?
 

c141heaven

Cadet
Joined
Jun 11, 2013
Messages
3
I set up FREENAS with CIFS seem to have it working fine. I'm using FREENAS on a dedicated server with two 3-TB drives and have another PC on my network running ubuntu. I've been transferring files successfully to the FREENAS box (mostly intended for back and media such as music/movies). I'm using FileZilla for this and have had no troubles. However, my issue is that I can't seem to get other programs (such as pyrenamer) run on ubuntu to recognize the FREENAS drives even though they show in the list of drives on my file manager in ubuntu (these are the CIFS shares / haven't been able to get NFS working at all and am pretty sure I've properly configured it, started the service, etc.)
 

Pktua

Cadet
Joined
Jul 19, 2011
Messages
9
Hi c141heaven,

I assume you are trying to access the FREENAS shared folder using Nautilus, Ubuntu's file manager. The problem is, that this doesn't always work properly. Instead you have to edit the fstab file.

Here a small step-to-step tutorial:

1) Install the cifs-utils package (I assume that you have an Ubuntu version > 10.10; if you have an older version than Ubuntu 10.10 instead of the cifs-utils package you have to install the smbfs package):
Code:
sudo apt-get install cifs-utils 

2) Create a mountpoint:
Code:
sudo mkdir /media/gandalf 

This is just an example where you create the mountpoint in the media folder of Ubuntu. Of course you can also use another location. The name of the mounted folder in this example is gandalf (change it as you wish).
3) Edit the fstab file.
Code:
sudo gedit /etc/fstab 


Add the following line:
Code:
#FREENAS share
//192.168.0.7/gandalf /media/gandalf cifs username=guest,password=,iocharset=utf8,uid=1000,gid=1000 0 0

I assume that:
a) your FREENAS server has the IP address: 192.168.0.7 (obviously you have to change it to the real address)
b) your shared FREENAS folder is named gandalf (obviously you have to change it to the real folder name)
c) you are using "Anonymous authentication" for the FREENAS share (because of this the username is set to guest and the password field is empty)

No reboot your system and that's it: You should have now a mounted FREENAS share in Ubuntu which can be accessed by every program.

P.S.: The NFS service probably didn't work out for you, because newer Ubuntu versions no longer have NFS support. That means you would have to install the NFS-packages before continuing.
 

c141heaven

Cadet
Joined
Jun 11, 2013
Messages
3
Thank you very much! I will give this a try and see what happens. For a 30 year Windows user, ubuntu can be quite a challenge to established ways of doing everything. Wish I had started 29 years ago ... but I'm picking it up slowly but surely.




Hi c141heaven,

I assume you are trying to access the FREENAS shared folder using Nautilus, Ubuntu's file manager. The problem is, that this doesn't always work properly. Instead you have to edit the fstab file.

Here a small step-to-step tutorial:

1) Install the cifs-utils package (I assume that you have an Ubuntu version > 10.10; if you have an older version than Ubuntu 10.10 instead of the cifs-utils package you have to install the smbfs package):
Code:
sudo apt-get install cifs-utils 

2) Create a mountpoint:
Code:
sudo mkdir /media/gandalf 

This is just an example where you create the mountpoint in the media folder of Ubuntu. Of course you can also use another location. The name of the mounted folder in this example is gandalf (change it as you wish).
3) Edit the fstab file.
Code:
sudo gedit /etc/fstab 


Add the following line:
Code:
#FREENAS share
//192.168.0.7/gandalf /media/gandalf cifs username=guest,password=,iocharset=utf8,uid=1000,gid=1000 0 0

I assume that:
a) your FREENAS server has the IP address: 192.168.0.7 (obviously you have to change it to the real address)
b) your shared FREENAS folder is named gandalf (obviously you have to change it to the real folder name)
c) you are using "Anonymous authentication" for the FREENAS share (because of this the username is set to guest and the password field is empty)

No reboot your system and that's it: You should have now a mounted FREENAS share in Ubuntu which can be accessed by every program.

P.S.: The NFS service probably didn't work out for you, because newer Ubuntu versions no longer have NFS support. That means you would have to install the NFS-packages before continuing.
 
Status
Not open for further replies.
Top