You are not logged in.

#1 2019-07-01 02:28:58

ElDani
Member
Registered: 2019-06-18
Posts: 6

Previously working UUID mount in /etc/fstab fails

Hi guys.

This is a bit of a weird issue. I have connected an external USB storage device (Seagate Backup Hub Plus 8TB) to the headless Arch server I've been running and added an entry in the /etc/fstab file to mount the drive automatically:

UUID=EB8F46B7-9A0A-4943-A983-C71F9224F1C5      /media/storage  ext4            rw,relatime      0 0

This has worked for a couple of weeks until today. When I rebooted the machine after installing docker due to the requirement for additional kernel modules, it failed with the following error message:

Jul 01 01:53:02 ArchRaven systemd[1]: dev-disk-by\x2duuid-EB8F46B7\x2d9A0A\x2d4943\x2dA983\x2dC71F9224F1C5.device: Job dev-disk-by\x2duuid-EB8F46B7\x2d9A0A\x2d4943\x2dA983\x2dC71F9224F1C5.device/start timed out.
Jul 01 01:53:02 ArchRaven systemd[1]: Timed out waiting for device /dev/disk/by-uuid/EB8F46B7-9A0A-4943-A983-C71F9224F1C5.

So I tried to defer mounting until it was required by modifying the /etc/fstab entry like this:

UUID=EB8F46B7-9A0A-4943-A983-C71F9224F1C5      /media/storage  ext4            rw,relatime,noauto,x-systemd.automount      0 0

This allowed the system to boot again, but it produced the same kind of error, in that the mount did not complete successfully. When I tried mounting manually with `mount /media/storage`, which reads the required details from the /etc/fstab file I think, the shell freezes until, a couple minutes later, I eventually get the same error message about the mount action timing out.

At first I thought the device may have malfunctioned, because I'm no stranger to dead HDDs, but the device and partition were still recognized properly in `lsusb` and `fdisk -l` with the UUID being the same one that is used in /etc/fstab. Next I tried using `smartctl`, which failed with the following error:

Read Device Identity failed: scsi error unsupported field in scsi command

Then I googled some and found this to be a familiar issue with external Seagate drives, so I didn't bother following up on it further. As an aside, if someone knows how I could access SMART data of the drive I'd be grateful.

Instead I commented out the reference to the external HDD in /etc/fstab, disabled the services that relied on it and rebooted. I checked the partition with fsck and could not find any errors. A subsequent simple manual `mount /dev/sdb1 /media/storage` worked and after starting the services manually, the system runs the same as before and the mounted partition works fine.

Can anyone tell me why I can mount the drive manually and why the mount via the UUID reference fails with a timeout both at boot time and on demand when required by a service?

I haven't tried referencing /dev/sdb1 directly instead of the UUID in /etc/fstab, but I wanted to avoid this, as I'm unsure if the drive would ever change from sdb if additional USB storage were to be connected at boot time. That's a valid concern, because I sometimes add a USB thumb drive for data exports that shouldn't be sent over the internet and I may just forget to unplug it.

Thanks for your help,
Dan

Offline

#2 2019-07-01 09:32:32

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: Previously working UUID mount in /etc/fstab fails

ElDani wrote:
UUID=EB8F46B7-9A0A-4943-A983-C71F9224F1C5      /media/storage  ext4            rw,relatime      0 0

Instead I commented out the reference to the external HDD in /etc/fstab, disabled the services that relied on it and rebooted. I checked the partition with fsck and could not find any errors. A subsequent simple manual `mount /dev/sdb1 /media/storage` worked and after starting the services manually, the system runs the same as before and the mounted partition works fine.

In the last situation, did you try the command with the UUID:

mount -v -U EB8F46B7-9A0A-4943-A983-C71F9224F1C5 /media/storage

I read this also in 'man mount':

Note that mount(8) uses UUIDs as strings.  The UUIDs from the command line or from fstab(5) are not converted to internal binary representation.  The string representation of the UUID should be based on lower case characters.

Don't know if it's relevant.

Offline

#3 2019-07-01 11:40:00

ElDani
Member
Registered: 2019-06-18
Posts: 6

Re: Previously working UUID mount in /etc/fstab fails

berbae wrote:

Don't know if it's relevant.

It seems to be, but I don't know the how/why/what of it and it's the first time capitalization of the UUID has produced an error for me and I've been doing this for years.

Just a short recap: the mount command you suggested produced an error that said the UUID couldn't be found (I use German locale so I'll save pasting the direct output). As soon as I changed it to lowercase lettering, it mounted fine and the same is true for the entry in /etc/fstab.

The strange thing is, I'm running an Arch Linux instance on my laptop via VMware and I can't reproduce the issue there. After forwarding the same USB storage device to the virtual machine, I can use both upper- and lowercase strings to the same effect.

Maybe it's because one uses a German locale, the other not? I have no idea, since neither system received any deep changes, merely the usual installation of packages, setting up some users, a handful of new services, etc.

Thanks though, I'm grateful to you for the suggestion, I'll pay better attention to the manpages from now on smile

Offline

Board footer

Powered by FluxBB