I've tried to make the title the most meaningfull I could but it still looks ugly.
The premises.
We are using RHEL3-U8 as OS on most servers here, don't ask me why or suggest to upgrade, it's not on today's schedule. That means kernel used is 2.4.21 I have no access to the remote server, but I know it is a netApp NAS rack.
$> smbclient --version
Version 3.0.9-1.3E.9
Here is the /etc/fstab line :
//NASHOSTNAME/share /mnt/mydir smbfs ro,uid=123,gid=123,workgroup=XXXX,credentials=/somefile 0 0
Here is the following mount output line
//NASHOSTNAME/share on /mnt/mydir type smbfs (0)
The symptoms.
I can list the share without problems, even cd in there. The issue appears if I try to read any file :
$> cat /mnt/mydir/fileX.txt
cat: /mnt/mydir/fileX.txt: Input/output error
In the system logs (/var/log/kernel for example) the following errors appear.
Jul 30 15:40:02 hostname kernel: smb_errno: class ERRHRD, code 31 from command 0x2
Jul 30 15:40:02 hostname kernel: smb_errno: class ERRHRD, code 31 from command 0x2
Jul 30 15:40:02 hostname kernel: smb_open: fileX.txt open failed, result=-5
Jul 30 15:40:02 hostname kernel: smb_errno: class ERRHRD, code 31 from command 0x2
Jul 30 15:40:02 hostname kernel: smb_errno: class ERRHRD, code 31 from command 0x2
Jul 30 15:40:02 hostname kernel: smb_open: fileX.txt open failed, result=-5
Jul 30 15:40:02 hostname kernel: smb_readpage_sync: fileX.txt open failed, error=-5
The ERRHRD code 0x001F error is "General hardware failure" although it seems samba sometimes uses it for a different purpose, see http://www.ubiqx.org/cifs/SMB.html [Strange behaviour Alert]
Additionnal informations : There is another SMB mountpoint on the system pointing to a (linux) host using samba and this one works.
What I have tried.
I have tried adding debug=4 to the mounting options and remounting the share and the logs still look the same.
I have tried to mount the share with smbclient and I am able to fetch files with the get command.
Both targets are in the same subnet, so network problem should be out, even if the LAN goes through a VPN with optimizers, MTU has already been decreased to 1450.
I can also mount the share through NFS but then the files are all root.root 700 and I need to read them with another user...