Hard Drive Mounting Point Changes

Hi there,

I have a issue which happens very seldom but is very annoying none the less. OSMC on the Raspberry Pi seems to handle the hdd’s very well without any issues yet once in a blue moon it happens that when the HDD is unplugged from the Raspberry Pi and plugged in again the mounting point will change and OSMC will use the new mounting point from then on out.

The old mounting point will be /media/Movies/ and this will work for months on end and suddenly one day the mounting point will change to /media/Movies_1/ automatically. This causes all the media within the library to become useless as all the files are missing. I am then forced to re scan the entire drive to repopulate the library to get the file paths correct. This has its own issues such as all the watched indicators will be reset etc.

My question is, is there a way that I can ensure that the hard drives mount on the same mounting point every time? in fstab maybe?

Thanks
J

You must use the option to safely remove drive before just yanking it out.

Noted, And this will definitely prevent the issues mentioned above? Where in OSMC can one find this option?

It’s quite likely if you are not removing them properly already, then yes.

If you use “Files” view, you should see your USB device listed. Open its context menu and select “Remove safely”.

Yes. Other possible cause could be the device not receiving enough power.

Ok thanks guys. I will definately start incorporating these good habits.

As an informational interest as well. Isthere a way to achieve what has been asked in the question? I vaguely remember reading something similar which alowed you to guarentee the same mounting point on linux (this was raspbian if i am not mistaken) by specifying the mount directory linked to the disks UIID.

Thanks sam. Power is not an issue. Using correct power supply and disks are externally powered.

Make the directory you want to mount the HDD at, I recommend placing it in the /mnt directiry: sudo mkdir /mnt/MOUNT-POINT

Get the UUID for the HDD sudo blkid

Open fstab for editing sudo nano /etc/fstab

Add line in the format:

UUID=AAAA /mnt/MOUNT-POINT filesystemtype defaults,nofail 0 0

For example, on my system:

UUID=57D9-E196 /mnt/1TB ext4 defaults,nofail 0 0

Then sudo mount -a

If no errors are thrown up then you should be golden, if you get errors take a look at the link below.

https://wiki.archlinux.org/index.php/fstab

1 Like