Mounting Drives (sata HDDs for media and backup)

Since 2007 I’ve gone through phases of wrestling with fstab and then later on being lazy and using ‘gnome-disks’ to define mounting options. I’ve loved the way I started with a 300GB, added a 500GB 2 years later, and now having fairly huge capacities in comparison… right now I’m down to two Toshiba disks (3TB and 4TB mounted as /mnt/T3 and /mnt/T4) having finally ditched an old 1T5 Western Digital.

So in fstab (written out by gnome-disks) it’s fairly simple:

LABEL=T3 /mnt/T3 auto nosuid,nodev,nofail,x-gvfs-show 0 0
LABEL=T4 /mnt/T4 auto nosuid,nodev,nofail,x-gvfs-show 0 0

These files would be created in /etc/systemd/system/ and then, obviously then (for a permanent disk) enabled with sudo systemctl enable mnt-T3.mount (though I used gnome-disks to set up my fstab a few years ago, then copied the /run/systemd/generator files over and tidied them up a bit (yes, I really am that lazy :""")))).

After deleting the fstab entries, I realised they are needed to remount (i.e. if you unmount /mnt/T3 as mounted by systemd at boot, to remount it, you need to run the systemd start command, as selecting it in Dolphin causes udev to mount it following fstab, otherwise a temporary /run/media folder.)

Just a couple of questions/points here:

  • What=/dev/disk/by-label/T3 seems more useful and friendly to me, if T3 disk is destroyed then I can replace it with another partition with the same label. Is there any reason to prefer UUID? I think Labels give me flexibility in connecting stuff - as my recently purchased Samsung 860 EVO helped me see before it went back to the shop (it gave me a few hours of weirdness before completely failing to mount).

  • Where=/mnt/T3
    Why did I read that /mnt/ isn’t the desired place for a ‘permanent’ path? With a good bit of hunting for stuff to adjust (not least a plethora of Plex links and folders) I’m reluctant to ‘sort it out’.

My reference would be:

https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux-Filesystem-Hierarchy.html

/media Mount point for removeable media
/mnt Mount point for mounting a filesystem temporarily

Finally, it’s up to you.

I guess this is as good as using the UUID, as long as there is no encrypted device involved because the label of an encrypted device is not visible when the device is locked, and the label is unique.

I guess this is a question how to interpret “temporarily”. I for myself always use /mnt for more or less permanent mounts like backup disks and so on.

2 Likes

Yes, with Ubuntu since maybe 2009 I used /media/ but then I started with /mnt/. It looks simply like ‘mount’ and seems a pretty persistent mount point - also on reinstalling, it’s there…

I just read someone likes to create a /data folder to use for mounting them, but I see no logic in this; though I’d certainly regard /media/ as a good spot to mount my T3-server storage :rofl: but KISS says just stick with /mnt/ because it seems to work.

1 Like

I mount my HDD partitions at /mnt. These remain mounted all the while my system is switched on, so I won’t call it “temporary”. I don’t use /media because my HDD is not a “removable storage”. It has most of the files I regularly work on.
Even I have been a bit confused about the mount points. :woman_shrugging:
But I don’t think it matters too much. Does it?

1 Like

Feel free to mount stuff wherever you want to. The purpose of the LFH linked above isn’t to describe how an individual should manage their system. That is up to you.

Just don’t make permanent mounts in a tempfs location like /run or /tmp.

If you want to mount them in /mnt, go for it. Many people mount their filesystems there. You can also mount them inside your home directory or anywhere else that is convenient for you. You can even mount them inside each other if you want to.

2 Likes

As far as I know, most distributions switched to /var/run/media/$USERNAME/ for mounting devices. So, no matter what distribution you use, you don*t have to search for the mountpoints. I think this kind of agreement is quite useful and makes absolute sense. Even EndeavourOS/Arch uses this one. Nevertheless you can mount your devices wherever you want.