Linux에서 USB3 외부 저장소 연결 문제(UAS 드라이버 문제)

Linux에서 USB3 외부 저장소 연결 문제(UAS 드라이버 문제)

Ubuntu 15.10에서 USB3(StarTech USB/eSATA 하드 디스크 도크)로 연결된 외부 4TO 디스크를 NTFS 파일 시스템을 사용하여 포맷하려는 경우많이I/O 오류가 발생하여 포맷이 실패합니다.

gparted-live-0.23.0-1-i586.iso동일한 문제로 GParted v 0.19와 최신 라이브 CD에서 GParted를 사용해 보았습니다 .

그 후 Ubuntu 15.10에서 GParted와 동일한 USB3 연결을 사용하여 ext4문제 없이 . 정말 이상해요.

mkfs.ext4디스크를 포맷하기 위해 GParted에서 사용하는 도구가 디스크를 테스트하는지 여부를 모르기 때문에 mkntfs먼저 문제가 새 디스크에 연결되어 있다고 가정합니다. 아마도 이 새 디스크가 문제를 일으키는 것 같습니다. 그래서 e2fsck -c이 HDD에서 실행해 봅니다 . Ubuntu 15.10에서는 e2fsck -c0.45%에서 멈췄는데 이유를 모르겠습니다.

그래서 동일한 PC에서 다른 버전의 Ubuntu(15.04)를 사용하여 StarTech HDD Dock의 eSATA 연결을 사용하여 동일한 4TO 디스크를 연결해 봅니다. 이번에는 e2fsck -c제대로 실행됩니다.

몇 시간 후에 결과를 볼 수 있습니다.

sudo e2fsck -c /dev/sdc1
e2fsck 1.42.12 (29-Aug-2014)
ColdCase : récupération du journal
Vérification des blocs défectueux (test en mode lecture seule) : complété                                             
ColdCase: Updating bad block inode.
Passe 1 : vérification des i-noeuds, des blocs et des tailles
Passe 2 : vérification de la structure des répertoires
Passe 3 : vérification de la connectivité des répertoires
Passe 4 : vérification des compteurs de référence
Passe 5 : vérification de l'information du sommaire de groupe

ColdCase: ***** LE SYSTÈME DE FICHIERS A ÉTÉ MODIFIÉ *****
ColdCase : 11/244195328 fichiers (0.0% non contigus), 15377150/976754176 blocs

저는 출력 전문가는 아니지만 badblock이 디스크에는 배드 블록이 전혀 없는 것 같은데요?

그렇다면 문제가 하드 드라이브가 아니라면 문제가 mkntfsUSB3를 통해 사용되도록 연결될 수 있을까요? 어떤 다른 테스트를 시도할 수 있나요?

USB 도크에 대한 일부 정보:

➜  ~  lsusb
...
Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge
...


➜  ~  sudo lsusb -v -d 174c:55aa
Mot de passe [sudo] pour reyman : 

Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x174c ASMedia Technology Inc.
  idProduct          0x55aa ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge
  bcdDevice            1.00
  iManufacturer           2 asmedia
  iProduct                3 ASM1053E
  iSerial                 1 123456789012
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          121
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower               36mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             16
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             16
        Data-out pipe (0x04)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             16
        Status pipe (0x02)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        Command pipe (0x01)
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        2047 micro seconds
Device Status:     0x0001
  Self Powered

문제의 디스크에 대한 정보:/dev/sdd

➜  ~  sudo fdisk -l /dev/sdd
Disque /dev/sdd : 3,7 TiB, 4000787030016 octets, 7814037168 secteurs
Unités : sectors of 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: ACD5760B-2898-435E-82C6-CB3119758C9B

Périphérique Start        Fin   Secteurs  Size Type
/dev/sdd1     2048 7814035455 7814033408  3,7T Linux filesystem

dmesg디스크에 관한 많은 오류를 반환합니다. 이 추출물을 참조하십시오 :

[   68.856381] scsi host6: uas_eh_bus_reset_handler start
[   68.968376] usb 2-2: reset SuperSpeed USB device number 2 using xhci_hcd
[   68.989825] scsi host6: uas_eh_bus_reset_handler success
[   99.881608] sd 6:0:0:0: [sdd] tag#12 uas_eh_abort_handler 0 uas-tag 13 inflight: CMD OUT 
[   99.881618] sd 6:0:0:0: [sdd] tag#12 CDB: Write(16) 8a 00 00 00 00 00 e8 c4 08 00 00 00 00 08 00 00
[   99.881856] sd 6:0:0:0: [sdd] tag#5 uas_eh_abort_handler 0 uas-tag 6 inflight: CMD OUT 
[   99.881861] sd 6:0:0:0: [sdd] tag#5 CDB: Write(16) 8a 00 00 00 00 00 cd 01 08 f0 00 00 00 10 00 00
[   99.881967] sd 6:0:0:0: [sdd] tag#4 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD OUT 
[   99.881972] sd 6:0:0:0: [sdd] tag#4 CDB: Write(16) 8a 00 00 00 00 00 cd 01 08 00 00 00 00 f0 00 00
[   99.882085] sd 6:0:0:0: [sdd] tag#3 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD OUT 
[   99.882090] sd 6:0:0:0: [sdd] tag#3 CDB: Write(16) 8a 00 00 00 00 00 cd 01 07 10 00 00 00 f0 00 00
[   99.882171] sd 6:0:0:0: [sdd] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT 
[   99.882175] sd 6:0:0:0: [sdd] tag#2 CDB: Write(16) 8a 00 00 00 00 00 cd 01 06 20 00 00 00 f0 00 00
[   99.882255] sd 6:0:0:0: [sdd] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT 
[   99.882258] sd 6:0:0:0: [sdd] tag#1 CDB: Write(16) 8a 00 00 00 00 00 cd 01 05 30 00 00 00 f0 00 00
[   99.882338] sd 6:0:0:0: [sdd] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT 
[   99.882342] sd 6:0:0:0: [sdd] tag#0 CDB: Write(16) 8a 00 00 00 00 00 cd 01 04 40 00 00 00 f0 00 00
[   99.882419] sd 6:0:0:0: [sdd] tag#11 uas_eh_abort_handler 0 uas-tag 12 inflight: CMD OUT 
[   99.882423] sd 6:0:0:0: [sdd] tag#11 CDB: Write(16) 8a 00 00 00 00 00 cd 00 f9 00 00 00 00 f0 00 00
[   99.882480] sd 6:0:0:0: [sdd] tag#10 uas_eh_abort_handler 0 uas-tag 11 inflight: CMD OUT 
[   99.882483] sd 6:0:0:0: [sdd] tag#10 CDB: Write(16) 8a 00 00 00 00 00 cd 00 f9 f0 00 00 00 f0 00 00
[   99.882530] sd 6:0:0:0: [sdd] tag#9 uas_eh_abort_handler 0 uas-tag 10 inflight: CMD OUT 
[   99.882532] sd 6:0:0:0: [sdd] tag#9 CDB: Write(16) 8a 00 00 00 00 00 cd 00 fa e0 00 00 00 f0 00 00
[   99.882593] sd 6:0:0:0: [sdd] tag#8 uas_eh_abort_handler 0 uas-tag 9 inflight: CMD 
[   99.882596] sd 6:0:0:0: [sdd] tag#8 CDB: Write(16) 8a 00 00 00 00 00 cd 00 fb d0 00 00 00 f0 00 00
[   99.882667] scsi host6: uas_eh_bus_reset_handler start
[   99.994700] usb 2-2: reset SuperSpeed USB device number 2 using xhci_hcd
[  100.015613] scsi host6: uas_eh_bus_reset_handler success
[  135.962175] sd 6:0:0:0: [sdd] tag#5 uas_eh_abort_handler 0 uas-tag 6 inflight: CMD OUT 
[  135.962185] sd 6:0:0:0: [sdd] tag#5 CDB: Write(16) 8a 00 00 00 00 00 cd 40 78 f0 00 00 00 10 00 00
[  135.962428] sd 6:0:0:0: [sdd] tag#4 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD OUT 
[  135.962436] sd 6:0:0:0: [sdd] tag#4 CDB: Write(16) 8a 00 00 00 00 00 cd 40 78 00 00 00 00 f0 00 00
[  135.962567] sd 6:0:0:0: [sdd] tag#3 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD OUT 
[  135.962576] sd 6:0:0:0: [sdd] tag#3 CDB: Write(16) 8a 00 00 00 00 00 cd 40 77 10 00 00 00 f0 00 00
[  135.962682] sd 6:0:0:0: [sdd] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT 
[  135.962690] sd 6:0:0:0: [sdd] tag#2 CDB: Write(16) 8a 00 00 00 00 00 cd 40 76 20 00 00 00 f0 00 00
[  135.962822] sd 6:0:0:0: [sdd] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD 
[  135.962830] sd 6:0:0:0: [sdd] tag#1 CDB: Write(16) 8a 00 00 00 00 00 cd 40 75 30 00 00 00 f0 00 00
[  160.904916] sd 6:0:0:0: [sdd] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT 
[  160.904926] sd 6:0:0:0: [sdd] tag#0 CDB: Write(16) 8a 00 00 00 00 00 00 00 29 08 00 00 00 08 00 00
[  160.905068] scsi host6: uas_eh_bus_reset_handler start

나는 이것에 대한 정보를 찾았습니다포럼 게시물, UAS와 새로운 Linux 커널에 문제가 있다고 생각하시나요? 것 같다문제는 알려져 있다많은장소인터넷에서 USB3 + Linux는 많은 경우에 문제가 있는 것처럼 보이지만 오래된 커널의 경우에는 그렇습니다. 최신 커널에서 이 문제를 해결할 수 있는 아이디어가 있습니까?

내 커널은 다음과 같습니다

➜  ~  uname -r 
4.2.0-16-generic

흠, UAS는 의 다른 USB3 칩에서 작동하지 않는 것 같습니다 ASMedia Technology Inc.. 더 많은 정보를 보실 수 있습니다여기.

이게 제 문제인 것 같은데 지금은 어떻게 해결해야 하는지, 스타테크 독의 USB3 구현에는 어떤 칩이 사용되나요?

답변1

Mint 18에서도 이와 동일한 문제가 발생했지만 제가 찾은 솔루션은 아마도 *Ubuntu 15/16 및 유사한 Linux 배포판에 적용될 수 있을 것입니다. 그러나 저는 dmesg에서 UAS 오류를 확인한 직후 복구할 수 없는 시스템이 잠겼습니다.

내 인클로저에는 ASMedia ASM1053 칩이 있는데, 내 커널(4.4.0-72-generic)의 UAS 모듈에 문제가 있는 것 같습니다.

약간의 검색 끝에 찾은 두 가지 솔루션을 결합했습니다.이것은 YtvwlD가 언급한 것입니다.그리고이 하나.

먼저, 다음을 사용하여 장치의 하드웨어 ID를 가져와야 합니다.lsusb명령. 그런 다음 외부/인클로저/브리지를 찾으세요. 아래와 같이 나타날 수 있습니다.

Bus 002 Device 002: ID 174c:5136 ASMedia Technology Inc. ASM1053 SATA 6Gb/s bridge

제 경우에는 아이디가174c:5136.

그 다음에는 파일을 생성해야 합니다./etc/modprobe.d/따라서 적절한 장치가 UAS를 사용하여 블랙리스트에 추가되므로(이로 인해 문제가 발생함) 다음을 사용하여 initramfs 이미지를 업데이트하세요.업데이트-initramfs을 누른 다음 재부팅하여 변경 사항을 적용하세요.

$ echo options usb-storage quirks=174c:5136:u | sudo tee /etc/modprobe.d/blacklist_uas.conf
$ sudo update-initramfs -u
$ sudo reboot

물론 "174c:5136"을 브리지/인클로저/외부의 하드웨어 ID로 바꾸세요. 올바르게 완료되면 다음과 같은 메시지가 표시됩니다.dmesg재부팅 후 장치를 연결하면:

[   93.985002] usb 4-1: UAS is blacklisted for this device, using usb-storage instead

그 이후로 인클로저에 아무런 문제가 없었습니다.

답변2

오늘 4.8.0 커널에서 이 문제가 발생했습니다.

에 따르면이 포럼 게시물그것은에 의해 우회될 수 있다

$ echo options usb-storage quirks=357d:7788:u | sudo tee /etc/modprobe.d/blacklist_uas_357d.conf
$ sudo update-initramfs -u

그리고 재부팅.

답변3

다른 답변에서 언급한 특이한 점을 즉석에서 적용하려면 런타임에 설정할 수도 있습니다.

echo "152d:0583:u" | sudo tee /sys/module/usb_storage/parameters/quirks

152d:0583물론 장치의 USB 장치 ID로 바꾸십시오 .

이렇게 하면 재부팅할 필요 없이 모듈 quirks의 매개변수가 앞서 언급한 값으로 설정됩니다 .usb-storage

관련 정보