hard drives seem corrupt (and they really are not)

Bug #1437648 reported by andy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

this is a report from a live dvd ubuntu 14.04:

gparted &

Invalid argument during seek for read on /dev/sda

parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: Invalid argument during seek for read on /dev/sda
Retry/Ignore/Cancel? c
Model: ATA TOSHIBA DT01ACA3 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
(parted) print
Error: Invalid argument during seek for read on /dev/sda
Retry/Ignore/Cancel? i
Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? o
Model: ATA TOSHIBA DT01ACA3 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
(parted) q

gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.8

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************

Command (? for help): q

the same applies to all three hard disks (previously it only happened on /dev/sda while sdb & sdc seemed fine)
On 10.04 all three drives function correctly and they are part of a fully working raid5 array, that contains an encrypted lvm filesystem.

on ubuntu 10.04:

$ parted /dev/sda
GNU Parted 2.2
Using /dev/sda
(parted) print
Model: ATA TOSHIBA DT01ACA3 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 17.4kB 37.7GB 37.7GB ext3 boot
 3 37.7GB 37.7GB 32.9MB bios_grub
 2 37.7GB 3001GB 2963GB raid

(parted) quit

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: udisks2 2.1.3-3git1
ProcVersionSignature: Ubuntu 3.16.0-23.31-generic 3.16.4
Uname: Linux 3.16.0-23-generic i686
ApportVersion: 2.14.7-0ubuntu8
Architecture: i386
CasperVersion: 1.345
Date: Sat Mar 28 15:31:03 2015
LiveMediaBuild: Ubuntu 14.10 "Utopic Unicorn" - Release i386 (20141022.1)
MachineType: Gigabyte Technology Co., Ltd. G31M-ES2L
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: file=/cdrom/preseed/hostname.seed boot=casper initrd=/casper/initrd.lz quiet splash --
SourcePackage: udisks2
Symptom: storage
Title: Internal hard disk partition cannot be mounted manually
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/09/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: FI
dmi.board.name: G31M-ES2L
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrFI:bd08/09/2010:svnGigabyteTechnologyCo.,Ltd.:pnG31M-ES2L:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnG31M-ES2L:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: G31M-ES2L
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
andy (andysoup) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, not a CD image problem. This is totally unrelated to udisks2, and just seems to be a weird partitioning on your hard disk?

affects: udisks2 (Ubuntu) → ubuntu-cdimage
affects: ubuntu-cdimage → ubuntu
Changed in ubuntu:
status: New → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

Forwarding private mail which should have gone to the bug:

Hi, and thanks for your mail.
Well, after some help from askubuntu and some debugging it seems to have something to do with the live dvd changing the HPA configuration of the hard drives.
I used hdparm -N to check the hard drives and they had HPA enabled.
I used hdparm -N p5860533168 to disable HPA on all hard drives but /dev/sda always refuses to comply with I/O error. (That made me suspect that the configuration had already had a permanent change since boot time). After changing the sata cables so that it would be /dev/sdc, my main boot drive accepted to change the configuration, and HPA was disabled. When I changed the cable back and it was sda again, I boot into the 14.04 dvd and then both sda and sdb (which was sda during the cable change) went back to having HPA activated. I change sdb back to disabled but sda again refused with I/O error.
So no, I don't think it has anything to do with partitioning, it seems like the live dvd is doing something in the form of 'hdparm -N p5860531055 /dev/sda' when it boots.

Changed in ubuntu:
status: Invalid → New
Revision history for this message
Phillip Susi (psusi) wrote :

So it is actually your bios that foolishly enables the HPA. The ubuntu kernel used to be patched to disable it during boot ( to work around these silly biosen ) but doesn't seem to be doing so in your case. You can add "libata.ignore_hpa=1" to your kernel command line to disable it and that should get you going. The fact that it is no longer happening automatically though appears to be a regression in the kernel so I'm reassigning it there.

affects: ubuntu → linux (Ubuntu)
Revision history for this message
Phillip Susi (psusi) wrote :

Boy, seems this was removed a long time ago. The last release with this patch was lucid.

commit d109cbfbd897782e4f266c11faeb6a913e2b2428
Author: Scott James Remnant <email address hidden>
Date: Tue Mar 3 14:20:01 2009 +0000

    UBUNTU: SAUCE: libata: Ignore HPA by default.

    This was previously changed by using an "options" line in a modprobe.d
    file, however that practice is now deprecated. This is because module
    names, option names, their values and even their current defaults can
    all change inside the kernel and module-init-tools has never been kept
    in sync.

    In addition, changing the kernel means that the option change will apply
    if the module is built in by users or the OEM team.

tags: added: bot-stop-nagging regression-release
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: kernel-da-key
Changed in linux (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.