[CLOSED] Stale file handle

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[CLOSED] Stale file handle

Postby spoulsen » Aug 8th, '17, 16:45

Hi all,

I wanted to do an ordinary mount, same as many times before:
mount /dev/sdb6 on /run/media/root/D2_Linux_Work

Then, out of thin air (never, ever seen before) came this error message:
mount /dev/sdb6 on /run/media/root/D2_Linux_Work failed: Stale file handle

For the record, mounting /dev/sdb1 works fine.

Searchings indicate that some process (?) is still keeping a file handle, therefore not accessible for others until released.
I don't know how to manually force a release (if that in fact is the problem), what to do?

System: Mag5, 64 bit

Grtz, Soren, CLI ability: absolutely average
Last edited by spoulsen on Aug 11th, '17, 17:24, edited 1 time in total.
spoulsen
 
Posts: 9
Joined: Aug 12th, '15, 16:23

Re: Stale file handle

Postby doktor5000 » Aug 8th, '17, 19:32

Hi there, it might help if you could add some context information what filesystem type sdb6 is, and the more obvious stuff like does that mountpoint exist, is nothing else mounted there, or is that filesystem maybe mounted already or maybe exported via NFS?
At least show the output as root of
Code: Select all
lsblk -fl
mount
fuser -m /dev/sda6
fuser -m /run/media/root/D2_Linux_Work


Apart from that, the "stale file handle" error usually only shows up in connection to NFS mounts. Was that filesystem exported via NFS at some time? Then you might need to check and clean up the hidden files there, which keep track of the NFSv3 locks.

If it's not related to NFS, then the filesystem is usually damaged - you should definitely try to run an fsck against that filesystem.
If you still need that data, better make a full image via e.g. dd_rescue or similar forensic tools of that partition before you try any repairs though.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Stale file handle

Postby spoulsen » Aug 10th, '17, 12:52

Both disks are running ext4, no NFS at all. The error showed up when I let Dolphin do a split. Dolphin's full txt:

An error occurred while accessing 'D2_Linux_Work', the system responded: The requested operation has failed: Error mounting /dev/sdb6 at /run/media/root/D2_Linux_Work: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb6" "/run/media/root/D2_Linux_Work"' exited with non-zero exit status 32: mount: mount /dev/sdb6 on /run/media/root/D2_Linux_Work failed: Stale file handle


Also:

Code: Select all
# lsblk -fl
NAME FSTYPE LABEL         UUID                                 MOUNTPOINT
sda                                                           
sda1 ext4   SSD_Mga5_32GB b0b7f296-5d38-4b2b-a83d-3d6dcb73c454 /
sda2                                                           
sda5 swap                 b7d144bc-58c9-4c25-bcb3-66e92535799f [SWAP]
sdb                                                           
sdb1 ext4   D2_Linux_Syst 47244794-fcf2-4d2f-99c4-a2f200c488fb
sdb2                                                           
sdb5 swap                 581debe7-1f3d-4a86-8c89-62b86913c805
sdb6 ext4   D2_Linux_Work 05d419bb-3f4c-4dd2-8747-88b416c4406b
sr0                     


and:

Code: Select all
# mount
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=4047128k,nr_inodes=1011782,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /tmp type tmpfs (rw)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime,mode=755)                                                                           
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=817480k,mode=700,uid=1000,gid=1000)


and:

Code: Select all
# fuser -m /dev/sda6                                                                                                     
Specified filename /dev/sda6 does not exist.                                                                                               
# fuser -m /run/media/root/D2_Linux_Work                                                                                 
Specified filename /run/media/root/D2_Linux_Work does not exist.


fsck scares me! It has already ruined one disk for me back in time.
spoulsen
 
Posts: 9
Joined: Aug 12th, '15, 16:23

Re: Stale file handle

Postby doktor5000 » Aug 10th, '17, 22:55

spoulsen wrote:
Code: Select all
# lsblk -fl
sdb6 ext4   D2_Linux_Work 05d419bb-3f4c-4dd2-8747-88b416c4406b


Code: Select all
# fuser -m /dev/sda6                                                                                                     
Specified filename /dev/sda6 does not exist.                                                                                               


So it would be
Code: Select all
fuser -m /dev/sdb6
now, as you can see above.
But as it's not mounted I believe this won't show anything, would only be useful if the disk was already in use.

spoulsen wrote:fsck scares me! It has already ruined one disk for me back in time.

Well, you can run it in readonly mode (fsck -n) so it will only report but not change anything.
And that's why I also suggested

If you still need that data, better make a full image via e.g. dd_rescue or similar forensic tools of that partition before you try any repairs though.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Stale file handle

Postby spoulsen » Aug 11th, '17, 00:43

@ doktor5000

OK, thank you very much for your advice.
How do I mark a post as closed but not solved?
Grtz, Soren
spoulsen
 
Posts: 9
Joined: Aug 12th, '15, 16:23

Re: Stale file handle

Postby isadora » Aug 11th, '17, 07:21

You can do so, by editing the subject/title in the first message in this topic.
Write [CLOSED] to the left of subject/title, thanks ahead. ;)
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2766
Joined: Mar 25th, '11, 16:03
Location: Netherlands


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron