Web lists-archives.com

Re: USB external hard drive -- mounting




On 29/08/17 09:25, James H. H. Lampert wrote:
Can anybody advise me on how to set this thing up so that if it's plugged in, it will mount, to a consistent mountpoint, whether anybody's signed on to Gnome or not?

I am not sure about the background automounting, but I get consistent mount points and mount settings with entries like these in /etc/fstab:

LABEL=Backup /media/backup ext4 noatime,noauto,user,errors=remount-ro 0 0 LABEL=Thumb /media/thumb vfat noatime,noauto,user,uid=1000,gid=1000,umask=007,utf8,flush 0 0

The noauto and hardcoded uid/gid might not work for you, but they could be a starting point. Perhaps noauto to stop automounting plus a udev rule? I have not tried this.

The above lines give me fixed mount points based on filesystem labels (LABEL), but UUID will also work. Device names are no good as they are by default dynamically assigned for USB storage devices.

Kind regards,

--
Ben Caradoc-Davies <ben@xxxxxxxxxxxx>
Director
Transient Software Limited <http://transient.nz/>
New Zealand