[Samba] Avoiding constant HDD access

Albert Berger nbdspcl at gmail.com
Wed Nov 7 09:46:50 UTC 2018


On Wed, Nov 07, 2018 at 08:54:11AM +0000, Rowland Penny via samba wrote:
> On Wed, 7 Nov 2018 05:45:45 +0300
> Albert Berger via samba <samba at lists.samba.org> wrote:
> 
> > I'm running a Samba server on Raspbian and observing that Samba
> > during idle periods is constantly (every minute) writing to HDD
> > (maybe doing some journaling?) what causes the HDD to constantly spin
> > and never standby:
> > 
> > root at rpi:~# pidstat -dl 20
> > Linux 4.4.50-v7+ (localhost) 	11/07/2018
> > _armv7l_	(4 CPU) 
> > 04:10:08 AM   UID  PID   kB_rd/s   kB_wr/s kB_ccwr/s iodelay  Command
> > 04:10:28 AM     0  832      0.00      0.20      0.20
> > 0  /usr/sbin/smbd -D 
> > 04:11:08 AM   UID  PID   kB_rd/s   kB_wr/s kB_ccwr/s iodelay  Command
> > 04:11:28 AM     0  832      0.00      0.20      0.20
> > 0  /usr/sbin/smbd -D 
> > 04:12:08 AM   UID  PID   kB_rd/s   kB_wr/s kB_ccwr/s iodelay  Command
> > 04:12:28 AM     0  832      0.00      0.20      0.20
> > 0  /usr/sbin/smbd -D
> > 
> > Is there some way (via configuration setting or maybe recompiling
> > with some parameter) to turn off this constant disk io?
> > 
> > /Al
> > 
> 
> At first glance it looks like something is trying to write to a share,
> but what is unclear from the info provided.
> 
> Can you post your smb.conf, without any commented lines and do not try
> to attach it to the post, all attachments are stripped by the mailing
> list.
> 
> Rowland
> 
> -- 


My smb.cnf:

[global]
   workgroup = WORKGROUP
   server string = Samba Server
   hosts allow = 192.168.1. 127.
   printcap name = /dev/null
   load printers = yes
   printing = bsd
   log file = /var/log/samba/%m.log
   max log size = 1000
   security = user
  username level = 6
  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
  username map = /etc/samba/smbusers
   include = /etc/samba/smb.conf.%m
   interfaces = 127.0.0.1/8 192.168.1.0/24
   local master = no
   os level = 33
   domain master = no
   preferred master = no
   dns proxy = no 

[lib]
path = /mnt/lib
valid users = al
write list = al
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
printable = no
locking = no
strict locking = no
directory mask = 0766

There are four more shares with similar settings.

When all client machines are disconnected from Samba server, the Samba's idle 
io activity remains the same: disk write every 60 seconds. If this were a 
simptom of some failure, shouldn't there have remained some trace in the logs?
I checked /var/log/samba directory, but there are no error reports in the last 
few days.

'smbd --version' returns '4.2.14 - Debian'.

/Al




More information about the samba mailing list