You are not logged in.

#1 2019-09-27 11:03:39

chrpinedo
Member
Registered: 2017-10-12
Posts: 22

[SOLVED] mount.cifs: Stale file handle

Hi,

I am unable to access the files of several CIFS shares:
- I can mount the share
- I can list the file inside the share (with "ls") once mounted
- but.... when I try to work with the files inside the share (for example, "cp", "cat"...)  I get the error: Stale file handle.

These are my mount options in /etc/fstab: noauto,user,credentials=/etc/fstab.ldap.cred,uid=user,gid=users,file_mode=0600,dir_mode=0700

Any idea?

Thanks!

Last edited by chrpinedo (2019-09-30 07:47:16)

Offline

#2 2019-09-27 11:23:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [SOLVED] mount.cifs: Stale file handle

Remove the file modes would be my first guess, also ensure that uid= (i.e. is there literally an user called user?) and gid= are actually existing.

Online

#3 2019-09-27 11:57:15

chrpinedo
Member
Registered: 2017-10-12
Posts: 22

Re: [SOLVED] mount.cifs: Stale file handle

I tried to simplify the mount, but the error persists:

# mount -t cifs //server/share$ /mnt -o username=loginname,password=loginpass
# ls -alh /mnt/file
-rwxr-xr-x 1 root root 461K sep 26 14:38 /mnt/file
# LANG=C cat /mnt/file
cat: /mnt/file: Stale file handle

Last edited by chrpinedo (2019-09-27 11:57:36)

Offline

#4 2019-09-27 14:48:43

seth
Member
Registered: 2012-09-03
Posts: 49,949

Re: [SOLVED] mount.cifs: Stale file handle

1. Wonky connection
2. Wonky connection
3. Wonky connection
4. Bogus file cache on the host (but that implies /mnt/file was moved or deleted) - can you access the share from other systems fine?

Wonky connection can be either the network or the SMB server simply severs the connection.
Can you still navigate the remote path after this (into a directory you had NOT entered before)?
Can you "harden" the connection with some wire? (is there any wifi route involved at all?)
Anything suspicious in dmesg/journalctl?

Online

#5 2019-09-30 07:46:46

chrpinedo
Member
Registered: 2017-10-12
Posts: 22

Re: [SOLVED] mount.cifs: Stale file handle

Well I performed a lot of tests and the problem is the CIFS protocol version selected between my linux host and the storage device (VNX5800).

When I don't select and specific version with the "vers=" option, the common maximum protocol version between the host and storage device is selected, in my case CIFS version 3.0. Ok so I have "Stale file handle" errors with versions 2.0, 2.1 and 3.0 (3.1.1 version is not supported by the storage device); so I must force to use version 1.0.

Thanks for your comments!  you helped me try and discard several points.

Regards,

christian

Offline

#6 2021-03-31 10:38:08

nugbe
Member
Registered: 2021-03-31
Posts: 1

Re: [SOLVED] mount.cifs: Stale file handle

Hi Christian,
thanks for resolving our problem.

The full command would be (we have been trying putting "vers" in wrong part of the command, and want to share the full running command for other users):

mount -t cifs //server/share$ /mnt -o username=loginname,vers=1.0

Thanks for the help!
your mates wink

Offline

#7 2021-03-31 12:14:05

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] mount.cifs: Stale file handle

Closing this old solved thread.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB