Bug 244491 - wrong disk geometry short 100 gig on 500 gig Seagate disk , parted, gparted, qtparted and smartctl report same size
Summary: wrong disk geometry short 100 gig on 500 gig Seagate disk , parted, gparted, ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 6
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-16 04:08 UTC by Ian Fennell
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-06-27 14:37:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
smartctl all report with parted p info appended (6.14 KB, application/octet-stream)
2007-06-16 04:08 UTC, Ian Fennell
no flags Details
reproduction of original errors (9.28 KB, text/plain)
2007-06-21 04:43 UTC, Ian Fennell
no flags Details
boot dmseg log (22.10 KB, text/plain)
2007-06-27 01:41 UTC, Ian Fennell
no flags Details

Description Ian Fennell 2007-06-16 04:08:32 UTC
Description of problem: new ide Seagate disk 500gig barracuda 7200.10
wrong disk geometry short 100 gig on 500 gig Seagate disk , parted, gparted
(0.3.3), qtparted and smartctl report same size
systemrescue disk 0.3.6 with  gparted 0.3.4 reports correct size
Version-Release number of selected component (if applicable):
gparted (0.3.3), qtparted 0.4.5-14.fc7,x86_64
smartctl 5.37
parted 1.8.6-4.fc7.x86_64 with debug and kernel debug
How reproducible:  every time programs execute and  access the disk


Steps to Reproduce:
1.launch and read reported geometry
2.
3.
  
Actual results:
400 gig size, short cylinders , gparted 377.76 gib and random crashes on menu
access  
400 gig disks reported correctly, qtparted reported error on partioning/formating
smartctl reports 405,618,581,504 bytes for ST3500830A
Expected results:
500 gig size , correct cylinders 976769065

Additional info:

Comment 1 Ian Fennell 2007-06-16 04:08:32 UTC
Created attachment 157175 [details]
smartctl all report with parted p info appended

Comment 2 Ian Fennell 2007-06-16 04:11:01 UTC
uptodate fc7 2.6.21.1.3228 x86_64 debug kernel

Comment 3 Tomas Smetana 2007-06-18 07:23:17 UTC
Could you please also post the output of "cat /sys/block/sdc/size"? Thanks.

Comment 4 Ian Fennell 2007-06-21 04:38:24 UTC
while I was gathering info yesterday :
1: ran cat /sys/block/sdd/size as root and it reported the correct number of 
cylinders( expected : it was okay since formated in systemrescue , as above)( 
mounted as usb drive , not ide.
2: I deleted the partions and ran it again , size was still ok
3: ran dd if=/dev/zero of=/dev/sdd bs=1M stopped it at 21 gig , size still ok
4: clicked safely remove ( nothing was mounted ) and disconnected usb and 
power cables.
5: hot plugged virgin 500 gig sata drive on same usb bridge interface and my 
system locked up usb (keyboard and mouse too ) cpu monitor frowned at me for 5 
minutes and I gave up ( not patient enough to wait and see if it would come 
back - remembered sata hotplug= no )
6: booted today sata drive correctly seen , even uninitialised ( couldn't find 
the ide drive when it wasn't initialised on usb) cat /sys/block/sde/size size 
correct  see screen copies of console )
7: ERRORs reproducible 500 gig ide on /dev/sdc now seen incorrectly again 
reporting just over 400gig in all software : smartctl , gparted , 
qtparted , "cat /sys/block/sdc/size , and I presume parted . Allowed gparted 
to initialise the partion table, attached are screen displays and log files 
are available

note that running the tools from the root console reports errors in gtk stuff 
for gparted ( touching edit menu, same errors in evolution startup)
and qtparted reports attribute errors (in the console)and mkfs_ext3 errors in 
the application ( screen shots available)

Comment 5 Ian Fennell 2007-06-21 04:43:40 UTC
Created attachment 157514 [details]
reproduction of original errors

will attach app logs from gparted/qtparted if desired

Comment 6 Tomas Smetana 2007-06-26 11:19:50 UTC
This has nothing to do with smartmontools. There might be something wrong in
kernel since it reports wrong size in /sys.

Comment 7 Chuck Ebbert 2007-06-26 18:40:12 UTC
please post the boot log (contents of /var/log/dmesg) after booting with disk
attached.

Comment 8 Ian Fennell 2007-06-27 01:41:57 UTC
Created attachment 157977 [details]
boot dmseg log

just ask ,I'll try to do it.

Comment 9 Chuck Ebbert 2007-06-27 14:37:16 UTC
You have an HPA:

ata2.01: ata_hpa_resize 1: sectors = 792223792, hpa_sectors = 976773168
ata2.01: Host Protected Area detected:
	current size: 792223792 sectors
	native size: 976773168 sectors

http://en.wikipedia.org/wiki/Host_Protected_Area

If you are sure there is nothing in there you need, either wipe it or boot with
the kernel parameter 'libata.ignore_hpa=1'. This will ignore the HPA on _all_
drives -- so may change their size too.

http://fedoraproject.org/wiki/Bugs/F7Common#head-65f561a07fdf2889f310f3aac0ab0f984faf3e9c

Comment 10 Ian Fennell 2007-06-27 21:35:08 UTC
the usage of the disk is not symmetrical
when I mount it as a usb drive , with no other modification, the full disk is 
available , even in these tools.

I wouldn't expect changing a connection point to change the way the system 
sees the disk- the tools should work the same on the same disk, no matter the 
intermediate layers. If it does, I would expect a configurable option/warning 
message.

Till you guided me to the hpa information, I wasn't aware of it's existence, 
and I've formatted and partitioned many disks.





Note You need to log in before you can comment on or make changes to this bug.