[ale] USB "duplicate" drive issue on CentOS

Edward Holcroft eholcroft at mkainc.com
Thu Jun 16 11:33:10 EDT 2016


All,

I am running USB HDD backups (encrypted with LUKS) on multiple CentOS 7
boxes using rsync. The drives get swapped out for each day of the week and
I use autofs to mount them. On some (not all) of these servers I encounter
an issue whereby the drive does not automount and shows has a duplicate
entry in messages:

Jun 16 10:48:01 atlfs systemd: Device
dev-disk-by\x2duuid-0a647b12\x2dfce7\x2d4745\x2db6f7\x2d8bfa3ffd56d8.device
appeared twice with different sysfs paths
/sys/devices/pci0000:00/0000:00:02.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/usb2/2-2/2-2:1.0/host5/target5:0:0/5:0:0:0/block/sdd
and
/sys/devices/pci0000:00/0000:00:02.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/usb2/2-2/2-2:1.0/host92/target92:0:0/92:0:0:0/block/sdi

​The FIRST time ​I put the USB backup drive (say MONDAY) in place, it all
works fine, but the following week when I put that same drive in again, and
any subsequent time, this error comes up.

If I reboot the server, the error goes away ... until the next week. So
somehow, it seems that device is being retained by the system and then
shows as a duplicate the next time the drive is connected to the USB dock.

It works fine on some machines and failing on others. Same hardware, same
version of ​CentOS. Same setup. On a working machine I get the following
when plugging in USB drives:

Jun 16 08:14:44 nwofs systemd: Expecting device /dev/mapper/THURSDAY...
Jun 16 08:14:44 nwofs systemd: Starting Cryptography Setup for THURSDAY...
Jun 16 08:14:47 nwofs systemd: Found device /dev/mapper/THURSDAY.
Jun 16 08:14:47 nwofs systemd: Started Cryptography Setup for THURSDAY.

and lsblk shows:

sdf               8:80   0  1.8T  0 disk
└─THURSDAY      253:7    0  1.8T  0 crypt

On a failing machine I get the error in messages about the device appearing
twice and the following output from lsblk showing no drive available until
I open it manually:

sdg                          8:96   0  1.8T  0 disk


If I try to manually delete the path to the offending duplicate block
device (e.g.
/sys/devices/pci0000:00/0000:00:02.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/usb2/2-2/2-2:1.0/host5/target5:0:0/5:0:0:0/block/sdd),
I get "No such file or directory".

So for now I have been doing manual backups on the non-working servers.
Doh! I thought I would easily find the issue by comparing
working/non-working. Alas, this is not to be.

Any ideas?

​ed​

-- 
MADSEN, KNEPPERS & ASSOCIATES USA, MKA Canada Inc. WARNING/CONFIDENTIALITY 
NOTICE: This message may be confidential and/or privileged. If you are not 
the intended recipient, please notify the sender immediately then delete it 
- you should not copy or use it for any purpose or disclose its content to 
any other person. Internet communications are not secure. You should scan 
this message and any attachments for viruses. Any unauthorized use or 
interception of this e-mail is illegal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20160616/240ac84b/attachment.html>


More information about the Ale mailing list