[Top][All Lists]

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

Re: sanity check

From: Andrew Clausen
Subject: Re: sanity check
Date: Tue, 6 Nov 2001 11:12:37 +1100
User-agent: Mutt/1.3.17i

Hi Don,

Your entire email came through as one paragraph... it would be easier
if it was broken up a bit ;)

On Mon, Nov 05, 2001 at 11:04:55AM -0600, Don Mulvey wrote:
> As you know, I have been playing a bit with libparted


> and trying to run
> through evms partition discovery by making libparted calls.   I have a bit
> of code from the discovery piece that I wanted to show you.    In the
> following code, a segment manager has been called by the evms engine to
> discover partitions on a disk and create a partition list.   The code is
> passed a storage object (type==disk) and is suppose to use the i/o routines
> and geometry info provided by the disk storage object.   Ok?

ala _arch_device_new() in libparted/device_linux.c?
That should be your model ;)

> The approach
> is to build a PedDevice with the same info as the disk storage object and
> then continue with the partition discovery process.   So,  I first get a
> PedDevice from libparted

Huh?  _arch_device_new() ped_malloc()'s it's own PedDevice... you
should be doing the same thing, IMHO.

> Currently, I am getting as far as read_table()
> ( in disk_dos.c  ) but then failing on partition checks.  I think it is due
> to reported geometry and invalid partition allignment.

Hmmm, does it usually complain?  (i.e. if you use parted normally)

Is it a warning (which you can be choosing to resolve by ignoring it)?

> However,  I have a
> very simple partition scheme, cylinder allingment, etc. and believe I am
> simply not telling parted the correct info ... someplace.   The test disk
> (C=827,H=64,S=63)  has 3 logical drives in an extended partition.
> Libparted coughs right away ... doesnt like the extended partition record
> in the mbr.    The  extended  starts (0,1,1)  and ends (8,63,63).   Could
> you take a look and tell me if I am crazy or not?     Thanks,  Don
>     sprintf(disk_name, "/dev/%s", ld->name);   // ld==disk storage object ... 
> ld->name == hda, hdb, etc
>     disk_pdata->ped_device = ped_device_get(disk_name);

YUCK!  Yes, I think this is crazy...


reply via email to

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