Backup problem - cifs mount error every 6 or 7 days

NethServer Version: 6.9

Problems with backup seems never ending for my servers.
Every 6 or 7 days a backup error happen:

mount error(5): Input/output error Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Before and after the error the nas responds correctly at ping (i’ve activated a script to logging ping result every 10 minutes). So isn’t a NAS (mount for other pc work correctly) or a network problem.

The error doesn’t disappears simply doing a reboot. After the reboot it’s impossible mount the NAS shared folder.

The problem disappears only if i update:

yum update

After the update (also without reboot) the NAS shared folder mount correctly.

Anyone have encountered this problem ?
I cannot update the server every day or every six days. The servers are not connected to internet.

How can i check which command duplicity use to mount the Nas shared folder ?

It will be like:

mount -t cifs -o username=XXXX,password=XXXX // /mnt/backup

I haven’t found where the command is stored.

yum update does nothing most of the times, I think it’s a coincidence.
To mount the share type:

The “low level” command is:

/bin/mount -t cifs "//$smbhost/$smbshare" $mntdir -o credentials=$tmp,nounix

The credentials file contains:
user=nas username
password=you guess

I also think it’s a coincidence because a simply reboot of the server doesn’t resolve the problem. So it’s not a block of the cifs service.

I think that is related to an “incomprehension” at “security level”.
The mount from windows system (10 and 7) always work.
The nas is set in SMB 2,1 (compatibility with samba version 1 and 2)

So i think that windows has a better “negotiation algorithm”.
In my mind windows (i don’t really know if it the used algo) if one protocol version or a security type fails, it try another combination.

When I encountered similar problems in the past (it happens rarely), a NAS firmware update solved the issue.

The NAS firmware Qnap QTS is always the lastest.
When a new release is available the qnap send an email and an operator update the firmware.

But this problem persist for a long time and in this time the QTS was updated many times.
I can’t explain why from windows pc the mount always work.

There is a way to specify more option in the command used by duplicity to munt cifs share ? Like protocol version, security option…

BTW, I’m using a QNAP for backups from NethServer, with CIFS I never had a problem (we are talking about over 3 years of backups).

I start the server and qnap and, “ideally”, for a month or more, they have to work without maintenance. (My setup isn’t connected to internet. Is connected only for update.).

Can you share your Qnap setting ?

Do you mean this?

It’s a TS-439 Pro II

I’ve the same settings for the shared folder.
Also the service SMB settings… Control Panel > Network services > Win/Mac/NFS > Advanced options
Mine it’s a TS-269 Pro, the same of your but with only 2 hd bay.

Mention me next time it happens, we’ll try to debug it together.

If nothing change will by within 6-7 days.

Can you post your QTS settings on Samba Protocol version: Control Panel > Network services > Win/Mac/NFS > Advanced options ?

Is there a cron task with this interval somewhere in Nethserver or in the NAS ?

All cron task i’ve added are daily or minutes based:
Dump of application DB for backup (daily)
Ip Logger (every 10 minutes to monitor the reachability in lan, ping one/ two nas)

have you checked the exact time on NAS AND Nethserver ? Sometimes this is the reason for lost share.
I read, that your nethserver has no connection to internet.
What’s the timeserver for NAS/Nethserver - it should be the same,
And is there no error when time is updating ?

Why the time had to be exactly the same ?

I’ve checked many times… it’s almost the same… after a month the difference is more or less 2-3 second. I think that both server and qnap are equipped with a stable RTC.

When they are connected to internet to do an update the time is also synchronized.

Here’s a screenshot.

Thanks !
I think we have the same basic configuration.

exaclty after 7 days… whithout any apparently reason…

Extract from log file /var/log/backup-data.log:

2017-06-22 20:30:07 - START - Backup data started
2017-06-22 21:31:26 - ERROR - Error while mounting : mount error(5): Input/output error Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 
2017-06-22 21:31:27 - ERROR - Event pre-backup-data failed - 1

Nethserver is unable to mount correctly the nas shared folder

@filippo_carletti is quite busy at the moment, I think he is going to reply you as soon as possible.