Usb
伺服器 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:
如果您在所有具有相同驅動程序的伺服器上使用相同型號的磁碟和相同型號的主機板(或 USB 卡),並且如果所有驅動程序都可以正常工作,那麼問題很可能是硬體問題。
我要嘗試更換的第一件硬體是電纜,因為這是最容易更換的部分。如果這沒有幫助,我會在兩台伺服器之間交換兩個磁碟,以查看問題是跟隨磁碟還是停留在同一台伺服器上。
我猜你已經停止了udev。另請參閱我對您的問題的評論。