linux 4.4.92-31-default x86_64
I have two 128GB USB memory devices installed semi-permanently for backups. They are rotated occasionally for offsite storage. I would like to (auto-)mount the devices when the system boots.
Currently after a restart, the USB devices are not assigned a /dev/disk slot. They do have a label text assigned but that appears to be insufficient for “mount” using the “–label” option.
How do I mount the removable devices at boot time?
Or, if there is no way at boot, how do I mount the devices without having to remove/insert them?
Bus 002 Device 006: ID 0951:1666 Kingston Technology
Bus 002 Device 005: ID 0951:1666 Kingston Technology
Mass storage mounting at boot is configured in /etc/fstab.
Add nofail option in case they may not be present
That was simple. Thank you both.
I decided to have the devices mounted by LABEL and create each backup unit with the same label. The idea being that it will be easier to swap devices.
Note that LABELS must be unique to the system. ie you cant have two drives in the system with the same label at the same time. So plugging both devices in at the same time could lead to problems. In your case it should not be a problem as long as you don’t plug both devices in. Also you must umount the device and mount the new to swap them on a running system. You must umount to assure that any cache is written before removing or there is possible data lose.
To use labels is basically a very good idea for removable file systems. But as @gogalthorpe says, be sure you have only uniquely labeled devices in the house ;). Because you then you, as human being, are responsible of using the correct one. And human beings are fallible. Using labels is a way to prevent human errors in connecting. Using the same label again makes the whole exercise futile.