I have a 'ramdrive' on a pi host mounted on another client pi. It is the /dev/shm folder used by RPI cam control. Here is the mount instruction used for it:
sudo mount -t cifs -o username=pi,password=\'?????' \"pib.local/ramdrive\" /mnt/pibramdrive
I use a bash script to copy jpegs to it, which are in turn processed swiftly and deleted by a python script on the host pi.
The python script raised an unhandled exception and stopped, so the drive was flooded. I a not certain that is what caused this though. When I noticed the handler script had stopped I started looking for the cause and noticed the following.
pi@frontcam:/mnt $ ls -l
ls: cannot access uberpiramdrive: Stale file handle
drwxr-xr-x 2 root root 0 Dec 7 19:34 camshare
d????????? ? ? ? ? ? uberpiramdrive
drwxrwxrwx 7 pi users 32768 Jan 9 23:48 usbdrive
So I did a umount -f on it and then mounted it again and it worked again. But then the script stopped again (this is when I found the unhandled exception, still not certain if it is relevant.) and looked again.
I still get a stale file handle. However I can go into the directory and it works fine, although it does not appear as a mounted directory in the ls.
pi@frontcam:/mnt/pibramdrive $ ls
camrgb.jpg frontdoorrgb.jpg mjpeg
After umount -f I can access the directory, no more stale. Then after mounting it again, all is fine and the directoy appears as mounted again.
Weird things going on, anybody got an explanation?