Directories Purged on Reboot

Hi All,

I have various samba mounts mounting to subdirectories in /media/*

For example I have:
/media/Littleman
/media/Secondary
/media/Tertiary

They all work flawlessly but when I reboot all of my subdirectories within /media are purged so I have to recreate them. This problem is relatively new (I’d say in the last 2-3 releases).

Suggestions?

Logs would he helpful :wink:

Are you mounting via fstab? If so, I’d like to see your fstab.

The recommended mount is actually /mnt not /media. However, I can say that I use /media for all my mounts and have no problems.

EDIT: I had forgotten that when I created the mount points, I had added a .keepme file to prevent the mount point from being deleted.

Did you read the README file present in /media??

osmc@Vero4Ktesting:/media$ cat README
#### Notice ####

This directory is for automounted drives. Empty directories here are purged on reboot.

If you wish to configure an /etc/fstab mount for a drive that is attached permanently, you should do so in the /mnt directory

It sounds like OSMC is doing what it’s meant to do.

We clean up old directories because drive labels can change or may never be used again.

Mount anywhere other than /media

How do I create a keepme file? I’m not really a fan of completely reconfiguring my setup (multiple systems mounting to same location and have been doing this for years…).

Ensure that the folder is unmounted and then execute
touch /media/Drivename/.keepme

Thank you! Seems to have done the trick.