Samba and NFS

Will Ryder's picture

Forums: 

Hi,

I have NFS mount of netapp filer on debian 6 and on a rhel 5 machines.

I have samba server running on both machines that windows pc can connect to and access the nfs mount.

Is this advisable ? As I cannot have strict file locking. Or is there some way to make nfs and CID share work together file locking?

Thanks

Will

Sent from my iPhone

Samba and NFS

William Hopkins's picture

On 05/27/11 at 06:04pm, Will Ryder wrote:
> Hi,
>
> I have NFS mount of netapp filer on debian 6 and on a rhel 5 machines.
>
> I have samba server running on both machines that windows pc can connect to and access the nfs mount.
Why? Last I checked, netapp filers had SMB support.
>
> Is this advisable ? As I cannot have strict file locking. Or is there some way to make nfs and CID share work together file locking?
Not advisable, no. SMB emulates windows locks and NFS mandates UNIX locks and they aren't compatible. You may or may not have issues.
I would suggest you ask around the samba-technical list for best practices, and if you can't fully understand all the implications then you'd be safest finding another solution.

Samba and NFS

William Hopkins's picture

On 05/28/11 at 12:10am, will ryder wrote:
>
> On May 27, 2011, at 10:08 PM, William Hopkins wrote:
>
> > On 05/27/11 at 09:57pm, Will Ryder wrote:
> >>
> >>
> >> Sent from my iPhone
> >>
> >> On 27 May 2011, at 21:51, William Hopkins wrote:
> >>
> >>> On 05/27/11 at 06:04pm, Will Ryder wrote:
> >>>> Hi,
> >>>>
> >>>> I have NFS mount of netapp filer on debian 6 and on a rhel 5 machines.
> >>>>
> >>>> I have samba server running on both machines that windows pc can connect to and access the nfs mount.
> >>> Why? Last I checked, netapp filers had SMB support.
> >> They do have cif shares but I cannot connect directly
> > Hmm. I don't follow this.. why not?
>
> Sorry, I did not describe my network properly and the permissions I need. Basically I need the UID and GID for file creation for data protection reasons.
Replicate the data to a normal windows share, preferably running on a windows server. Samba will do but really, if you have strict security precautions, keep it simple.
If you have security issues like this, it is your best option.
>

Samba and NFS

Will Ryder's picture

On May 27, 2011, at 10:08 PM, William Hopkins wrote:

> On 05/27/11 at 09:57pm, Will Ryder wrote:
>>
>>
>> Sent from my iPhone
>>
>> On 27 May 2011, at 21:51, William Hopkins wrote:
>>
>>> On 05/27/11 at 06:04pm, Will Ryder wrote:
>>>> Hi,
>>>>
>>>> I have NFS mount of netapp filer on debian 6 and on a rhel 5 machines.
>>>>
>>>> I have samba server running on both machines that windows pc can connect to and access the nfs mount.
>>> Why? Last I checked, netapp filers had SMB support.
>> They do have cif shares but I cannot connect directly
> Hmm. I don't follow this.. why not?

Sorry, I did not describe my network properly and the permissions I need. Basically I need the UID and GID for file creation for data protection reasons.

The windows pcs and rhel machine sit on one side of a Firewall/access control list on a subnet off the main network where the netapp is, the Debian machine sits on the main network with it's own firewall.

It is not a usual network configuration and the data storage has to have a high level of integrity. Therefore I am using TCP instead of UDP.
(Was quite impressed with the transfer speed, at one point I was getting ~ 100Mb/s (sorry to diverge from my original question), the server has two 1Gps network cards)

The not being able to connect via CIF is really due not a technical issue - I know it could be done - but it will not happen in this circumstances.

>>
>>>>
>>>> Is this advisable ? As I cannot have strict file locking. Or is there some way to make nfs and CID share work together file locking?
>>> Not advisable, no. SMB emulates windows locks and NFS mandates UNIX locks and they aren't compatible. You may or may not have issues.
>>> I would suggest you ask around the samba-technical list for best practices, and if you can't fully understand all the implications then you'd be safest finding another solution.
>>
>> That was what I thought I might get as a reply.
> Well, debian user has a wide variety of experience but sometimes it's best to get a bit more granular.

The data is write once as it is archived for a number of years, so I have to get it right! I will try the other list for more advice.
Therefore the not locking (setting strict locking = no in smb.conf) in some ways is not a big issue unless it affects data integrity.
I am thinking that users may need to transfer to unix machine via samba to a local raid stoage, then copy to the NFS share.

I will post on the samba technical list, thanks for your help

>
> Did you mean to reply to me off-list? If you always reply to list you'll get the most feedback, unless you want to take something offtopic or discuss individually (:
>
Replied on the Iphone - sorry should have been on the list, thanks for agreeing to bring this back to the list

Samba and NFS

Nico Kadel-Garcia's picture

On Fri, May 27, 2011 at 1:04 PM, Will Ryder wrote:
> Hi,
>
> I have NFS mount of netapp filer on debian 6 and on a rhel 5 machines.
>
> I have samba server  running on both machines that windows pc can connect to and access the nfs mount.
>
> Is this advisable ? As I cannot have strict file locking. Or is there some way to make nfs and CID share work together file locking?
>
> Thanks
>
> Will

Do not interpose a Linux box as a file server in between your clients
and the NetApp if you can avoid it. It's a significant performance
penalty, and resolving the permissions and group management is a
!@#$!@#$ nightmare. Samba 4.x can run NFSv4, but the features are
still difficult to manage.

If you've spent all that money for a NetApp, let it do the CIFS
services directly, if at all possible. This will require some
integration between the CIFS and NFS account management, but I think
you'll be on eheck of a lot happier.

And oh, yes: *PLEASE* tell me your NetApp admin set up your NetApp
filesystems ad UTF8, becuase otherwise, you can have some real
adventures with shared Windows and NFS access. (Windows will record
international characters in filenames that the NFS cannot deal with,
even to delete, without UTF8".)