질문: 500GB 하드 드라이브가 있는데 Linux에서는 현재 7.9GB에 불과하다고 생각합니다. 특히 Linux는 이전 CHS 제한이었던 16514064 섹터라고 생각하므로 드라이브가 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를 설치한 이후 처음으로 RAID 어레이를 사용했을 때 드라이브 중 하나의 크기가 잘못되었기 때문에 당연히 조립되지 않았습니다.
답변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)를 다시 컴퓨터에 연결하면 모든 것이 "정상"인 것처럼 보였습니다. 이는 연결/케이블이 불량하다는 전형적인 신호입니다.
- 케이블 고장
- 플러그가 헐거워요
- 구부러진/직선 케이블이 연결되지 않고 곧게 펴거나 구부러진 후에 연결됩니다.
- 등.