0

I have a setup where I need to log quite a bit of data on my Raspberry Pi. I have a 128GB USB stick that mounts to a folder called external where all my scripts/programs log to. This works well, except when the USB is removed the logs are written to the mount point and my script fails to remount it with:

FUSE exfat 1.3.0
WARN: volume was not unmounted cleanly.
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

I added the "nonempty" option and it didn't seem to notice it. I tried every possible combination of the -nonempty option, looked all over the internet, and couldn't get it to mount to a directory with contents.

Some of the things I tried, but did not work:

mount -o nonempty /path/to/drive /path/to/external
mount /path/to/drive /path/to/external -o nonempty
mount.exfat-fuse -o nonempty /path/to/drive /path/to/external
mount.exfat-fuse /path/to/drive /path/to/external -o nonempty

If I understand correctly, nonempty should just mount on top of my internal folder and hide the contents until it is removed. This is the behavior I want, if there is no USB present it writes to the internal drive, and if there is it writes to the external drive, no need to change my scripts. If you have any other ideas on how to make this work, I am open to suggestions.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.