From Rainer Weikusat@21:1/5 to All on Wed Aug 31 20:08:08 2022
The sequence of commands below illustrates a rather 'amusing'[*] way a bind mount on Linux can fail with ENOENT:
root@brushfire:~# cd /tmp
root@brushfire:/tmp# rm -rf x y
root@brushfire:/tmp# mkdir x y
root@brushfire:/tmp# mount -o bind x y
root@brushfire:/tmp# rmdir x
root@brushfire:/tmp# mkdir z
root@brushfire:/tmp# mount -o bind z y
mount: /tmp/y: mount(2) system call failed: No such file or directory. root@brushfire:/tmp# ls -ld y
drwxr-xr-x 0 root root 0 Aug 31 19:03 y
An
umount y
can be used to fix this.
[*] It's especially amusing the the bind mount whose directory was
removed was done a couple of months ago and thus, lost in the mists of
time.