I have external USB HDDs that are used for backing up data and that rotate over months. Only one of the disks is present at the same time.
The disks have different UUIDs (yes, it is possible to clone it, but I would try without).
/etc/fstab
looks like
UUID=e4281b1d-44e9-441d-9158-2b6f26beafaf /media/backup ext4 defaults,nofail,x-systemd.device-timeout=1s 0 1
UUID=7e5038f3-e44a-4413-a5ea-ef8e8cdf725c /media/backup ext4 defaults,nofail,x-systemd.device-timeout=1s 0 1
If the only first disk is present it works fine. If only the second disk is present it does not work with sudo mount -a -v
or restarting the system.
What really irritates me is that if only the second device is present after a restart, sudo mount -a -v
states that the HDD is already mounted, but it does not
show up if I use mount
.
If I comment the first device in /etc/fstab
like
# UUID=e4281b1d-44e9-441d-9158-2b6f26beafaf /media/backup ext4 defaults,nofail,x-systemd.device-timeout=1s 0 1
UUID=7e5038f3-e44a-4413-a5ea-ef8e8cdf725c /media/backup ext4 defaults,nofail,x-systemd.device-timeout=1s 0 1
it works as expected on restart or sudo mount -a -v
and mount
shows the device as
/dev/sda1 on /media/backup type ext4 (rw,relatime)
I have no clue what the reason could be. Do you have ideas?
I saw this solution that mentions a possible solution with udev, but if possible, I would like to avoid this: Mounting alternate devices (with different mount options) at the same mount point
/dev/sda1
instead of UUID?sudo mount /dev/sda1 /media/backup/
it on the command line but that did not work. Will try that in the next days./etc/fstab
. And execute the command when you have attached removable disk