服务器 USB 硬盘未在 /dev 中列出,但它出现在 lsusb 中

服务器 USB 硬盘未在 /dev 中列出,但它出现在 lsusb 中

我有几台服务器使用 2TB Seagate GoFlex 外置硬盘进行基本的 cPanel 备份,但其中一台出现了问题,该硬盘没有在 /dev 中列为设备,尽管它出现在 lsusb 中。

输出lsusb

root@server-name [/sys/bus/usb/devices]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 0bc2:50a5 Seagate RSS LLC FreeAgent GoFlex Desk USB 3.0
Bus 001 Device 003: ID 04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 "TetraHub"

输出ls -lh /dev | grep sd

root@server-name [/sys/bus/usb/devices]# ls -lh /dev | grep sd
crw-rw----   1 root tty       2,  61 Mar  6 10:58 ptysd
brw-rw----   1 root disk      8,   0 Mar  6 10:58 sda
brw-rw----   1 root disk      8,   1 Mar  6 11:00 sda1
brw-rw----   1 root disk      8,   2 Mar  6 10:58 sda2
crw-rw----   1 root tty       3,  61 Mar  6 10:58 ttysd

我尝试通过流行的 usbreset.c 脚本对 USB 端口进行电源循环,手动将电源级别设置为挂起/自动,将授权设置为 0(然后返回 1)等。但是,这些似乎都无法让它被识别。

输出dmesg

[2439599.103034] usb 1-3: reset high speed USB device number 4 using ehci_hcd
[2440600.692207] usb 1-3: new high speed USB device number 4 using ehci_hcd
[2440600.858527] usb 1-3: device firmware changed
[2440600.858547] usb 1-3: USB disconnect, device number 4
[2440600.961020] usb 1-3: new high speed USB device number 5 using ehci_hcd
[2440601.128405] usb 1-3: New USB device found, idVendor=0bc2, idProduct=50a5
[2440601.128410] usb 1-3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[2440601.128414] usb 1-3: Product: GoFlex Desk
[2440601.128416] usb 1-3: Manufacturer: Seagate
[2440601.128417] usb 1-3: SerialNumber: NA0M0LAZ
[2440601.128510] usb 1-3: configuration #1 chosen from 1 choice
[2440601.128844] scsi5 : SCSI emulation for USB Mass Storage devices
[2440601.129201] usb-storage: device found at 5
[2440601.129203] usb-storage: waiting for device to settle before scanning
[2440602.129185] usb-storage: device scan complete
[2440622.803210] usb 1-3: reset high speed USB device number 5 using ehci_hcd
[2440643.797143] usb 1-3: reset high speed USB device number 5 using ehci_hcd
[2440664.797199] usb 1-3: reset high speed USB device number 5 using ehci_hcd
[2440685.797139] usb 1-3: reset high speed USB device number 5 using ehci_hcd

最后,输出lsblk,以防有帮助:

root@server-name [~/usbreset]# lsblk
NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                         7:0    0   500M  0 loop /tmp
sda                           8:0    0 135.5G  0 disk 
├─sda1                        8:1    0   500M  0 part /boot
└─sda2                        8:2    0   135G  0 part 
  ├─vg_angel-lv_root (dm-0) 253:0    0    50G  0 lvm  /
  ├─vg_angel-lv_swap (dm-1) 253:1    0   7.9G  0 lvm  [SWAP]
  └─vg_angel-lv_home (dm-2) 253:2    0  77.2G  0 lvm  /home
sr0                          11:0    1  1024M  0 rom 

输出cat /proc/scsi/scsi

root@server-name [~/usbreset]# cat /proc/scsi/scsi 
Attached devices:
Host: scsi0 Channel: 00 Id: 32 Lun: 00
  Vendor: DP       Model: BACKPLANE        Rev: 1.05
  Type:   Enclosure                        ANSI  SCSI revision: 05
Host: scsi0 Channel: 02 Id: 00 Lun: 00
  Vendor: DELL     Model: PERC 6/i         Rev: 1.11
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: HL-DT-ST Model: CD-ROM GCR-8240N Rev: 1.10
  Type:   CD-ROM                           ANSI  SCSI revision: 05

输出cat /proc/usb-storage/5

root@server-name [~/usbreset]# cat /proc/scsi/usb-storage/5 
   Host scsi5: usb-storage
       Vendor: Seagate
      Product: GoFlex Desk
Serial Number: NA0M0LAZ
     Protocol: Transparent SCSI
    Transport: Bulk
       Quirks:

答案1

如果在所有服务器上使用相同型号的磁盘和相同型号的主板(或 USB 卡),并且驱动程序相同,并且除了一个之外所有都正常工作,那么问题很可能是硬件问题。

我尝试更换的第一个硬件是电缆,因为这是最容易更换的。如果这没有帮助,我会在两台服务器之间交换两个磁盘,看看问题是出在磁盘上还是在同一台服务器上。

答案2

我猜你已经停止了 udev。另请参阅我对你的问题的评论。

相关内容