问题:我有一个 500GB 的硬盘,Linux 目前认为只有 7.9GB。具体来说,Linux 认为它是 16514064 个扇区,这是旧的 CHS 限制,所以我假设某个地方已经决定该驱动器不支持 LBA,尽管我不知道为什么驱动器曾经工作正常,而且我还有另一个 500GB 驱动器在同一台正在工作的机器上使用完全相同的型号。
lsblk
:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─md127 9:127 0 465.6G 0 raid1
├─hddraid 253:10 0 465.6G 0 crypt
└─md127p1 259:5 0 265.9G 0 part
sdb 8:16 0 7.9G 0 disk
...other drives
sudo dmesg | grep 'sd[ab]'
:
$ sudo dmesg | grep 'sd[ab]'
[ 25.677445] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[ 25.677459] sd 1:0:0:0: [sdb] Drive-managed SMR disk
[ 25.677461] sd 0:0:0:0: [sda] Write Protect is off
[ 25.677464] sd 1:0:0:0: [sdb] 16514064 512-byte logical blocks: (8.46 GB/7.87 GiB)
[ 25.677465] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 25.677479] sd 1:0:0:0: [sdb] Write Protect is off
[ 25.677481] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 25.677485] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 25.677503] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 25.810898] sd 0:0:0:0: [sda] Attached SCSI disk
[ 27.303158] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 27.340355] md: sdb does not have a valid v1.2 superblock, not importing!
sudo hdparm -N /dev/sda /dev/sdb
:
$ sudo hdparm -N /dev/sda /dev/sdb
/dev/sda:
max sectors = 976773168/976773168, HPA is disabled
/dev/sdb:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 51 40 01 21 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
max sectors = 1610577834/1(1?), HPA setting seems invalid (buggy kernel device driver?)
sudo hdparm -I /dev/sda /dev/sdb
:
$ sudo hdparm -I /dev/sda /dev/sdb
/dev/sda:
ATA device, with non-removable media
Model Number: TOSHIBA MQ01ABF050
Serial Number: 53VACGYLT
Firmware Revision: AM003M
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 976773168
Logical Sector size: 512 bytes
Physical Sector size: 512 bytes
device size with M = 1024*1024: 476940 MBytes
device size with M = 1000*1000: 500107 MBytes (500 GB)
cache/buffer size = 8192 KBytes
Form Factor: 2.5 inch
Nominal Media Rotation Rate: 5400
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: 127
DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
* Advanced Power Management feature set
SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
* IDLE_IMMEDIATE with UNLOAD
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* Idle-Unload when NCQ is active
* DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
110min for SECURITY ERASE UNIT. 110min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50000394c378ce7b
NAA : 5
IEEE OUI : 000039
Unique ID : 4c378ce7b
Checksum: correct
/dev/sdb:
ATA device, with non-removable media
Model Number: @��A�T+QAJEJS G� A q"s�t�2Q.T�5" s
Serial Number: 53VFWB9TT
Firmware Revision: AJp"1�`�
Media Serial Num: ����������������������������������������
Media Manufacturer: ��������������������
Standards:
Used: unknown (minor revision code 0xf5ab)
Supported: 14 13 12 11 10 9 8 7 5
Likely used: 14
Configuration:
Logical max current
cylinders 16383 0
heads 16 0
sectors/track 63 0
--
Logical Sector size: 512 bytes
Physical Sector size: 512 bytes
device size with M = 1024*1024: 8063 MBytes
device size with M = 1000*1000: 8455 MBytes (8 GB)
cache/buffer size = 8192 KBytes
Form Factor: 2.5 inch
Nominal Media Rotation Rate: 5400
Capabilities:
IORDY(may be)(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 234 Current = 2
Advanced power management level: 127
Recommended acoustic management value: 125, current value: 170
DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 (?)
Cycle time: min=32699ns recommended=32682ns
PIO: pio0 pio1 pio2 pio3 pio4 pio5 pio6 pio7 pio8
Cycle time: no flow control=62907ns IORDY flow control=24058ns
Commands/features:
Enabled Supported:
* Security Mode feature set
* Power Management feature set
* Write cache
* SERVICE interrupt
* DEVICE_RESET command
* Host Protected Area feature set
WRITE_VERIFY command
* WRITE_BUFFER command
READ_BUFFER command
* NOP cmd
* Advanced Power Management feature set
Removable Media Status Notification feature set
* Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
* Address Offset Reserved Area Boot
* SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART self-test
* Media Card Pass Through Command feature set
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* WRITE_DMA_QUEUED_FUA_EXT
* 64-bit World wide name
URG for READ_STREAM[_DMA]_EXT
* URG for WRITE_STREAM[_DMA]_EXT
* Time Limited Commands (TLC) feature set
* Command Completion Time Limit (CCTL)
(301220 msec for TLC completion timer)
* Disable Data Transfer After Error Detection
* Write-Read-Verify feature set
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Free-fall Control feature set
* unknown 119[7]
* unknown 119[8]
* unknown 119[9]
* unknown 119[10]
* unknown 119[12]
* unknown 76[0]
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* unknown 76[5]
* unknown 76[7]
* Native Command Queueing (NCQ)
* Phy event counters
* Idle-Unload when NCQ is active
* NCQ priority information
* Host automatic Partial to Slumber transitions
* Device automatic Partial to Slumber transitions
unknown 78[0]
* Non-Zero buffer offsets in DMA Setup FIS
Device-initiated interface power management
* Asynchronous notification (eg. media change)
* unknown 78[7]
* Device Sleep (DEVSLP)
unknown 78[9]
* unknown 78[10]
unknown 78[11]
* unknown 78[12]
unknown 78[13]
* unknown 78[14]
* SMART Command Transport (SCT) feature set
* SCT Read/Write Long (AC1), obsolete
* SCT Write Same (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
unknown 206[6]
unknown 206[7]
unknown 206[8]
unknown 206[9]
unknown 206[10]
unknown 206[11]
unknown 206[12] (vendor specific)
unknown 206[13] (vendor specific)
unknown 206[14] (vendor specific)
unknown 206[15] (vendor specific)
* reserved 69[1]
* Extended number of user addressable sectors
* Device encrypts all user data
* Optional ATA device 28-bit commands
* IEEE 1667 authentication of transient storage devices
* DOWNLOAD MICROCODE DMA command
* SET MAX SETPASSWORD/UNLOCK DMA commands
* WRITE BUFFER DMA command
* DEVICE CONFIGURATION SET/IDENTIFY DMA commands
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
112min for SECURITY ERASE UNIT. 112min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50000394c4b8c204
NAA : 5
IEEE OUI : 000039
Unique ID : 4c4b8c204
Checksum: correct
上下文,可能重要也可能不重要:我在 RAID 1 md 阵列中有两个相同的 500GB 硬盘,使用原始设备。我在 Debian Buster 上设置了 RAID 阵列,并成功使用了几年。我已经完成了 Debian Bullseye 的全新安装。在全新安装 Debian Bullseye 后,我有一段时间没有使用 RAID 阵列,自从安装 Debian Bullseye 后第一次使用它,它无法组装,毫不奇怪,因为其中一个驱动器是错误的尺寸。
答案1
每当你看到这样的事情时:
/dev/sdb:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 51 40 01 21 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
max sectors = 1610577834/1(1?), HPA setting seems invalid (buggy kernel device driver?)
和:
ATA device, with non-removable media
Model Number: @��A�T+QAJEJS G� A q"s�t�2Q.T�5" s
Serial Number: 53VFWB9TT
Firmware Revision: AJp"1�`�
Media Serial Num: ����������������������������������������
Media Manufacturer: ��������������������
为硬件故障做好准备。
说明您已拔掉并插入另一台计算机(这是消除部件(即您的计算机)的好方法,但如果故障设备是导致其他设备因短路而发生故障的设备,这也是一种加剧问题的方法/等)并再次重新插入您自己的计算机,一切似乎“正常”,这是连接/电缆不良的典型迹象,即。
- 电缆故障
- 插头松动
- 弯曲/直电缆不连接并且拉直/弯曲后连接
- ETC。