You are not logged in.

#1 2021-04-08 06:15:30

Werzi2001
Member
Registered: 2012-07-07
Posts: 41

[SOLVED] mount overlayfs failes: stale file handle

Hi everybody,

I created a overlay fs yesterday and tried to remount it today (after a reboot). The mount fails becaus of a "stale file handle" error and I can't figure out why. Everything related to that error that I could find was related to NFS which is not used in my mount. Here the command:

# LANG=C mount -t overlay overlay -o lowerdir=/mnt/images_complete,upperdir=/mnt/images_main/data,workdir=/mnt/images_main/work /mnt/images
mount: /mnt/images_external: mount(2) system call failed: Stale file handle.

Basically I try to merge image libraries using 2 disks. Yesterday that worked perfectly. Today I get the error. Reboot etc. doesn't change anything.

Can anybody explain why this might occur?

Thanks a lot.
Best Regards

Edit:
I just found the reason. /mnt/images_complete can be different disks depending on what I want to edit (files spread between multiple disks). The overlay fs only works with the disk that I initially used. Anyhow I don't get why this matters (even after a reboot). Should overlay fs not just "merge" the directories and don't care what the content is and where it comes from?

Last edited by Werzi2001 (2021-04-09 18:25:02)

Offline

#2 2021-04-09 18:24:46

Werzi2001
Member
Registered: 2012-07-07
Posts: 41

Re: [SOLVED] mount overlayfs failes: stale file handle

After further research I found the sections "Sharing and copying layers" and "Metadata only copy up" here: https://www.kernel.org/doc/Documentatio … rlayfs.txt

It seems that the "inodes index" feature is enabled by default and that causes the error. Disabling the "inodes index" feature (and just to be sure also disabling the "metadata only copy up" feature) resolves the error:

LANG=C mount -t overlay overlay -o index=off -o metacopy=off -o lowerdir=/mnt/images_complete,upperdir=/mnt/images_main/data,workdir=/mnt/images_main/work /mnt/images

Offline

Board footer

Powered by FluxBB