Skip to contentSkip to conversation

Symbol not found when pvcreating...

linux-lvm David Vidal Rodriguez 2 participants 4 messages May 25, 2001 – May 28, 2001

lore
Share & tools
lore
#0 lore raw

Hi (again)!
When running the CVS version of kernel+tools, the pvcreate utility requests the following symbol that apparently isn't present in the liblvm-10.so.0 library:
int pv_check_partitioned_whole(char *pv_name)

(Error loading shared libraries... blahblah)
An older version of pvcreate (I'm no sure if beta6 or less) does the job correctly.
Do I have to change anything in the sources in order to get it working?

Another --developer-- question:
I've looked at the LVM code and a structure called partition, #include'd from <linux/genhd.h>, which contains the relevant information of a partition. What I don't understand is how to get this information from the kernel/drive (syscall, ioctl???). I'd be glad if somebody explained that to me briefly.

Thanks!
--
------------------------------------------------------------------------
David Vidal R. (vidalrod <at> in DOT tum DOT de)

#2 lore raw
In reply to Heinz J. Mauelshagen
Quoted 10 lines
Quoted 7 lines

Another --developer-- question:
I've looked at the LVM code and a structure called partition, #include'd from <linux/genhd.h>, which contains the relevant information of a partition. What I don't understand is how to get this information from the kernel/drive (syscall, ioctl???). I'd be glad if somebody explained that to me briefly.

That's just needed for the generic disk interface.
It doesn't make any sense to create a partition table on a logical volume.

What I meant is how to get the partition data, such as partition id, start, end, etc., from a _real_ partition (you have get it in order to know if we are initializing a PV on a partition marked as 0x8E). That sounds a bit off-topic, I know...

Cheers,
--
------------------------------------------------------------------------
David Vidal R. (vidalrod <at> in DOT tum DOT de)
http://dvr.ismad.com
"Ein Computer ohne Windows ist wie ein Fisch ohne Fahrrad."

#1 lore raw
In reply to David Vidal Rodriguez

David,

looks like a messy installation :-(

Did you try to remove and completely reinstall LVM based on a clean compile/build run of the tools and library?

Quoted 10 lines · David Vidal Rodriguez

Hi (again)!
When running the CVS version of kernel+tools, the pvcreate utility requests the following symbol that apparently isn't present in the liblvm-10.so.0 library:
int pv_check_partitioned_whole(char *pv_name)

(Error loading shared libraries... blahblah)
An older version of pvcreate (I'm no sure if beta6 or less) does the job correctly.
Do I have to change anything in the sources in order to get it working?

No.

Quoted 7 lines

Another --developer-- question:
I've looked at the LVM code and a structure called partition, #include'd from <linux/genhd.h>, which contains the relevant information of a partition. What I don't understand is how to get this information from the kernel/drive (syscall, ioctl???). I'd be glad if somebody explained that to me briefly.

That's just needed for the generic disk interface.
It doesn't make any sense to create a partition table on a logical volume.

You could get the virtual geometry (which has nothing to do with the underlying physical device(s)) of a logical volume though by doing a block ioctl on its device like:

#include <stdio.h>
#include <fcntl.h>
#include <linux/hdreg.h>

int main ( int argc, char **argv) {
int fd;
struct hd_geometry hd;

   if ( ( fd = open ( argv[1], O_RDONLY)) == -1) return 1;

   ioctl ( fd, HDIO_GETGEO, &hd);
   close ( fd);
   printf ( "heads    : %d\n", hd.heads);
   printf ( "sectors  : %d\n", hd.sectors);
   printf ( "cylinders: %d\n", hd.cylinders);
   printf ( "start    : %d\n", hd.start);

return 0;
}

Quoted 12 lines

Thanks!
--
------------------------------------------------------------------------
David Vidal R. (vidalrod <at> in DOT tum DOT de)

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#3 lore raw
In reply to David Vidal Rodriguez
Quoted 8 lines · David Vidal Rodriguez
Quoted 8 lines
Quoted 7 lines

Another --developer-- question:
I've looked at the LVM code and a structure called partition, #include'd from <linux/genhd.h>, which contains the relevant information of a partition. What I don't understand is how to get this information from the kernel/drive (syscall, ioctl???). I'd be glad if somebody explained that to me briefly.

Quoted 7 lines
Quoted 2 lines

That's just needed for the generic disk interface.
It doesn't make any sense to create a partition table on a logical volume.

What I meant is how to get the partition data, such as partition id, start, end, etc., from a _real_ partition (you have get it in order to know if we are initializing a PV on a partition marked as 0x8E). That sounds a bit off-topic, I know...

Well, you can get it with my example; excluding the partition type identifier :-(

TTBOMK you can use the e2fsprogs library to get that as well.

Quoted 14 lines

Cheers,
--
------------------------------------------------------------------------
David Vidal R. (vidalrod <at> in DOT tum DOT de)
http://dvr.ismad.com
"Ein Computer ohne Windows ist wie ein Fisch ohne Fahrrad."

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-