linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvcreate to memory
@ 2020-09-04 23:40 Tomas Dalebjörk
  2020-09-05  8:21 ` Bryn M. Reeves
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Dalebjörk @ 2020-09-04 23:40 UTC (permalink / raw)
  To: linux-lvm

hi
is there a way to create vgda information to memory?

I want to create a virtual LVM disk
We have all the cow data on a disk, but 
# lvconvert -s vg/lv /dev/mydisk
doesn’t accept the path to the disk device
and if I create a symbolic disk in /dev/vg/mydisk of in /dev/mapper/vg—mydisk pointing to /dev/mydisk
the ‘lvconvert’ command doesnt accept the cow data on the disk
so I guess that the VGDA data has to be present on the disk in order for the lvconvert command to accept the data
what do you think could be missing?
is it the vgda meta data on the disk?

if so, how can I create and emulate the vgda data so that the lvconvert command works?

thanks in advance 
regards Tomas

Sent from my iPhone

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] pvcreate to memory
  2020-09-04 23:40 [linux-lvm] pvcreate to memory Tomas Dalebjörk
@ 2020-09-05  8:21 ` Bryn M. Reeves
  2020-09-05 11:04   ` Tomas Dalebjörk
  0 siblings, 1 reply; 4+ messages in thread
From: Bryn M. Reeves @ 2020-09-05  8:21 UTC (permalink / raw)
  To: LVM general discussion and development

On Sat, Sep 05, 2020 at 01:40:54AM +0200, Tomas Dalebjörk wrote:
> is there a way to create vgda information to memory?

The VGDA (volume group descriptor area) is a term from AIX's volume manager:
it's not going to apply directly to LVM2.

There are PV labels (headers), which identify a disk as belonging to LVM and
include the PV UUID, and there is the text metadata area (mda) which contains
the volume group metadata that describes an LVM2 VG and the logical volumes
that it includes. All physical volumes must have a PV label, but some PVs in
a VG (especially if it has many PVs) need not contain metadata.

If you understand this then you can push the limits of what you can do in
various ways and even construct devices "by hand" with dmsetup. This doesn't
mean you can do anything but the better you know the component parts the more
possibilities are available to you (and it's worth pointing out that these
configurations place a lot more responsibility on the user than normal - you
get to keep all the pieces when they break).

If you're interested in LVM internals you should start with something like
Alasdair's talk from a few years ago, and learn how the VG metadata read from
devices is translated into device-mapper tables.

It's easy enough to create a PV (and a volume group) on a RAM based device but
unless you understand how the various layers opperate you will have a very
hard time trying to get the tools to do what you want.

  http://people.redhat.com/agk/talks/LVM2-LinuxTag2006/

Regards,
Bryn.

> I want to create a virtual LVM disk
> We have all the cow data on a disk, but 
> # lvconvert -s vg/lv /dev/mydisk
> doesn’t accept the path to the disk device
> and if I create a symbolic disk in /dev/vg/mydisk of in /dev/mapper/vg—mydisk pointing to /dev/mydisk
> the ‘lvconvert’ command doesnt accept the cow data on the disk
> so I guess that the VGDA data has to be present on the disk in order for the lvconvert command to accept the data
> what do you think could be missing?
> is it the vgda meta data on the disk?
> 
> if so, how can I create and emulate the vgda data so that the lvconvert command works?
> 
> thanks in advance 
> regards Tomas
> 
> Sent from my iPhone
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] pvcreate to memory
  2020-09-05  8:21 ` Bryn M. Reeves
@ 2020-09-05 11:04   ` Tomas Dalebjörk
  2020-09-05 11:38     ` Bryn M. Reeves
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Dalebjörk @ 2020-09-05 11:04 UTC (permalink / raw)
  To: LVM general discussion and development

thanks

I thought that LVM was originally a source copy clone from HPUX LVM?
Hence the questions related to VGDA

so once I have created this pv header informations, what more do I need in order for the lvconvert -s to accept my cow device?
do I have to also create the minor,major device for the logical volume, or will some other os command do that for me?

the offsets on the cow device is relative to the lv view, so I assume a device mapper device is needed to be created, perhaps that is done automatically by some os command?

Will read through the materials and perform some experiments 
regards Tomas

Sent from my iPhone

> On 5 Sep 2020, at 10:21, Bryn M. Reeves <bmr@redhat.com> wrote:
> 
> On Sat, Sep 05, 2020 at 01:40:54AM +0200, Tomas Dalebjörk wrote:
>> is there a way to create vgda information to memory?
> 
> The VGDA (volume group descriptor area) is a term from AIX's volume manager:
> it's not going to apply directly to LVM2.
> 
> There are PV labels (headers), which identify a disk as belonging to LVM and
> include the PV UUID, and there is the text metadata area (mda) which contains
> the volume group metadata that describes an LVM2 VG and the logical volumes
> that it includes. All physical volumes must have a PV label, but some PVs in
> a VG (especially if it has many PVs) need not contain metadata.
> 
> If you understand this then you can push the limits of what you can do in
> various ways and even construct devices "by hand" with dmsetup. This doesn't
> mean you can do anything but the better you know the component parts the more
> possibilities are available to you (and it's worth pointing out that these
> configurations place a lot more responsibility on the user than normal - you
> get to keep all the pieces when they break).
> 
> If you're interested in LVM internals you should start with something like
> Alasdair's talk from a few years ago, and learn how the VG metadata read from
> devices is translated into device-mapper tables.
> 
> It's easy enough to create a PV (and a volume group) on a RAM based device but
> unless you understand how the various layers opperate you will have a very
> hard time trying to get the tools to do what you want.
> 
>  http://people.redhat.com/agk/talks/LVM2-LinuxTag2006/
> 
> Regards,
> Bryn.
> 
>> I want to create a virtual LVM disk
>> We have all the cow data on a disk, but 
>> # lvconvert -s vg/lv /dev/mydisk
>> doesn’t accept the path to the disk device
>> and if I create a symbolic disk in /dev/vg/mydisk of in /dev/mapper/vg—mydisk pointing to /dev/mydisk
>> the ‘lvconvert’ command doesnt accept the cow data on the disk
>> so I guess that the VGDA data has to be present on the disk in order for the lvconvert command to accept the data
>> what do you think could be missing?
>> is it the vgda meta data on the disk?
>> 
>> if so, how can I create and emulate the vgda data so that the lvconvert command works?
>> 
>> thanks in advance 
>> regards Tomas
>> 
>> Sent from my iPhone
>> 
>> 
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] pvcreate to memory
  2020-09-05 11:04   ` Tomas Dalebjörk
@ 2020-09-05 11:38     ` Bryn M. Reeves
  0 siblings, 0 replies; 4+ messages in thread
From: Bryn M. Reeves @ 2020-09-05 11:38 UTC (permalink / raw)
  To: LVM general discussion and development

On Sat, Sep 05, 2020 at 01:04:17PM +0200, Tomas Dalebj�rk wrote:
> I thought that LVM was originally a source copy clone from HPUX LVM?
> Hence the questions related to VGDA

No, that's not correct. The original LVM1 for Linux developed by Heinz
Mauelshagen at Sistina was based on the design and command line model of
HPUX LVM, but the source was developed from scratch (although it did use
the term VGDA and /etc/lvmtab).

Even so, that's more than 20 years ago now - today's Linux LVM2 is an
entirely new project but retaining much of the CLI design inspiration
that was found in the original LVM1. The LVM2 project started in 2001.

> so once I have created this pv header informations, what more do I need in order for the lvconvert -s to accept my cow device?
> do I have to also create the minor,major device for the logical volume, or will some other os command do that for me?

I think you need to familiarise yourself with the internals of today's
LVM2 and device-mapper stack (and the wider Linux storage stack, for
example the udev service which manages device nodes in /dev).

There are no simple recipe book style answers to the questions you are
asking - to do things like this that are outside of the current design
limits of the software you really need to have that understanding and
ability to inspect and configure the various parts of the system. Even
then you may find that there is a lot of work required to get the result
you want.

You could start off by taking a system installed to LVM2 and then use
commands like "dmsetup table" and "dmsetup status" (and comparing those
to the LVM2 metadata backups in /etc/lvm) to see how the system puts
everything together for you. Then you can start to think about making
changes to it.

Regards,
Bryn.
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-05 11:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 23:40 [linux-lvm] pvcreate to memory Tomas Dalebjörk
2020-09-05  8:21 ` Bryn M. Reeves
2020-09-05 11:04   ` Tomas Dalebjörk
2020-09-05 11:38     ` Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).