[Ubuntu] External drive randomly unmounting itself

Joined
Oct 30, 2002
Messages
41,938
Location
Great Lakes
I've recently added a 3.5" HDD in an external powered enclosure to my Ubuntu machine. It's connected via USB.

I had other self contained portable drives connected to this machine via USB in the past, and never experienced any random unmount issues. But with this new one, it unmounts itself (seemingly) randomly every few days. This machine stays on 24x7 as it is my home media server.

I have a line in FSTAB to auto mount this drive when the machine starts, and it looks like this:
Code:
UUID=XXXXXXXXXXXXXX /media/pass ntfs-3g defaults,windows_names,nofail,locale=en_US.utf8 0 0

Any idea what is causing it to unmount itself and how to prevent it from happening?

Thanks!
 
Joined
Jun 26, 2003
Messages
12,677
Location
Illinois
What do the logs show you?

Odd I tried to put the path of the logs. / var / log / syslog and / var / log / dmesg
I'm guessing the board parses the strings as formatting instructions. Remove the spaces.
maybe grep UUID / var / log / syslog
and
grep UUID / var / log / dmesg
Again, the actual paths have no spaces.

Edited to add, also use the UUID from your example above
 

Quattro Pete

Thread starter
Joined
Oct 30, 2002
Messages
41,938
Location
Great Lakes
Maybe my syntax is wrong, but I am not getting any results from the above commands. This is what I'm typing:

1664062102219.jpg

But instead of UUID I am entering the actual UUID of the drive.
 
Joined
Dec 19, 2019
Messages
3,979
Location
Muncie, Indiana
I'd be checking DMESG for USB related errors to see if the enclosure is having some sort of issue and resetting itself or something or maybe the power saving settings on the drive don't play well with your enclosure or something.
 

Quattro Pete

Thread starter
Joined
Oct 30, 2002
Messages
41,938
Location
Great Lakes
OK, so I used this command instead: sudo dmesg | grep -i USB

It gave the following output:
Code:
[    0.147623] ACPI: bus type USB registered
[    0.147623] usbcore: registered new interface driver usbfs
[    0.147623] usbcore: registered new interface driver hub
[    0.147623] usbcore: registered new device driver usb
[    0.197268] pci 0000:00:1d.0: quirk_usb_early_handoff+0x0/0x6a0 took 23174 usecs
[    1.046492] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.046796] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 1
[    1.065175] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    1.065271] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.065275] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.065276] usb usb1: Product: EHCI Host Controller
[    1.065278] usb usb1: Manufacturer: Linux 5.4.0-125-generic ehci_hcd
[    1.065280] usb usb1: SerialNumber: 0000:00:1d.0
[    1.065575] hub 1-0:1.0: USB hub found
[    1.065885] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.065916] uhci_hcd: USB Universal Host Controller Interface driver
[    1.066177] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    1.067369] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
[    1.067371] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[    1.067397] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.067398] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.067399] usb usb2: Product: xHCI Host Controller
[    1.067399] usb usb2: Manufacturer: Linux 5.4.0-125-generic xhci-hcd
[    1.067400] usb usb2: SerialNumber: 0000:00:14.0
[    1.067569] hub 2-0:1.0: USB hub found
[    1.069278] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
[    1.069280] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.069281] usb usb3: Product: xHCI Host Controller
[    1.069282] usb usb3: Manufacturer: Linux 5.4.0-125-generic xhci-hcd
[    1.069282] usb usb3: SerialNumber: 0000:00:14.0
[    1.069463] hub 3-0:1.0: USB hub found
[    1.321177] usb 1-1: new high-speed USB device number 2 using ehci-pci
[    1.485902] usb 1-1: New USB device found, idVendor=8087, idProduct=8000, bcdDevice= 0.04
[    1.485905] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.486248] hub 1-1:1.0: USB hub found
[    2.086268] usb 3-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[    2.106031] usb 3-2: New USB device found, idVendor=04e8, idProduct=4001, bcdDevice= 1.00
[    2.106035] usb 3-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    2.106037] usb 3-2: Product: PSSD T7
[    2.106038] usb 3-2: Manufacturer: Samsung
[    2.106040] usb 3-2: SerialNumber: S5TMNS0R504918J
[    2.111498] usbcore: registered new interface driver usb-storage
[    2.115522] usbcore: registered new interface driver uas
[    2.993257] usb 3-3: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[    3.014357] usb 3-3: New USB device found, idVendor=152d, idProduct=1561, bcdDevice= 1.00
[    3.014361] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.014363] usb 3-3: Product: SABRENT
[    3.014365] usb 3-3: Manufacturer: SABRENT
[    3.014366] usb 3-3: SerialNumber: DB98765432125
[    3.141170] usb 2-4: new full-speed USB device number 4 using xhci_hcd
[    3.290682] usb 2-4: New USB device found, idVendor=051d, idProduct=0002, bcdDevice= 0.90
[    3.290686] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.290688] usb 2-4: Product: Back-UPS RS 1350MS FW:951.e4 .D USB FW:e4     
[    3.290690] usb 2-4: Manufacturer: American Power Conversion
[    3.290691] usb 2-4: SerialNumber: 4B2041P34326  
[    3.417170] usb 2-7: new full-speed USB device number 5 using xhci_hcd
[    3.566380] usb 2-7: New USB device found, idVendor=8087, idProduct=07dc, bcdDevice= 0.01
[    3.566384] usb 2-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.863153] usbcore: registered new interface driver usbhid
[    3.863154] usbhid: USB HID core driver
[    3.866781] hid-generic 0003:051D:0002.0001: hiddev0,hidraw0: USB HID v1.00 Device [American Power Conversion Back-UPS RS 1350MS FW:951.e4 .D USB FW:e4     ] on usb-0000:00:14.0-4/input0
[   37.634452] usbcore: registered new interface driver btusb
[770454.045344] usb 3-3: USB disconnect, device number 3
[770454.045522] usb 3-3: cmd cmplt err -108
[770455.813509] usb 3-3: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
[770455.838784] usb 3-3: New USB device found, idVendor=152d, idProduct=1561, bcdDevice= 1.00
[770455.838789] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[770455.838792] usb 3-3: Product: SABRENT
[770455.838794] usb 3-3: Manufacturer: SABRENT
[770455.838797] usb 3-3: SerialNumber: DB98765432125


Is this line telling me something?

[770454.045522] usb 3-3: cmd cmplt err -108
 

Quattro Pete

Thread starter
Joined
Oct 30, 2002
Messages
41,938
Location
Great Lakes
I don't understand why you need a line in FSTAB to mount the drive at boot up. Mine, in Debian, mounts by itself.
FSTAB lets you permanently anchor the drive to a specific mount point (path). That path needs to stay the same because all my media servers look in this path to find the media.
 
Joined
Jun 26, 2003
Messages
12,677
Location
Illinois
Looking at the errors and what you say, you say it's a recent addition. If the enclosure is new, is it "infant mortality?"

Looks like it's on the same USB bus with another Samsung device. Try it alone on that bus to see if it doesn't disconnect. The errors mention a hub, if there is an external hub, take it out of the picture. If it's internal, IE on the MoBo, then you cannot do this.)

If that doesn't change the behavior, try it in the USB port used by the Samsung device. Perhaps you have a flaky USB port on that machine/hub.

If none of those change the issue, your recently added USB drive enclosure is suspect or at least doesn't play nicely with this Linux machine.

If you have a Windows machine, you can try the enclosure there to see if this enclosure doesn't play nicely with this Linux kernel and it's drivers, or just doesn't work well period.

So I'd try in order:
1 - Remove the other USB 3 Samsung device that appears to be on the same USB hub.
2 - Plug this into the port where the Samsung device was plugged in.
3 - Try it on another machine, perhaps even Windows to see if the device is more stable there. (This should work since you mount it as NTFS.)
 
Joined
Jul 26, 2004
Messages
13,726
Location
Middlesex County CT
If there is no output, then there is no match.
I don't understand why you need a line in FSTAB to mount the drive at boot up. Mine, in Debian, mounts by itself.
OT: also, yours probably mounts with the automounter based on the userid; the fstab method allows it to be mounted even if someone is not logged in.
 
Last edited:
Joined
May 21, 2018
Messages
3,368
Location
South Carolina
OK. I understand the problem now. I used FSTAB to mount external drives years ago in a server and it worked great. His problem IS unique.
 
Joined
Apr 7, 2019
Messages
492
Location
VA
I had issues with certain drives when using with Sling's AirTV2 which allows you to DVR the local channels, the drives I tried using evidently had built in features that turns the drive off so it's hardware related, the AirTV2 formats the drive with a Linux file system.

I read online you're better off getting just getting a drive and using it in an enclosure such as what the OP had done but is possible that the enclosure has those features. Mine had an issue I guess the drive would go-to sleep and wouldn't wake up so it wouldn't record anything.
 

Quattro Pete

Thread starter
Joined
Oct 30, 2002
Messages
41,938
Location
Great Lakes
@Quattro Pete - Any follow up to this?
I've reseated the USB cable. Now just waiting. This issue would only happen maybe once a week, so I need to give it more time to see if it happens again. I also purchased a new USB cable, but have not installed it yet. Right now I'm using the USB cable that came with the external enclosure (Sabrent) - I've read these oem cables can be flaky.
 
Top