LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-29-2018, 02:39 AM   #1
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Rep: Reputation: Disabled
USB external HD remounted each day with new device number


Although everything seems to be working as expected, inspection of the messages log shows that my external hard drive has been disconnected and then reconnected as a new device with the next device number. The relevant lines from /var/log/messages are:
Quote:
Jun 29 03:17:19 <MyComp> kernel: [838882.195091] usb 1-5: USB disconnect, device number 11
Jun 29 03:17:19 <MyComp> kernel: [838882.510169] usb 1-5: new full-speed USB device number 12 using xhci_hcd
Jun 29 03:17:20 <MyComp> kernel: [838882.659849] usb 1-5: New USB device found, idVendor=8087, idProduct=07dc
Jun 29 03:17:20 <MyComp> kernel: [838882.659864] usb 1-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
The device is a Western Digital Passport 2TB that I use as a backup drive. The disconnect occurs nightly approx three to four hours after backup (using several cp -a commands). The machine is in use as a server providing network storage, hosting a couple of VirtualBox VMs, and so needs to remain running 24/7.

This is on a Gigabyte BRIX GB-BACE-3150 with 4GB RAM running Debian 9. uname -r returns "4.9.0-6-amd64". /sbin/lsusb does not exist.

Two questions: 1. Is this a problem? and 2. How can I resolve this so that either the HD remains connected or it is reconnected with the same device number?

Thanks for any help, Geoff
 
Old 06-29-2018, 03:18 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
1) Yes
2) Find out what the problem is - probably hardware. USB port , cable, cleaner kicking it ...

Power would be my bet - I've seen similar when the USB port can't supply sufficient. I habitually use external powered devices, or a powered hub these days.
As for the mounting problem, use UUID or maybe better in this case LABEL in fstab.
 
Old 06-29-2018, 03:22 AM   #3
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by Geoff_L View Post
Although everything seems to be working as expected, inspection of the messages log shows that my external hard drive has been disconnected and then reconnected as a new device with the next device number. The relevant lines from /var/log/messages are:

The device is a Western Digital Passport 2TB that I use as a backup drive. The disconnect occurs nightly approx three to four hours after backup (using several cp -a commands). The machine is in use as a server providing network storage, hosting a couple of VirtualBox VMs, and so needs to remain running 24/7.

This is on a Gigabyte BRIX GB-BACE-3150 with 4GB RAM running Debian 9. uname -r returns "4.9.0-6-amd64". /sbin/lsusb does not exist.

Two questions: 1. Is this a problem? and 2. How can I resolve this so that either the HD remains connected or it is reconnected with the same device number?

Thanks for any help, Geoff
Do your backups complete without error?

You may not have the "usbutils" package installed. It may have a slightly different name depending on you're Linux distribution - the "usbutils" package that is.

EDIT: syg00 beat me to it! I was still typing when he replied.

Last edited by jsbjsb001; 06-29-2018 at 03:30 AM. Reason: typos and corrections
 
Old 06-29-2018, 06:09 AM   #4
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
Thanks guys.

Responding to your comments:

I am using UUID in fstab to mount the USB drive on empty folder /media/usb01, viz:
Quote:
# USB01 was on /dev/sdb1 originally
UUID=0a7ee614-7199-4594-88e8-3c48c06b96f0 /media/usb01 ext4 errors=remount-ro 0 1
However, the drive hasn't remounted RO as the backup completes each night (I have the backup script direct stdout to a log file that I inspect each morning). I'm now wondering whether the pass parameter of 1 is correct as I've just read some docs that suggest only the root volume should have pass=1 and everything else should have either 0 or a value >1. I'll check the docs to find out how to use LABEL in fstab instead of UUID.

The box is mounted to the back wall of a cupboard and powered by a UPS within the same cupboard, so I doubt that the cleaner (which would be me) is kicking the cable. However, it's a mini-ITX board and so the power might not be up to it, though it seems weird to me that the disconnect/reconnect happens once only per 24 hours and then three to four hours after the backup completes! I'll try swapping to a different USB port. If I exhaust all other possiblities, I'll get a powered USB3 hub. Hopefully the system will hang together long enough for me to resolve the issue.

Thanks again, Geoff
 
Old 06-29-2018, 06:53 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
A umount will generate that disconnect message - may not be h/w after all; have you checked cron/systemd.timers ?
 
Old 06-29-2018, 10:02 AM   #6
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
A umount will generate that disconnect message - may not be h/w after all; have you checked cron/systemd.timers ?
I can't find cron/systemd.timers, I suspect it should be somewhere under /etc but can't find it. I have checked both my user and root crontabs and there's nothing to umount the USB drive. Can you help with the usual path to cron/systemd.timers?

Edited to add: {doh!} I guess you meant cron and/or the timers. I had a look at all the *.timer files I could find but didn't see something that might unmount the drive.

Thanks, Geoff

Last edited by Geoff_L; 06-29-2018 at 03:15 PM. Reason: To clear up my misunderstanding
 
Old 06-29-2018, 12:34 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Just a SWAG but most WD external drives will spin down (I assume this is a not a SSD) after about 10 minutes of inactivity. It could be that the drive is not responding fast enough for the system when accessed at that particular time so it is disconnected and then a short time later responds but will be assigned a new device number.

WD external drives typically have a utility which can change the default settings but would assume they were deleted when you formatted the drive as ext4. You might be able to download the utility from their website. Another guess is that it could be a USB 3 driver problem with WDs power saving mode although I would of expected an increase in forum traffic on the same topic and I don't or just not looking in the right places. A number of years ago WDs external drives would enter power save mode and linux could not wake them back up again although they worked fine when connected to a Windows system.
 
Old 06-29-2018, 03:22 PM   #8
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Just a SWAG but most WD external drives will spin down (I assume this is a not a SSD) after about 10 minutes of inactivity. It could be that the drive is not responding fast enough for the system when accessed at that particular time so it is disconnected and then a short time later responds but will be assigned a new device number.[...]
Thanks for the suggestion.

I suspect that any drive would spin down in this context as it is normally explicitly accessed only during the backup procedure and so spends 20+ hours a day idle unless a background task accesses it.
 
Old 06-29-2018, 05:47 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Sorry about that - note to self: use "and/or" in future ...
 
Old 07-05-2018, 03:14 AM   #10
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
Status Report:

I've switched USB ports to no avail but haven't yet taken the plunge to get a powered hub. However, I noticed that the device identification (New USB device strings: Mfr=0, Product=0, SerialNumber=0 in /var/log/messages) all are zeros. I suspect that any original values coded on the disk were wiped when I reformatted the drive to ext4 and I wonder whether the lack of non-zero values here might be the cause of the drive reconnecting with a new device number each time? I also wonder whether I can safely change these values (say, using gparted) and what these should be for a WD Passport drive? Can anyone shed light here?

Thanks, Geoff
 
Old 07-09-2018, 03:17 AM   #11
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
You can easily write a udev rule that will give a fixed alias such as /dev/wd_passport which will always point to the device no matter the device number. You would just use /dev/wd_passport when referring to the drive. There are many good guides on how to write udev rules.
 
Old 07-09-2018, 05:16 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
The serial number and other product information are stored in the drives electronics. You can not change these values. The drive could be failing or has power problems.
 
Old 07-12-2018, 01:34 AM   #13
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
Solved?

Possibly coincidence, but I noticed that the messages log also showed the Bluetooth/WiFi firmware was missing. I wasn't concerned about that because I don't use wireless with this machine (and I've turned both BT and WiFi off in the OS); but the messages were annoying and so I installed the required non-free firmware. Since doing that, the USB drive hasn't disconnected and I'm left scratching my head, wondering if there is a connection between wireless and USB.
 
Old 07-12-2018, 02:04 AM   #14
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Power draw would be a connection IMO. I was leaning towards usb cable TBH.

Most usb things that don't come with a wall wart I run through a powered hub. Although mostly to bring the ports closer to my chair / quality of the hub type thing. Plus a few historical instances of quirky devices that ONLY work when through a hub, even a un-powered one. But didn't work (reliably) when connected directly to the host port.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb 1-1: reset high-speed USB device number 2 using ehci-pci jotapdiez Slackware 3 11-14-2014 02:42 PM
[SOLVED] hd device remounted with commit=600 sanjioh Slackware 4 01-03-2013 11:26 AM
[libusb] How I can get information about description number usb device Paweł Programming 4 05-25-2011 05:42 PM
usb external HD issue: reset high speed USB device using ehci_hcd gstath Slackware 4 08-18-2010 01:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration