[Samba] inotify (was: ACL)

Andrew Masterson Andrew.Masterson at nuvistaenergy.com
Fri Oct 23 10:35:09 MDT 2009


------------------------------------


> I'm trying to use samba to share some files with ACL.
> But when i create a new folder or file, I have to press F5 before I can see any change on the folder.
> For example:
> I create a new folder on a directory. But I can´t see it until i press F5
> Someone knows how to fix it?

Probably your Samba or kernel version is too old.  This has nothing to
do with ACLs.  Either Samba isn't monitoring files for changes (upgrade
Samba) or the required facility isn't available (kernel too old.)  I
think the code has been in the kernel for a long time, so probably a
Samba upgrade is in order.

FWIW I used to have this issue on Samba 3.0.x but not any more on 3.2.x.

Cheers,
Adam.

-----------------------------------

The samba 3.0.x series displays new files fine, it has to do with kernel conflicts.

For example, on one of our RHEL5.3 servers we are using the kernel 2.6.18-92.1.13.el5xen and Samba Version 3.0.31-SerNet-RedHat, and leaving inotify enabled causes runaway smb processes and spams log files that fill terabyte arrays.  In order to stop this we had to specify
       kernel change notify = no
in smb.conf, but newer kernel versions don't have this problem.  As far as I am aware, this is also only an issue when files are created via a non-smb process (i.e. sftp, local cp, etc.)

Newer kernel versions (i.e. 2.6.18-164.el5) work fine with Samba Version 3.0.33-3.14.el5, and if you create files locally they show up almost immediately on the client.

-=Andrew

 

 

Thankyou,  there is some good info here and I even kinda understand... :)  one question though, if I update samba what kind of issues might I have after that... I am sure I would have to re-start samba but would it mess with my very simple smb.conf file?  Or would it mess with any permissions?

 

 

One danger to updating samba versions is that they sometimes change the default options in the smb.conf file, and you will experience some strange behavior.  Before updating samba, I would do a

 

# testparm-v > fullsmb.conf

 

which will verbosely list all the default options so if something goes awry you can check back to make sure no defaults have changed.

 

Also make sure that you are backing up the proper samba files.  This is what my weekly backups look like (although you may not need to back it up as frequently):

 

#!/bin/bash

export DTYD=`date '+%y%m%d_%H'`

mkdir /BACKUP/LOCATION/samba/samba_weekly_${DTYD}

mkdir /BACKUP/LOCATION/samba/samba_weekly_${DTYD}/var_lib_samba

mkdir /BACKUP/LOCATION/samba/samba_weekly_${DTYD}/var_cache_samba

mkdir /BACKUP/LOCATION/samba/samba_weekly_${DTYD}/etc_samba

cp -r /var/lib/samba/* /BACKUP/LOCATION/samba/samba_weekly_${DTYD}/var_lib_samba

cp -r /var/cache/samba/* /BACKUP/LOCATION/samba/samba_weekly_${DTYD}/var_cache_samba

cp -r /etc/samba/* /BACKUP/LOCATION/samba/samba_weekly_${DTYD}/etc_samba

testparm -s -v > /BACKUP/LOCATION/samba/0_support_files/smb.conf.FULL.${DTYD}

unset DTYD

 

 

-=Andrew



More information about the samba mailing list