Mailinglist Archive: opensuse-bugs (4295 mails)

< Previous Next >
[Bug 1039144] New: Fdisk and hdparm disagree on disk size and volumes become unmountable
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 15 May 2017 16:13:49 +0000
  • Message-id: <bug-1039144-21960@http.bugzilla.opensuse.org/>
http://bugzilla.opensuse.org/show_bug.cgi?id=1039144


Bug ID: 1039144
Summary: Fdisk and hdparm disagree on disk size and volumes
become unmountable
Classification: openSUSE
Product: openSUSE Distribution
Version: Leap 42.2
Hardware: x86-64
OS: openSUSE 42.2
Status: NEW
Severity: Critical
Priority: P5 - None
Component: Basesystem
Assignee: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
Reporter: Greg.Freemyer@xxxxxxxxx
QA Contact: qa-bugs@xxxxxxx
Found By: ---
Blocker: ---

== root problem - I think
I have a specific Toshiba 1TB drive. hdparm reports it as having 1953525168
sectors.

fdisk says it has 1953525164 sectors. Note the 4 sector difference.

I created a default primary partition on the drive via fdisk, the last sector
of the partition is 1953525167, which places it 4 sectors passed where fdisk
thinks the end of the drive is.

== reproducibility
I have seen this problem at least once before. Likely with the same model
Toshiba drive, but I can't say for sure.

I attempted to reproduce the problem with a different model Toshiba 1TB drive.
The problem did NOT reproduce.

I'm moving all data off of the drive with the corrupt filesystem now and will
keep the drive with the corrupt filesystem available for troubleshooting /
testing.

(ie. when I first mkfs.ntfs'ed the overly long partition I was able to mount
the drive and add data to it. Approximately 500GB. After attempting to
connect the drive to a Windows 10 PC and failing, I brought the drive back to
my Leap 42.2 PC and now it can't mount it either due to the last sector of the
filesystem not being accessible.)

== observed problem

At first I can mount a NTFS volume formatted via Leap 42.2, but if I then
connect the drive to a Windows 10 PC and bring it back to the Leap 42.2 PC, it
becomes non-mountable because the last sector of the filesystem is unreadable.
==

What I did as best I can re-create:

- Using a Sata-USB bridge insert a brand new 1TB drive - no partition table
- Use fdisk to partition the drive, accept default parameters for
partition 1 and let it fill 99.9% of the drive
- write out the partition table

Use fdisk to see if the partition table is okay:

sudo fdisk -l /dev/sda
Disk /dev/sda: 931.5 GiB, 1000204883968 bytes, 1953525164 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: 0x095da008

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1953525167 1953523120 931.5G 83 Linux

========================================================

Looks normal to me.

But look at the total sector count for the drive and the end sector of
the partition.

1953525167 > 1953525164, so the partition extends past the end of the
physical drive?

That seems to be the root cause of a couple filesystems becoming
non-mountable for me.

=== drive details
sudo hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
Model Number: TOSHIBA HDWD110
Serial Number: 17BS7HGFS
Firmware Revision: MS2OA8J0
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II
Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0; Revision: ATA8
-AST T13 Project D1697 Revision 0b
Standards:
Used: unknown (minor revision code 0x0029)
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: 1953525168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 953869 MBytes
device size with M = 1000*1000: 1000204 MBytes (1000 GB)
cache/buffer size = unknown
Form Factor: 3.5 inch
Nominal Media Rotation Rate: 7200
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 = 0
Advanced power management level: disabled
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
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
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
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
Media Card Pass-Through
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
* URG for READ_STREAM[_DMA]_EXT
* URG for WRITE_STREAM[_DMA]_EXT
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* unknown 119[7]
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* NCQ priority information
Non-Zero buffer offsets in DMA Setup FIS
DMA Setup Auto-Activate optimization
Device-initiated interface power management
In-order data delivery
* 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
not frozen
not expired: security count
not supported: enhanced erase
160min for SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000039fedd8a830
NAA : 5
IEEE OUI : 000039
Unique ID : fedd8a830
Checksum: correct

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >