Problems with hfsplus-tools and external USB drives
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2018
    Location
    Germany
    Posts
    4

    Problems with hfsplus-tools and external USB drives

    My hardware:
    https://forums.fedoraforum.org/showt...78#post1804478

    For the last few days I have run into a problem for which I can not find any solution.
    I use an external hard drive formatted to HFS+ to swap data between my server (headless Fedora 27, latest kernel, hfsplus-tools.x86_64 540.1.linux3-14.fc27, shell access via SSH) and my MacBook.
    I have done this for years using USB 3.0 ports on my server without problems but since last week I run into problems when either copying files onto the hard drive using rsync or trying to re-format the drive using mkfs.hfsplus.
    In both cases the process will start but freeze after a few seconds. Both processes cannot be stopped. When I login on a second login shell I can see using "ps aux | grep mkfs" that the process has been marked with a "D" or a "D+" (if I remember correctly). After that I can only switch off the server forcefully and reboot. Otherwise the system load will continually go up.

    As far as know I ruled out a hardware defect by trying a new hard drive, another casing and connector cable. I also noticed that this problem only occurs when I connect the drive through the USB 3.0 ports at the front of the machine. When using the UBS 2.0 ports at the back everything works as it used to on the USB 3.0 ports.

    I have not changed any hardware configuration on the machine for a long time. I also had a look into some of the log files in "/var/log" but could not find anything helpful.

    Does anyone have any idea how to find out what the problem could be? Any help is highly appreciated.

    Thanks
    Arno

  2. #2
    Join Date
    Mar 2018
    Location
    Germany
    Posts
    4

    Re: Problems with hfsplus-tools and external USB drives

    Since no one seems to have any idea what is going on I thought I would add some output from dmesg.
    The following messages show what happens after I connected and mounted the drive and then started copying some large files onto the disc:

    Code:
    [  428.511184] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
    [  428.528070] usb 4-1: New USB device found, idVendor=152d, idProduct=2590
    [  428.528078] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [  428.528084] usb 4-1: Product: Generic USB Device
    [  428.528089] usb 4-1: Manufacturer: USB to ATA/ATAPI Brid
    [  428.528093] usb 4-1: SerialNumber: 00A12345AFD0
    [  428.532860] scsi host9: uas
    [  428.533861] scsi 9:0:0:0: Direct-Access     USB3.0                    8105 PQ: 0 ANSI: 6
    [  428.535114] sd 9:0:0:0: Attached scsi generic sg5 type 0
    [  428.535318] sd 9:0:0:0: [sde] Spinning up disk...
    [  429.596924] .
    [  430.620914] .
    [  431.644865] .
    [  431.645049] ready
    [  431.645658] sd 9:0:0:0: [sde] 625142448 512-byte logical blocks: (320 GB/298 GiB)
    [  431.645660] sd 9:0:0:0: [sde] 4096-byte physical blocks
    [  431.645843] sd 9:0:0:0: [sde] Write Protect is off
    [  431.645847] sd 9:0:0:0: [sde] Mode Sense: 53 00 00 08
    [  431.646191] sd 9:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [  431.795341]  sde: sde1
    [  431.797050] sd 9:0:0:0: [sde] Attached SCSI disk
    [  612.837817] sd 9:0:0:0: [sde] tag#6 uas_eh_abort_handler 0 uas-tag 7 inflight: CMD IN 
    [  612.837829] sd 9:0:0:0: [sde] tag#6 CDB: Read(10) 28 00 00 00 08 68 00 00 08 00
    [  612.838053] sd 9:0:0:0: [sde] tag#5 uas_eh_abort_handler 0 uas-tag 6 inflight: CMD OUT 
    [  612.838059] sd 9:0:0:0: [sde] tag#5 CDB: Write(10) 2a 00 00 00 08 60 00 00 08 00
    [  612.838154] sd 9:0:0:0: [sde] tag#4 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD OUT 
    [  612.838160] sd 9:0:0:0: [sde] tag#4 CDB: Write(10) 2a 00 00 43 4b 10 00 00 08 00
    [  612.839889] sd 9:0:0:0: [sde] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT 
    [  612.839896] sd 9:0:0:0: [sde] tag#0 CDB: Write(10) 2a 00 00 1a 18 30 00 04 00 00
    [  612.841889] sd 9:0:0:0: [sde] tag#3 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD OUT 
    [  612.841896] sd 9:0:0:0: [sde] tag#3 CDB: Write(10) 2a 00 00 1a 14 30 00 04 00 00
    [  612.843888] sd 9:0:0:0: [sde] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT 
    [  612.843895] sd 9:0:0:0: [sde] tag#2 CDB: Write(10) 2a 00 00 1a 10 30 00 04 00 00
    [  612.845888] sd 9:0:0:0: [sde] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT 
    [  612.845894] sd 9:0:0:0: [sde] tag#1 CDB: Write(10) 2a 00 00 1a 0c 30 00 04 00 00
    [  612.905722] WARNING: CPU: 2 PID: 0 at kernel/rcu/tree.c:2792 rcu_process_callbacks+0x4cb/0x4e0
    [  612.905724] Modules linked in: nls_utf8 hfsplus nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_raw iptable_security ebtable_filter ebtables ip6table_filter ip6_tables vfat fat arc4 iwldvm intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm mac80211 mei_wdt irqbypass iwlwifi iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel snd_hda_codec_hdmi ghash_clmulni_intel intel_cstate cfg80211 e1000e snd_hda_codec_realtek intel_uncore snd_hda_codec_generic
    [  612.905822]  rfkill mei_me lpc_ich intel_rapl_perf tpm_infineon snd_hda_intel snd_hda_codec wmi snd_hda_core tpm_tis snd_hwdep tpm_tis_core snd_seq snd_seq_device i2c_i801 mei tpm ptp shpchp snd_pcm pps_core snd_timer snd soundcore i915 i2c_algo_bit drm_kms_helper drm video uas usb_storage
    [  612.905875] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.15.8-300.fc27.x86_64 #1
    [  612.905878] Hardware name: FUJITSU                          ESPRIMO Q900                    /D1009   , BIOS 1.05.1009 10/06/2011
    [  612.905886] RIP: 0010:rcu_process_callbacks+0x4cb/0x4e0
    [  612.905889] RSP: 0018:ffff8dd55e303f08 EFLAGS: 00010002
    [  612.905893] RAX: ffffffffffffd800 RBX: ffff8dd55e321980 RCX: 0000000000012401
    [  612.905896] RDX: 0000000000000005 RSI: ffff8dd55e303f10 RDI: ffff8dd55e3219b8
    [  612.905899] RBP: ffffffff9f25e900 R08: 00000000000250a0 R09: ffffffff9e116a3a
    [  612.905902] R10: ffffd16707d7c3c0 R11: 0000000000000000 R12: ffff8dd55e3219b8
    [  612.905905] R13: 7fffffffffffffff R14: 0000000000000246 R15: fffffffffffffffd
    [  612.905909] FS:  0000000000000000(0000) GS:ffff8dd55e300000(0000) knlGS:0000000000000000
    [  612.905913] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  612.905916] CR2: 0000559e0edf6010 CR3: 000000004320a001 CR4: 00000000000606e0
    [  612.905919] Call Trace:
    [  612.905925]  <IRQ>
    [  612.905939]  __do_softirq+0xe7/0x2cb
    [  612.905951]  irq_exit+0xf1/0x100
    [  612.905958]  smp_apic_timer_interrupt+0x6c/0x120
    [  612.905965]  apic_timer_interrupt+0x87/0x90
    [  612.905968]  </IRQ>
    [  612.905978] RIP: 0010:cpuidle_enter_state+0x9f/0x2e0
    [  612.905981] RSP: 0018:ffffaccdc0cc7ea8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff11
    [  612.905986] RAX: ffff8dd55e320a80 RBX: 0000008eb40675d7 RCX: 000000000000001f
    [  612.905989] RDX: 0000008eb40675d7 RSI: fffffff9ed88cf3d RDI: 0000000000000000
    [  612.905992] RBP: ffff8dd55e32a340 R08: 00000000ffffffff R09: 000000000000037f
    [  612.905995] R10: ffffaccdc0cc7e88 R11: 00000000000003d7 R12: 0000000000000003
    [  612.905997] R13: ffffffff9f2d12d8 R14: 0000000000000000 R15: 0000008eb3f7620d
    [  612.906007]  ? cpuidle_enter_state+0x92/0x2e0
    [  612.906015]  do_idle+0x17b/0x1d0
    [  612.906020]  cpu_startup_entry+0x6f/0x80
    [  612.906028]  start_secondary+0x1a2/0x1f0
    [  612.906035]  secondary_startup_64+0xa5/0xb0
    [  612.906039] Code: ff 48 8b 05 80 f9 13 01 48 89 83 b0 00 00 00 e9 c8 fd ff ff 0f 0b e9 c8 fb ff ff 4c 89 f6 4c 89 e7 e8 8a b5 78 00 e9 18 fc ff ff <0f> 0b e9 f2 fd ff ff 0f 0b e9 e9 fc ff ff e8 e2 0d f9 ff 66 90 
    [  612.906133] ---[ end trace 33055ce8fd0deb76 ]---
    Everything up until 431.797050 makes sense to me, that's just the drive being connected.
    But after that I don't have any idea what is happening. Does anyone have a clue?

    Thanks
    Arno

  3. #3
    Join Date
    Mar 2018
    Location
    Germany
    Posts
    4

    Re: Problems with hfsplus-tools and external USB drives

    So, I think I found kind of a solution for my problem and thought I'd share it here for completeness' sake.

    After taking a look at the messages mentioning the "uas_eh_abort_handler" I looked into that and found out that there seems to be some difficulties between certain USB bridges and Linux' UAS module. So what one has to do is to blacklist the UAS handler for a certain device.

    I found this https://unix.stackexchange.com/quest...driver-problem thread from stackexchange most helpful and had only find out how to manually rebuild the initramfs file on Fedora 27 (which I had never done before).

    You can do that by taking the following steps:
    1. Find out your device's hardware ID. You can do that by looking at dmesg right after connecting the drive.
      There you will find a line looking like this:

      Code:
      [117561.860774] usb 4-1: New USB device found, idVendor=152d, idProduct=2590
      The values for "idVendor" and "idProduct" are what we need.

      Alternatively you can execute "lsusb" on the command line and find your device there in an entry like this:

      Code:
      Bus 004 Device 002: ID 152d:2590 JMicron Technology Corp. / JMicron USA Technology Corp. Seatay ATA/ATAPI Bridge
    2. Now you have to create a new config file for the modprobe module containing the blacklist entry for the device:

      Code:
      echo options usb-storage quirks=152d:2590:u | sudo tee /etc/modprobe.d/blacklist_uas_152d.conf
      Exchange the values for the "quirks" parameter with the "idVendor" and "idProduct" values from above, separate them using a ":" and followed by an "u".
    3. To make the config file work you have to recreate the initramfs image for the currently booted kernel.

      Execute
      Code:
      dracut -fv
      and reboot your machine.


    That's about it. The downside to this seems to be that the read/write speed of the attached drive will not be as one would expect from a USB 3.0 drive but much slower.
    In my case that doesn't matter much because the drive (or more precisely: the enclosure, I think) is not that fast anyways but at least I can use the front port of my machine again.

    What I still don't understand is why I never had these problems until something like two or three weeks ago. I think that it maybe has to do with a kernel update but that's just a wild guess and I haven't tried to reinstall and use for example a 4.14.* kernel to verify this guess.

    Thanks for reading.
    Arno

Similar Threads

  1. Samba and NTFS External Hard Drives Problems
    By karakara in forum Using Fedora
    Replies: 2
    Last Post: 2nd September 2015, 05:05 AM
  2. External DVD drives
    By cmanL in forum Hardware & Laptops
    Replies: 3
    Last Post: 19th December 2012, 12:42 PM
  3. Prevent Mounting of External Drives & CD/DVD drives
    By twohot in forum Using Fedora
    Replies: 2
    Last Post: 19th October 2010, 04:37 PM
  4. External Drives
    By GaJim in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 24th December 2006, 07:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •