You are not logged in.

#1 2008-02-21 20:49:42

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Variable hard disk size?

Greetings! I'm a long time Debian and Ubuntu user and just installed Arch Linux a couple weeks ago. Love it so far! I currently dual boot between Arch and Ubuntu 7.10.

However, I noticed whenever starting up in Arch, the kernel would complain about one of my partitions. Specifically:

Feb 21 15:27:00 Argon Driver 'sr' needs updating - please use bus_type methods
Feb 21 15:27:00 Argon Driver 'sd' needs updating - please use bus_type methods
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] 231496650 512-byte hardware sectors (118526 MB)
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] Write Protect is off
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] 231496650 512-byte hardware sectors (118526 MB)
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] Write Protect is off
Feb 21 15:27:00 Argon sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
Feb 21 15:27:00 Argon Uniform CD-ROM driver Revision: 3.20
Feb 21 15:27:00 Argon sr 1:0:0:0: Attached scsi CD-ROM sr0
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 21 15:27:00 Argon sda: sda1 sda2 sda3 sda4 < sda5 >
Feb 21 15:27:00 Argon sda: p5 exceeds device capacity
Feb 21 15:27:00 Argon sd 0:0:0:0: [sda] Attached SCSI disk
Feb 21 15:27:00 Argon attempt to access beyond end of device
Feb 21 15:27:00 Argon sda: rw=0, want=234436337, limit=231496650
Feb 21 15:27:00 Argon Buffer I/O error on device sda5, logical block 74678016
Feb 21 15:27:00 Argon attempt to access beyond end of device
Feb 21 15:27:00 Argon sda: rw=0, want=234436339, limit=231496650
Feb 21 15:27:00 Argon Buffer I/O error on device sda5, logical block 74678017
*** SNIP ***
Feb 21 15:27:00 Argon attempt to access beyond end of device
Feb 21 15:27:00 Argon sda: rw=0, want=234436531, limit=231496650
Feb 21 15:27:00 Argon Buffer I/O error on device sda5, logical block 74678113
Feb 21 15:27:00 Argon attempt to access beyond end of device
Feb 21 15:27:00 Argon sda: rw=0, want=234436533, limit=231496650
Feb 21 15:27:00 Argon attempt to access beyond end of device
Feb 21 15:27:00 Argon sda: rw=0, want=234436535, limit=231496650
*** SNIP ***
Feb 21 15:27:00 Argon attempt to access beyond end of device
Feb 21 15:27:00 Argon sda: rw=0, want=234436545, limit=231496650
Feb 21 15:27:00 Argon kjournald starting.  Commit interval 5 seconds
Feb 21 15:27:00 Argon EXT3-fs: mounted filesystem with ordered data mode.

While investigating this issue, I noticed a very strange difference between fdisk outputs...

In Arch, with fdisk (util-linux-ng 2.13.0.1):

Disk /dev/sda: 118.5 GB, 118526284800 bytes
255 heads, 63 sectors/track, 14410 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00096279

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20481024   83  Linux
/dev/sda2            2551        5100    20482875   83  Linux
/dev/sda3            5101        5296     1574370   82  Linux swap / Solaris
/dev/sda4            5297       14593    74678152+   5  Extended
/dev/sda5            5297       14593    74678121   83  Linux

In Ubuntu, with fdisk (util-linux-ng 2.13):

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00096279

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20481024   83  Linux
/dev/sda2            2551        5100    20482875   83  Linux
/dev/sda3            5101        5296     1574370   82  Linux swap / Solaris
/dev/sda4            5297       14593    74678152+   5  Extended
/dev/sda5            5297       14593    74678121   83  Linux

Notice: 118.5 GB versus 120.0 GB; 14410 cylinders versus 14593 cylinders!

Any idea why these two distributions are reporting a different size of hard disk? The disk was partitioned during the Ubuntu install.

Is this something I should worry about? Whenever Arch runs fdisk it churns out a bunch of errors:

Error reading block ######## (Attempt to read block from filesystem resulted in short read) while getting next inode from scan.  Ignore error<y>? yes

Force rewrite<y>? yes

Please advise!


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#2 2008-02-23 15:48:37

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Variable hard disk size?

Bump!


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#3 2008-02-23 16:49:44

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Variable hard disk size?

Cool.
Have you tried googling for your hd real size?
Don't bother with the geometry: I read the most common way of addressing space is lba nowadays (ever since we topped the 1024 cylinders barrier, or 8 gB hard drives).
You can even change the number of cylinders in the eXtended menu of fdisk afaik.
What's strange is the different size reported.

Offline

#4 2008-02-23 18:45:45

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Variable hard disk size?

Thanks for your response!

It should be a 120 GB drive, as far as I know. The system is a Dell Inspiron 6400/E1505. On the order form, the hard drive is listed as:

HARD DRIVE..., 120G, Serial ATA..., 9, 54, SAMSUNG..., MBL60

It came preinstalled with Windows which also showed a 120 GB drive.

I see fdisk allows me to change the number of cylinders, yes... but why isn't Ubuntu complaining about this problem? Why is it seeing a larger drive? If I changed the number of cylinders in Arch, would this also affect Ubuntu?

I'm considering deleting and recreating the partition, but only as a last resort.

Please, any insights would be appreciated.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#5 2008-02-23 19:41:18

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: Variable hard disk size?

maybe it is ubuntu measuring the size in GB, and arch in GiB?

Offline

#6 2008-02-23 21:06:57

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Variable hard disk size?

Yes, I thought that might've been it too. However, 120 GB ~= 111 GiB, and 120 GiB ~= 128 GB, so it doesn't match up.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#7 2008-02-24 01:36:04

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Variable hard disk size?

Can you post your hdparm -I /dev/sda maybe from both ubuntu and arch?

Offline

#8 2008-02-24 04:49:43

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Variable hard disk size?

Certainly...

From Arch:

/dev/sda:

ATA device, with non-removable media
        Model Number:       WDC WD1200BEVS-75LAT0                   
        Serial Number:      WD-WXE806064174
        Firmware Revision:  02.06M02
Standards:
        Supported: 7 6 5 4 
        Likely used: 7
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:   16514064
        LBA    user addressable sectors:  231496650
        LBA48  user addressable sectors:  231496650
        device size with M = 1024*1024:      113035 MBytes
        device size with M = 1000*1000:      118526 MBytes (118 GB)
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 1
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 8
        Advanced power management level: unknown setting (0x0080)
        Recommended acoustic management value: 128, current value: 254
        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
                SET_MAX security extension
                Automatic Acoustic Management feature set
           *    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
           *    64-bit World wide name
           *    IDLE_IMMEDIATE with UNLOAD
           *    SATA-I signaling speed (1.5Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
                DMA Setup Auto-Activate optimization
                Device-initiated interface power management
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Long Sector Access (AC1)
           *    SCT LBA Segment Access (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12]
Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
                frozen
        not     expired: security count
        not     supported: enhanced erase
Checksum: correct

From Ubuntu:

/dev/sda:

ATA device, with non-removable media
        Model Number:       WDC WD1200BEVS-75LAT0                   
        Serial Number:      WD-WXE806064174
        Firmware Revision:  02.06M02
Standards:
        Supported: 7 6 5 4 
        Likely used: 7
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:   16514064
        LBA    user addressable sectors:  234441648
        LBA48  user addressable sectors:  234441648
        device size with M = 1024*1024:      114473 MBytes
        device size with M = 1000*1000:      120034 MBytes (120 GB)
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 1
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 8
        Advanced power management level: unknown setting (0x0080)
        Recommended acoustic management value: 128, current value: 254
        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
                SET_MAX security extension
                Automatic Acoustic Management feature set
           *    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
           *    64-bit World wide name
           *    IDLE_IMMEDIATE with UNLOAD
           *    SATA-I signaling speed (1.5Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
                DMA Setup Auto-Activate optimization
                Device-initiated interface power management
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Long Sector Access (AC1)
           *    SCT LBA Segment Access (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12]
Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
                frozen
        not     expired: security count
        not     supported: enhanced erase
Checksum: correct

The diff:

18,21c18,21
<       LBA    user addressable sectors:  234441648
<       LBA48  user addressable sectors:  234441648
<       device size with M = 1024*1024:      114473 MBytes
<       device size with M = 1000*1000:      120034 MBytes (120 GB)
---
>       LBA    user addressable sectors:  231496650
>       LBA48  user addressable sectors:  231496650
>       device size with M = 1024*1024:      113035 MBytes
>       device size with M = 1000*1000:      118526 MBytes (118 GB)

M*cr*s*ft: Who needs quality when you have marketing?

Offline

#9 2008-02-24 16:30:24

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Variable hard disk size?

It looks like Ubuntu is giving you access to the Host Protected Area.
Look if the kernel detects one with
dmesg | grep -i "host protected area"

http://bugs.gentoo.org/show_bug.cgi?id=18612
http://lists.linuxcoding.com/kernel/200 … 15061.html

Try passing sda=stroke as kernel parameter at boot.

Offline

#10 2008-02-24 18:37:55

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Variable hard disk size?

That's exactly it! Thank you oh so very much!

From Ubuntu's dmesg:

[    3.936000] ata1.00: Host Protected Area detected:
[    3.936000]  current size: 231496650 sectors
[    3.936000]  native size: 234441648 sectors
[    3.936000] ata1.00: native size increased to 234441648 sectors
[    3.936000] ata1.00: ATA-7: WDC WD1200BEVS-75LAT0, 02.06M02, max UDMA/133
[    3.936000] ata1.00: 234441648 sectors, multi 8: LBA48 NCQ (depth 0/1)
[    3.952000] ata1.00: configured for UDMA/133

However, passing sda=stroke to either Arch or Ubuntu changed nothing.

From what I've read, even if the OS detects the HPA, it still can't write to it? I imagine the HPA on my drive contains either Dell's diagnostic tools or software for the Computrace feature in case of theft... It'd be nice if these were kept intact.

Ideally, I suppose I'd want to disable HPA detection in Ubuntu, or just resize the partition below the non-HPA size. GParted only lets me resize by MB, though. Anyone know how I might resize by sectors?

Regardless, I think I'm going to file an Ubuntu bug report about this. Seems rude to ignore hidden areas by default, doesn't it?


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#11 2008-02-24 21:24:17

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Variable hard disk size?

pointone wrote:

That's exactly it! Thank you oh so very much!
However, passing sda=stroke to either Arch or Ubuntu changed nothing.

Yes, that was a dumb suggestion.
I didn't check if you could pass that parameter using libata...



From what I've read, even if the OS detects the HPA, it still can't write to it? I imagine the HPA on my drive contains either Dell's diagnostic tools or software for the Computrace feature in case of theft... It'd be nice if these were kept intact.

Well, it depends on how much you used your ubuntu installation smile

Ideally, I suppose I'd want to disable HPA detection in Ubuntu, or just resize the partition below the non-HPA size. GParted only lets me resize by MB, though. Anyone know how I might resize by sectors?

1 sector=512bytes ?

Regardless, I think I'm going to file an Ubuntu bug report about this. Seems rude to ignore hidden areas by default, doesn't it?

Did you choose the auto-partitioning scheme when installing, or you manually partitioned your drive?

Offline

#12 2008-02-25 04:22:26

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Variable hard disk size?

I manually partitioned it using the Ubuntu 7.04 installer's partitioning tool a few months ago. Since then, I've been using sda1 for Ubuntu, sda2 for hopping around, sda3 as swap and sda5 as a shared data partition.

Any idea how I could disable HPA detection in Ubuntu?


M*cr*s*ft: Who needs quality when you have marketing?

Offline

Board footer

Powered by FluxBB