我安装了一个 SATA3 3.5 英寸磁盘USB 转 Sata3 线缆。
当我连接磁盘时,我的 CentOS7 识别它:
$ dmesg -T | grep USB
...
[Mon Nov 5 14:38:36 2018] usb 2-5: new SuperSpeed USB device number 3 using xhci_hcd
[Mon Nov 5 14:38:37 2018] usb 2-5: New USB device found, idVendor=174c, idProduct=55aa
[Mon Nov 5 14:38:37 2018] usb 2-5: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[Mon Nov 5 14:38:37 2018] usb-storage 2-5:1.0: USB Mass Storage device detected
并且该磁盘被视为 USB Bus 002 Device 003:
$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 007: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
我能够使用 dd 访问磁盘:
$ sudo dd if=/dev/zero of=/dev/sdg1 bs=1M count=30000
30000+0 records in
30000+0 records out
31457280000 bytes (31 GB) copied, 8.59284 s, 3.7 GB/s
但是,以下操作失败:
$ sudo parted -a optimal /dev/sdg mklabel gpt
Error: Error opening /dev/sdg: No medium found
Retry/Cancel? r
Error: Error opening /dev/sdg: No medium found
Retry/Cancel? r
Error: Error opening /dev/sdg: No medium found
Retry/Cancel? c
并且lsblk
没有看到磁盘:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.7T 0 disk
└─sda1 8:1 0 2.7T 0 part
└─md0 9:0 0 16.4T 0 raid0 /local/raid0
sdb 8:16 0 2.7T 0 disk
└─sdb1 8:17 0 2.7T 0 part
└─md0 9:0 0 16.4T 0 raid0 /local/raid0
sdc 8:32 0 2.7T 0 disk
└─sdc1 8:33 0 2.7T 0 part
└─md0 9:0 0 16.4T 0 raid0 /local/raid0
sdd 8:48 0 2.7T 0 disk
└─sdd1 8:49 0 2.7T 0 part
└─md0 9:0 0 16.4T 0 raid0 /local/raid0
sde 8:64 0 2.7T 0 disk
└─sde1 8:65 0 2.7T 0 part
└─md0 9:0 0 16.4T 0 raid0 /local/raid0
sdf 8:80 0 2.7T 0 disk
└─sdf1 8:81 0 2.7T 0 part
└─md0 9:0 0 16.4T 0 raid0 /local/raid0
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 200M 0 part /boot/efi
├─nvme0n1p2 259:2 0 1G 0 part /boot
├─nvme0n1p3 259:3 0 31.3G 0 part
├─nvme0n1p4 259:4 0 50G 0 part /
└─nvme0n1p5 259:5 0 394.4G 0 part /home
关于如何访问连接到 USB 端口的 3.5 英寸外部 SATA3 磁盘有什么建议吗?