[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#578272: linux-image-2.6.32-3-686: Enabling Host Protected Area leads to LVM failure



On Mon, 2010-04-19 at 00:02 +0100, Ben Hutchings wrote:
> On Sun, 2010-04-18 at 22:10 +0200, Michael Banck wrote:
> > Hi,
> > 
> > On Sun, Apr 18, 2010 at 05:37:58PM +0100, Ben Hutchings wrote:
> > > On Sun, 2010-04-18 at 16:17 +0200, Michael Banck wrote:
> > > > Package: linux-2.6
> > > > Version: 2.6.32-9
> > > > Severity: normal
> > > > 
> > > > Hi,
> > > > 
> > > > Going from 2.6.30 to 2.6.32, I can no longer mount my LVM-based
> > > > partition on my secondary harddisk, I get the following error when I try
> > > > to run e.g. vgchange:
> > > > 
> > > > nighthawk~$ LANG=C sudo vgchange -a y 
> > > >   2 logical volume(s) in volume group "nighthawk" now active
> > > >   device-mapper: resume ioctl failed: Invalid argument
> > > >   Unable to resume data-data (254:3)
> > > >   1 logical volume(s) in volume group "data" now active
> > > > nighthawk~$ sudo mount /dev/mapper/data-data /mnt
> > > > mount: /dev/mapper/data-data already mounted or /mnt busy
> > > > 
> > > > This is the corresponding kernel error in syslog:
> > > > 
> > > > Apr 18 15:17:02 nighthawk kernel: [   20.713326] device-mapper: table: 254:3: hdc too small for target: start=384, len=78135296, dev_size=71762930
> > > > 
> > > > It turns out this is because contrary to linux-image-2.6.30-2-686,
> > > > 2.6.32 does not disable HPA:
> > > [...]
> > > 
> > > Is there a partition table on /dev/hdc?
> > 
> > No, it seems to be a direct LVM image/partition which spans the whole
> > disk.
> 
> Then I don't know why the HPA was disabled previously.
[...]

I have now found out that this was the default behaviour before Linux
2.6.31.  The change was explained thus:

commit 075affcbe01d4d7cefcd0e30a98df1253bcf8d92
Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date:   Sun Jun 7 13:52:52 2009 +0200

    ide: preserve Host Protected Area by default (v2)
    
    From the perspective of most users of recent systems, disabling Host
    Protected Area (HPA) can break vendor RAID formats, GPT partitions and
    risks corrupting firmware or overwriting vendor system recovery tools.
    
    Unfortunately the original (kernels < 2.6.30) behavior (unconditionally
    disabling HPA and using full disk capacity) was introduced at the time
    when the main use of HPA was to make the drive look small enough for the
    BIOS to allow the system to boot with large capacity drives.
    
    Thus to allow the maximum compatibility with the existing setups (using
    HPA and partitioned with HPA disabled) we automically disable HPA if
    any partitions overlapping HPA are detected.  Additionally HPA can also
    be disabled using the "nohpa" module parameter (i.e. "ide_core.nohpa=0.0"
    to disable HPA on /dev/hda).

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: