Skip to contentSkip to conversation

odd error: why: mount: /home2: mount(2) system call failed: Stale file handle

DISCUSSION L. A. Walsh 2 participants 4 messages Apr 8, 2021 – Apr 11, 2021

lore
Share & tools
lore
#0 lore raw

Started to try overlay fs w/one fs, but decided on another, so umounted the first -- hadn't done any changes.

Then tried a different lower dir (/home) and tried to mount into new dir /home2. Got:
mount: /home2: mount(2) system call failed: Stale file handle

any idea why? I cleared out contents of workdir (two empty dirs) but still didn't work again.

running a Vanilla-ish self-made kernel version 5.9.2... don't know what other info I should provide...oh well...

#1 lore raw
Quoted 8 lines · L. A. Walsh

Started to try overlay fs w/one fs, but decided on another, so umounted the first -- hadn't done any changes.

Then tried a different lower dir (/home) and tried to mount into new dir /home2. Got:
mount: /home2: mount(2) system call failed: Stale file handle

Quoted 6 lines

any idea why? I cleared out contents of workdir (two empty dirs) but still didn't work again.

running a Vanilla-ish self-made kernel version 5.9.2... don't know what other info I should provide...oh well...

You should normally at least look at kmsg, where you are likely to find "overlayfs: failed to verify upper root origin".

It is generally not allowed to reuse the upper layer and replace the lower layers after overlayfs has been mounted once.

If you say you did not change anything, it is not clear what is the benefit of reusing the empty upper layer.

Thanks,
Amir.

author
#2 lore raw
Quoted 6 lines · Amir Goldstein

It is generally not allowed to reuse the upper layer and replace the lower layers after overlayfs has been mounted once.

If you say you did not change anything, it is not clear what is the benefit of reusing the empty upper layer.

---
I can understand that, the upper layer is an empty fs+work dir
with no changes. It was attached to the wrong lower layer, unattached/unmounted.

I then made sure both upper+work were both empty and tried again
elsewhere. I want to avoid unnecessary steps, so destroying and recreating an empty partition didn't seem logical. How do you disassociate a previous connected state? What needs to be initialized on the unmounted upper and working dir (on the same fs), to reuse the same file system?

#3 lore raw
Quoted 10 lines · L A Walsh
Quoted 6 lines · Amir Goldstein

It is generally not allowed to reuse the upper layer and replace the lower layers after overlayfs has been mounted once.

If you say you did not change anything, it is not clear what is the benefit of reusing the empty upper layer.

---
I can understand that, the upper layer is an empty fs+work dir

You must mean empty fs+upper dir+work dir. No?

Quoted 6 lines

with no changes. It was attached to the wrong lower layer, unattached/unmounted.

I then made sure both upper+work were both empty and tried again
elsewhere. I want to avoid unnecessary steps, so destroying and recreating an empty partition didn't seem logical.

I am probably missing something. How is this complicated? rmdir upperdir workdir; mkdir upperdir workdir

Quoted 5 lines

How do you disassociate a
previous connected state? What needs to be initialized on the unmounted upper and working dir (on the same fs), to reuse the same file system?

You need to remove the trusted.overlay.* xattrs, but I still don't understand what's the complication with re-creating two empty dirs.

Thanks,
Amir.