Skip to contentSkip to conversation

VGDA Question

linux-lvm Rik Herrin 3 participants 3 messages Sep 7, 2005 – Sep 14, 2005

lore
Share & tools
lore

Rik Herrin

author
#0 lore raw

Hi,
According to the LVM man page, the VGDA (Volume Group
Descriptor Area) holds the metadata responsible for keeping information about the LVs. However, it is contained in the PVs. Why does the VGDA contain both LV descriptors and PE descriptors? Shouldn't it just have PE descriptors and leave the LV descriptors to the volume group? Also, when booting, what makes the kernel know that there are VGs and LVs? Does it look at the type of the partition and if it detects that it's a PV, extract the VGDA to help it build this information? If this is so, how does it deal with entire harddisks. For example, if I run the command:
pvcreate /dev/sdd
how would the kernel know that this is a PV?. Finally, where exactly is the VGDA information held?. Thanks for your time.

______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

#1 lore raw
Quoted 7 lines · Rik Herrin

Hi,
According to the LVM man page, the VGDA (Volume Group Descriptor Area) holds the metadata responsible for keeping information about the LVs. However, it is contained in the PVs. Why does the VGDA contain both LV descriptors and PE descriptors? Shouldn't it just have PE descriptors and leave the LV descriptors to

i tried, but fail to understand your question.
The VGDA is the only place on disk where information necessary for activation of the volume group and contained logical volume can be stored permanetly.

Quoted 2 lines

the volume group? Also, when booting, what makes the kernel know that there are VGs and LVs? Does it look

The kernel doesn't. lvm is setup by user space tools.

Quoted 1 line

Finally, where exactly is the VGDA information held?. Thanks for your time.

at the beginning of the PV
regatds

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#2 lore raw
In reply to Rik Herrin
Quoted 7 lines · Rik Herrin

Hi,
According to the LVM man page, the VGDA (Volume Group Descriptor Area) holds the metadata responsible for keeping information about the LVs. However, it is contained in the PVs. Why does the VGDA contain both LV descriptors and PE descriptors?

Because there are LV's with PE's and both types of information must be stores somewhere.

Quoted 4 lines

Shouldn't it just
have PE descriptors and leave the LV descriptors to the volume group ?

The VGDA is where the volume group information is stored. The LV info is therefore exactly where it belongs.

Quoted 3 lines

Also, when booting, what makes the
kernel know that there are VGs and LVs?

The vgscan command is run during boot (from a rc file) and it detects the volumegroups and makes them available.

Quoted 5 lines

Does it look
at the type of the partition and if it detects that it's a PV, extract the VGDA to help it build this information?

Yes

Quoted 6 lines

If this is so, how does it deal with
entire harddisks. For example, if I run the command:
pvcreate /dev/sdd
how would the kernel know that this is a PV?.

If you use the enire harddisk, then there is no traditional partition table. In this case the vgscan command looks if the entire disk is a PV.

Quoted 2 lines

Finally, where exactly is the VGDA information held?.

At the beginning of the disk/partition you created with pvcreate.

Markus

Signature · 4 lines
 Markus Baertschi             Phone: ++41 (21) 807 1677
 Bas du Ross� 14b             Fax  : ++41 (21) 807 1678
 CH-1163, Etoy                Email: [email protected]
 Switzerland                  Homepage: www.markus.org