TransWikia.com

OverlayFS failing with "Stale NFS file handle" error

Server Fault Asked on December 16, 2021

I have a RootFS that’s a read-only SquashFS overlayed with writable storage (ext4, if it matters).

This is generally working but, after a while, one file became unaccessible:

# cat  /etc/init.d/update 
[  378.714771] overlayfs: failed to get inode (-151)
[  378.719636] overlayfs: failed to get inode (-151)
cat: can't open '/etc/init.d/update': Stale NFS file handle

It seems error is in the directory entry, since i get errors even with plain ls:

# ls  /etc/init.d/update 
[ 1256.618431] overlayfs: failed to get inode (-151)
[ 1256.623489] overlayfs: failed to get inode (-151)
ls: /etc/init.d/update: Stale NFS file handle

This error seems to survive reboot.

This specific file was edited, so I have two versions, one on the "lower" SquashFS and one on the "upper" ext4; both are accessible using the respective mount points: the error seems to come from OverlayFS itself.

I seem unable to clean this error (and I’m scared because this system should go in production 24/7), I already ran fsck -fp on all affected systems (not on SquashFS, of course).

Any hint welcome.

Note: I don’t have (and don’t need) NFS; I assume they reused this errno (151), but I don’t know.

UPDATE: I was able to clear the error by manually deleting the "new" copy of the file from the "upper" directory; subsequent editing of the same file worked as expected.

I’m very scared and I would like to understand what happened (and make sure it won’t happen again in "production"!).

UPDATE2: I am using defaults for OverlayFS in my kernel v5.7, should I select more options?

   <*> Overlay filesystem support
   [ ] Overlayfs: turn on redirect directory feature by default
   [*] Overlayfs: follow redirects even if redirects are turned off
   [ ] Overlayfs: turn on inodes index feature by default
   [ ] Overlayfs: turn on metadata only copy up feature by default

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP