Usb
fdisk 無法辨識 SanDisk USB 3 Ultra Flair
我在大多數執行緒中都瀏覽了我對這個主題的發現,不幸的是沒有成功。我有以下情況。fdisk 或 parted 無法辨識此閃迪 USB 快閃記憶體:
fdisk -l
root@debian:~# fdisk -l Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors Disk model: Intenso SSD SATA Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000b7798 Device Boot Start End Sectors Size Id Type /dev/sda1 2048 11913215 11911168 5.7G 82 Linux swap / Solaris /dev/sda2 * 11913216 1000215215 988302000 471.3G 83 Linux
fdisk /dev/sdb
root@debian:~# fdisk /dev/sdb Welcome to fdisk (util-linux 2.33.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sdb: 2 MiB, 2097152 bytes, 4096 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x88dde89e Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 4095 2048 1M 83 Linux Command (m for help):
分開 /dev/sdb
root@debian:~# parted /dev/sdb GNU Parted 3.2 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: (file) Disk /dev/sdb: 2097kB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 2097kB 1049kB primary (parted)
df -h
root@debian:~# df -h Filesystem Size Used Avail Use% Mounted on udev 16G 2.0M 16G 1% /dev tmpfs 3.2G 9.7M 3.1G 1% /run /dev/sda2 463G 162G 281G 37% / tmpfs 16G 717M 15G 5% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 16G 0 16G 0% /sys/fs/cgroup tmpfs 3.2G 4.1M 3.2G 1% /run/user/1000 /dev/sdb1 15G 36M 14G 1% /media/USB/54c3f6a6-033c-434a-a6bc-44d60ba82df8
lsblk
root@debian:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 477G 0 disk ├─sda1 8:1 0 5.7G 0 part [SWAP] └─sda2 8:2 0 471.3G 0 part / sdb 8:16 1 14.3G 0 disk └─sdb1 8:17 1 14.3G 0 part /media/USB/54c3f6a6-033c-434a-a6bc-44d60ba82df8 sr0 11:0 1 1024M 0 rom
lsusb
root@debian:~# lsusb Bus 003 Device 002: ID 8087:8000 Intel Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 023: ID 0781:5591 SanDisk Corp. Ultra Flair Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 008: ID 138a:0017 Validity Sensors, Inc. VFS 5011 fingerprint sensor Bus 002 Device 005: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader Bus 002 Device 006: ID 413c:2006 Dell Computer Corp. Bus 002 Device 004: ID 413c:1004 Dell Computer Corp. Bus 002 Device 011: ID 0765:5010 X-Rite, Inc. X-Rite Pantone Color Sensor Bus 002 Device 010: ID 5986:026a Acer, Inc Bus 002 Device 012: ID 17ef:6019 Lenovo Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsmod | grep USB
root@debian:~# lsmod | grep usb btusb 53248 0 btrtl 16384 1 btusb btbcm 16384 1 btusb btintel 24576 1 btusb bluetooth 647168 11 btrtl,btintel,btbcm,bnep,btusb usb_storage 73728 2 uas usbhid 57344 0 hid 135168 2 usbhid,hid_generic scsi_mod 249856 6 sd_mod,usb_storage,uas,libata,sg,sr_mod usbcore 294912 9 xhci_hcd,ehci_pci,usbhid,usb_storage,uvcvideo,ehci_hcd,btusb,xhci_pci,uas usb_common 16384 1 usbcore
hdparm -I /dev/sdb
root@debian:~# hdparm -I /dev/sdb /dev/sdb: HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
smartctl -i /dev/sdb1
root@debian:~# smartctl -i /dev/sdb1 smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-9-amd64] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: SanDisk Product: Ultra USB 3.0 Revision: 1.00 Compliance: SPC-4 User Capacity: 15,376,318,464 bytes [15.3 GB] Logical block size: 512 bytes Serial number: 4C530000080316205084 Device type: disk Local Time is: Sat Jun 20 17:35:53 2020 CEST SMART support is: Available - device has SMART capability. SMART support is: Enabled Temperature Warning: Disabled or Not Supported
root@debian:~# dd if=/dev/zero of=/dev/sdb bs=1M dd: error writing '/dev/sdb': No space left on device 15873+0 records in 15872+0 records out 16643719168 bytes (17 GB, 16 GiB) copied, 4.11023 s, 4.0 GB/s root@debian:~# fdisk -l Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors Disk model: Intenso SSD SATA Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000b7798 Device Boot Start End Sectors Size Id Type /dev/sda1 2048 11913215 11911168 5.7G 82 Linux swap / Solaris /dev/sda2 * 11913216 1000215215 988302000 471.3G 83 Linux root@debian:~#
所以基本上快閃記憶體是16GB,但既不也不
fdisk
認得。在ist 中安裝為 15 GB 卷。設備資訊也在裡面。我嘗試刪除分區,創建 fat32、ntfs,甚至為此使用 Windows 機器,但我仍然有這種奇怪的行為。我可以將快閃記憶體用作 15GB 卷,但我很想知道解釋。parted``gparted``Nautilus``dmesg
提前致謝。
對評論和答案的回應
root@debian:~# ls -l /dev/sdb -rw-r--r-- 1 root root 16643719168 Jun 20 18:28 /dev/sdb root@debian:~# blockdev --getsz /dev/sdb 32507264 root@debian:~# ls -l /dev/sdb -rw-r--r-- 1 root root 16643719168 Jun 20 18:50 /dev/sdb root@debian:~# df -h /dev Filesystem Size Used Avail Use% Mounted on udev 16G 0 16G 0% /dev
問題似乎是(無論出於何種原因)
/dev/sdb
不是設備文件而是正常文件。ls -l
(-rw-r--r--
) 和parted
( )的輸出都顯示了Model: (file)
這一點。這可以通過刪除和重新創建
/dev/sdb
(文件)來解決:rm /dev/sdb mknod /dev/sdb b 8 16