0

I am trying to troubleshoot an issue where on one server my USB automounts whereas on another server it isn't. Comparing the logs for both instances, I am trying to understand what each line means.

Automounting USB messages log:

May  9 18:10:40 kernel: usb 2-1.4: new high-speed USB device number 12  using ehci-pci 
May  9 18:10:40 kernel: usb 2-1.4: New USB device found, idVendor=8564, idProduct=1000
May  9 18:10:40 kernel: usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May  9 18:10:40 kernel: usb 2-1.4: Product: MYUSB
May  9 18:10:40 kernel: usb 2-1.4: Manufacturer: MYUSB
May  9 18:10:40 kernel: usb 2-1.4: SerialNumber: A1678
May  9 18:10:40 kernel: usb-storage 2-1.4:1.0: USB Mass Storage device detected
May  9 18:10:40 kernel: scsi host13: usb-storage 2-1.4:1.0
May  9 18:10:40 mtp-probe: checking bus 2, device 12: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4"
May  9 18:10:40 mtp-probe: bus: 2, device: 12 was not an MTP device
May  9 18:10:41 kernel: scsi 13:0:0:0: Direct-Access     USB      MYUSB        1100 PQ: 0 ANSI: 4
May  9 18:10:41 kernel: sd 13:0:0:0: Attached scsi generic sg2 type 0
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] 15724544 512-byte logical blocks: (8.05 GB/7.50 GiB)
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] Write Protect is off
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] No Caching mode page found
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] Assuming drive cache: write through
May  9 18:10:41 kernel: sdb: sdb1
May  9 18:10:41 kernel: sd 13:0:0:0: [sdb] Attached SCSI disk
May  9 18:10:41 kernel: FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
May  9 18:10:41 gvfs-udisks2-volume-monitor: disc.c:352: error opening file BDMV/index.bdmv
May  9 18:10:41 gvfs-udisks2-volume-monitor: disc.c:352: error opening file BDMV/BACKUP/index.bdmv
May  9 18:10:41 udisksd[838]: Mounted /dev/sdb1 at /run/media/user/MYUSB on behalf of uid 1000

Not automounting USB messages log:

May  9 18:09:07 kernel: usb 3-7: new high-speed USB device number 12 using xhci_hcd
May  9 18:09:07 kernel: usb 3-7: New USB device found, idVendor=8564, idProduct=1000
May  9 18:09:07 kernel: usb 3-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May  9 18:09:07 kernel: usb 3-7: Product: MYUSB
May  9 18:09:07 kernel: usb 3-7: Manufacturer: MYUSB
May  9 18:09:07 kernel: usb 3-7: SerialNumber: A1678
May  9 18:09:07 kernel: usb-storage 3-7:1.0: USB Mass Storage device detected
May  9 18:09:07 kernel: scsi host4: usb-storage 3-7:1.0
May  9 18:09:07 mtp-probe: checking bus 3, device 12: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-7"
May  9 18:09:07 mtp-probe: bus: 3, device: 12 was not an MTP device
May  9 18:09:08 kernel: scsi 4:0:0:0: Direct-Access     USB      MYUSB        1100 PQ: 0 ANSI: 4
May  9 18:09:08 kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] 15724544 512-byte logical blocks: (8.05 GB/7.50 GiB)
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] Write Protect is off
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] No Caching mode page found
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
May  9 18:09:08 kernel: sdb: sdb1
May  9 18:09:08 kernel: sd 4:0:0:0: [sdb] Attached SCSI disk
  1. How does the kernel determine which USB version to use usb 2-1.4 vs usb 3-7?

  2. What does sd 4:0:0:0: mean?

Also, I am trying to replicate the automoutning issue on the working box. I did a quick compare and noticed that the linux utils versions on both boxes are different, non-working has an older version (util-linux-ng-2.18) whereas working has a newer version (util-linux-2.28). Does anyone know if this affects USB automounting?

2

1) That is not an "USB version", it's the position in the USB tree where the USB port is that you connected the hardware to. The actual numbers are determined by the hardware and the order in which the kernel initialized the USB root hubs and assigned the bus numbers. Use lsusb -t to see the USB tree, if you are curious.

2) 4:0:0:0 means it is assigned the SCSI bus number 4, and this bus only has a single device on it (it's a virtual bus, because the USB storage protocol is essentially SCSI). Same for 13:0:0:0. sd is the SCSI disk kernel subsystem (or maybe "storage disk", no idea...), similar for st (tape) etc.

3) None of this will help with your automounting issue. The hardware and partition is detected fine on both hosts, and one host is configured to automount it, while the other isn't.

There are several ways to do automounting, so the first step is to find out which way you have installed on the one host, and then to configure and install it on the second host.

  • Thanks so much for that! Other than the dmesg and messages log, do you know how i can determine if the system is configured for automounting? Basically, i want to write a bash script to check for these flags and output it to a log, but i don't seem to see any automounting flags in both of the logs i mentioned above. – kkmoslehpour May 11 '18 at 17:31
  • 1
    The gvfs (gnome virtual file system) and udisks message indicate it's something gnome/desktop-ish, possibly with systemd also involved. I use usbmount as the only automounter, and I don't use a Gnome desktop, so I can't help you with that. In my experience, desktop stuff is notoriously underdocumented and not so easy to figure out in the first attempt. Another place to look is your package manager. – dirkt May 12 '18 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.