Я купил USB 3.0 внешний 3,5 "чехол для жесткого диска.
Он основан на следующем чипе: JMicron JMS567
Я хочу использовать его для подключения моего внутреннего жесткого диска, который имеет три раздела: раздел подкачки и два раздела ext4.
В целях тестирования я взял свой старый жесткий диск объемом 200 ГБ, который имел 2 раздела: первый - небольшой NTFS-раздел, а второй - ext4.
Мой компьютер работает под управлением Linux Mint 17.2, x86_64, ядро 4.4.
Когда я подключил корпус жесткого диска к своему ПК, я смог получить доступ к первому разделу NTFS, но было невозможно получить доступ ко второму разделу ext4! Я также попробовал USB-чехол на Arch 2017.8 (VirtualBox). Та же проблема!
Вот что dmesg говорит при сбое монтирования:
[288553.362536] sdd: sdd1 sdd2 [288553.362593] sdd: p2 size 384428032 extends beyond EOD, enabling native capacity [288553.366410] sdd: sdd1 sdd2 [288553.366457] sdd: p2 size 384428032 extends beyond EOD, truncated [288553.394656] sd 13:0:0:0: [sdd] Attached SCSI disk [288554.138776] EXT4-fs (sdd2): bad geometry: block count 48053504 exceeds size of device (48053293 blocks) [288555.667902] EXT4-fs (sdd2): bad geometry: block count 48053504 exceeds size of device (48053293 blocks)
Я на 100% уверен, что на моем диске нет ошибок ! Я протестировал его, когда он был подключен к моему ПК как обычный жесткий диск SATA!
Самое смешное, что под Windows 7 я установил драйвер ext2fsd который позволяет получить доступ к разделам ext4 под Windows. Итак, под Win 7 я могу получить доступ ко второму разделу ext4 без проблем!
Это определенно проблема с драйвером USB!
Мои параметры диска 200 ГБ, когда он был подключен как диск SATA (я установил жирным шрифтом те значения, которые отличаются, когда диск подключен через USB):
fdisk -l /dev/sdd
Disk /dev/sdd: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 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
Disk identifier: 0xe1751117
Device Boot Start End Blocks Id System
/dev/sdd1 * 2048 6293503 3145728 7 HPFS/NTFS/exFAT
/dev/sdd2 6293504 390721535 192214016 83 Linux
hdparm -I /dev/sdd
/dev/sdd:
ATA device, with non-removable media
Model Number: WDC WD2000JS-00MHB0
Serial Number: WD-WMANL1143240
Firmware Revision: 02.01C03
Standards:
Supported: 7 6 5 4
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: 390721968
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 190782 MBytes
device size with M = 1000*1000: 200049 MBytes (200 GB)
cache/buffer size = 8192 KBytes
Тот же диск, но теперь подключен через корпус USB HDD:
fdisk -l /dev/sdd
Disk /dev/sdd: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390719855 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disk identifier: 0xe1751117
Device Boot Start End Blocks Id System
/dev/sdd1 * 2048 6293503 3145728 7 HPFS/NTFS/exFAT
/dev/sdd2 6293504 390721535 192214016 83 Linux
hdparm -I /dev/sdd
/dev/sdd:
ATA device, with non-removable media
Model Number: WDC WD2000JS-00MHB0
Serial Number: WD-WMANL1143240
Firmware Revision: 02.01C03
Standards:
Supported: 7 6 5 4
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: 390719855
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 190781 MBytes
device size with M = 1000*1000: 200048 MBytes (200 GB)
cache/buffer size = 8192 KBytes
Как видите, геометрия неправильная, потому что размер сектора неправильный ... Может быть, в параметрах монтирования есть какой-либо параметр, позволяющий установить размер блока / сектора? Или любое другое решение?
Спасибо!
PS Подробное описание USB-чипа:
Bus 002 Device 004: ID 152d:2590 JMicron Technology Corp. / JMicron USA Technology Corp. Seatay ATA/ATAPI Bridge
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
idProduct 0x2590 Seatay ATA/ATAPI Bridge
bcdDevice 81.05
iManufacturer 1 USB to ATA/ATAPI Brid
iProduct 2 Generic USB Device
iSerial 3 00A12345AFC0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 85
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4 USB Mass Storage
bmAttributes 0xc0
Self Powered
MaxPower 30mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 6 MSC Bulk-Only Transport
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 4
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 98
iInterface 10 MSC USB Attached SCSI
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Command pipe (0x01)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Status pipe (0x02)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Data-in pipe (0x03)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Data-out pipe (0x04)
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 22
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 32 micro seconds
Device Status: 0x0001
Self Powered
