Skip to contentSkip to conversation

LVM Partition Dependency

linux-lvm [email protected] 2 participants 2 messages Oct 30, 2000

lore
Share & tools
lore
#0 lore raw

I'm trying to construct an LVM solution with block devices that are not located in the partition table (becuase they are not a local fixed physical disk). I'm curious how deep the dependency on being in the partition goes with the LVM.

For example, I know the /proc/partitions file is checked during pvcreate...if I rewrote pvcreate to get around this check would I encounter other dependencies on actually being a drive partition located on the local machine later?

Or, if I added my block device to the partitions table, would that be enough to fulfill all requirements of being a local partition that are required by the LVM?

Would the problems be only with the user space tools, or would there also be problems in the kernel module?

Just curious on how far I would have to go to "trick" or "modify" the LVM to accept something other than a local hard drive partition.

Thank you,
Paul Monday
[email protected]

#1 lore raw

Hi Paul.

Quoted 4 lines · On Mon, Oct 30, 2000 at 10:01:09AM -0600, [email protected] wrote:

I'm trying to construct an LVM solution with block devices that are not located in the partition table (becuase they are not a local fixed physical disk).

Sounds like NBD or friends.

Quoted 2 lines

I'm curious how deep the dependency on being in the partition goes with the LVM.

Actually not very deep.

Quoted 3 lines

For example, I know the /proc/partitions file is checked during pvcreate...

Yes.
It is done in tools/lib/lvm_dir_cache.c
You need to extend the devdir array.

Quoted 3 lines

if I rewrote pvcreate to get around this check would I encounter other dependencies on actually being a drive partition located on the local machine later?

It is less a question of beeing local to the machine because there's NBD support build in anyway. It's more a question of checking for supported devices in tools/lib/lvm_check_dev.c based on device majors.

Quoted 4 lines

Or, if I added my block device to the partitions table, would that be enough to fulfill all requirements of being a local partition that are required by the LVM?

That and addiing a new device major to lvm_check_dev.c should do it.

Quoted 3 lines

Would the problems be only with the user space tools, or would there also be problems in the kernel module?

The driver only remaps devices and sectors based on tables the userspace supplies. The only thing it needs to care about that it is a block device ;-)

Quoted 3 lines

Just curious on how far I would have to go to "trick" or "modify" the LVM to accept something other than a local hard drive partition.

As i mentioned above: NBD should work.

Quoted 5 lines

Thank you,
Paul Monday
[email protected]

Signature · 12 lines
Regards,
Heinz      -- The LVM guy --

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

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Bartningstr. 12
                                                  64289 Darmstadt
                                                  Germany
[email protected]                           +49 6151 7103 86
                                                       FAX 7103 96
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-