Mailinglist Archive: opensuse-bugs (4295 mails)

< Previous Next >
[Bug 1039144] Fdisk and hdparm disagree on disk size and volumes become unmountable
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 17 May 2017 21:53:39 +0000
  • Message-id: <bug-1039144-21960-JGXG2vdaX7@http.bugzilla.opensuse.org/>
http://bugzilla.opensuse.org/show_bug.cgi?id=1039144
http://bugzilla.opensuse.org/show_bug.cgi?id=1039144#c2

--- Comment #2 from Greg Freemyer <Greg.Freemyer@xxxxxxxxx> ---
(In reply to Andreas Stieger from comment #1)
Hmm, is this a kernel issue or tooling issue?

I don't know and I will also add "hardware" as a possible core problem.

I tried hard to repeat the same process as before, but the problem did
not reproduce.

=== my effort to reproduce the problem

(drive is /dev/sdc this time. I routinely add/remove
USB drives from the Leap 42.2 box in question)

I connected the problematic drive with the broken NTFS filesystem.

wipefs -a /dev/sdc
/dev/sdc: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success

fdisk -l /dev/sdc
Disk /dev/sdc: 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

Note the sector count still disagrees with what hdparm -I reported
(1953525168).

Use fdisk to create a default primary partition. Result:

fdisk -l /dev/sdc
Disk /dev/sdc: 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: 0x817739ab

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 1953525163 1953523116 931.5G 83 Linux

(note partition end is appropriate for the fdisk reported sector count.)

mkfs.ntfs -Q /dev/sdc1
mount /dev/sdc1 /mnt
copy some files to it
umount /mnt
fdisk -l /dev/sdc [verify end sector is still 1953525163]

Physically disconnect USB port and reconnect
fdisk -l /dev/sdc [verify end sector is still 1953525163]

physically connect drive to a Windows 8.1 machine and note it fails to
get a drive letter [likely because of the wrong partition type]

Move it back to Leap 42.2 box
fdisk -l /dev/sdc [verify end sector is still 1953525163]

physically connect drive to a Windows 10 machine and note it fails to
get a drive letter [likely because of the wrong partition type]

Move it back to Leap 42.2 box
fdisk -l /dev/sdc [verify end sector is still 1953525163]

Use dolphin to mount the volume - it worked

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