[Top][All Lists]

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

Re: assertion PED_LE64_TO_CPU (gpt->AlternateLBA) <= disk->dev->length f

From: Bjorn Helgaas
Subject: Re: assertion PED_LE64_TO_CPU (gpt->AlternateLBA) <= disk->dev->length failed
Date: Tue, 26 Aug 2008 12:27:21 -0600
User-agent: KMail/1.9.9

On Tuesday 26 August 2008 03:14:32 am Jim Meyering wrote:
> Bjorn Helgaas <address@hidden> wrote:
> > [I tried to submit this via Trac, but it said "500 Internal Server Error
> > (Submission rejected as potential spam)"].
> >
> > I also tried to debug this with gdb, but the parted I built complains
> > like this:
> Sometimes it's easier to debug if you configure like this:
>     ./configure --enable-debug --disable-shared CFLAGS=-g
> >   $ /usr/local/sbin/parted ../rhel5.2-image
> >   /usr/local/sbin/parted: error while loading shared libraries: 
> > libparted-1.8.so.8: cannot open shared object file: No such file or 
> > directory
> > ... I used dd to copy the first 5GB of /dev/sda to the file rhel5.2-image.
> >
> > The GPT scheme keeps a secondary copy of the partition table at the
> > end of the disk.  My rhel5.2-image file is obviously missing that,
> > since it only contains the first 5GB of the disk image.  That might
> > explain this assertion failure.
> Yes, that is probably the root of the problem.
> The assertion is Parted's way of warning you that your
> disk/partition table is corrupted in a surprising/unusual way.
> Can you suggest a better way to handle this sort of failure?

My preference would be:

  - Since there's a valid GPT at the beginning of the image, and only
    the secondary copy is missing, warn that the secondary copy is
    missing or corrupted and continue.

Or maybe:

  - Give me a chance to update the GPT and generate a new valid
    secondary copy at a different location (my image is large
    enough to hold all defined partitions).

Or even just:

  - Complain that the partition table is corrupted and exit gracefully.

As it is, parted really doesn't tell me what the problem is or
give any clues about how I might fix it.  I'm just making guesses
based on how I created the disk image.

I know this is an unusual situation, and I basically shot myself
in the foot, so I wasn't too surprised to run into problems.  I just
think partitioning is such a critical thing that it's nice if the
tools can deal with and help you recover from problems.  For
example, parted probably can already deal with a complete image in
which one of the GPT copies is corrupted.  This is just a slightly
different sort of corruption.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]