Samba share on NFS : problem when NFS not respond

General support questions
Post Reply
Adrien.D
Posts: 23
Joined: 2016/10/26 06:57:18

Samba share on NFS : problem when NFS not respond

Post by Adrien.D » 2020/03/04 08:36:12

Hello,

I have a samba server on CentOS 7.
I have 2 shares.

1 share on local filesystem (/datavg/documents/it) and 1 on /nas/sauvegarde/logiciels mount point which is mounted on NFS :

Code: Select all

[it]
        browseable = no
        path = /datavg/documents/it
        comment = Partage informatique
        valid users = adrien
        public = yes
        force directory mode = 1777
        force create mode = 0777
        create mask = 0777
        directory mask = 0777
        directory security mask = 1777
[logiciels]
        comment = Logiciels Informatique et pilotes (Lecture Seule)
        browseable = no
        public = yes
        path =  /nas/sauvegarde/logiciels
        read only = yes
Here my /etc/fstab :

Code: Select all

/dev/mapper/datavg-documents    /datavg/documents       ext4    defaults        0 2
10.1.1.37:/nfs-srv-samba      /nas/sauvegarde         nfs     auto,_netdev    0 0
When the NAS is down (NFS share not available), all samba shares not respond.
I can't access to logiciels on NFS share, okay it's "normal"
But i can't access to it which is on local file system.

How can i configure samba to access to shares on local filesystem (although if nas is down) ?

Thanls

BShT
Posts: 585
Joined: 2019/10/09 12:31:40

Re: Samba share on NFS : problem when NFS not respond

Post by BShT » 2020/03/04 11:51:19

Does your NAS support samba share? Then split the configuration.

Adrien.D
Posts: 23
Joined: 2016/10/26 06:57:18

Re: Samba share on NFS : problem when NFS not respond

Post by Adrien.D » 2020/03/04 14:02:49

yes the NAS support smb.
But i want have 1 samba server (the centos) to centralise all accounts and perms, and use the NAS to extend storage using cheaper storage :mrgreen:

I think it's parametrable, but i don't know how.

It's very strange that the samba daemon freeze completely just because 1 share is unavailable.

afewgoodman
Posts: 98
Joined: 2019/12/11 03:51:58

Re: Samba share on NFS : problem when NFS not respond

Post by afewgoodman » 2020/03/05 01:12:00

Hi Adrien,

Did you try to access nfs only not using samba configuration with mounting point to somewhere?

BR.

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Samba share on NFS : problem when NFS not respond

Post by pjsr2 » 2020/03/06 08:48:36

Unless you have a very reliable NFS server (always on), you are better of when you use automatic mounting for the nfs (autofs).
When you use static nfs mounting, each time the client attempts to access the share, the nfs client will do its very best to connect the server and it takes a long time before it gives up. This affects all running processes on the NFS client negatively, as it slows down the response of the machine considerably.
With automounting, the file access on the NFS client fails quicker when the NFS server is not available. Furthermore, autofs has the advantage that the NFS mount is recreated automatically when the NFS server becomes available again. With autofs, the NFS mount is released when not in use for a longer period.

Adrien.D
Posts: 23
Joined: 2016/10/26 06:57:18

Re: Samba share on NFS : problem when NFS not respond

Post by Adrien.D » 2020/03/06 10:08:09

Hello,
i will see the autofs mechanism, maybe it's a good idea.
I see on NFS it's possible to use options (soft + timeo), il will try too to see which solution is the best for my context

Post Reply