Skip to contentSkip to conversation

vgscan vs vgcfgrestore

linux-lvm Rob Schwartz 2 participants 2 messages Aug 18, 2004 – Aug 23, 2004

lore
Share & tools
lore
#0 lore raw

Hello Heinz,

Forgive me for writing in English. As I come from the United States I am embarassingly uni-lingual. I have been working with LVM for several months now and finally have had the opportunity to get into the guts of the lvm configuration. I am preparing myself for the situation where my LVM environment gets corrupted in some manner. Actually, last week I encountered a problem with LVM and was unable to quickly recover so I ended up simply rebuilding the LVM PV's, VG's and LV's and restoring data. Fortunately, it was an easy restore. I have been comparing the vgscan utility with vgcfgrestore. In a test environment I have deleted the /etc/lvm* stuff and even deleted the /dev/lvm* stuff and successfully recovered the VG and LV by simply doing a vgscan. Whew... nice... I understand vgcfgbackup and vgcfgrestore but am not sure when I would need to use the configuration backup. The VGDA as I understand it is stored on the PV's. If I have the PV's intact I therefore have the VGDA and hence am able to recover using vgscan. When would I need to use vgcfgrestore? I have found much information on LVM on the web but nothing that really pinpoints my question. If there is something out there that I can refer to, please tell me.

Regards,
Rob

#1 lore raw
Quoted 3 lines · Rob Schwartz

Hello Heinz,

Forgive me for writing in English. As I come from the United States I am embarassingly uni-lingual. I have been working with LVM for several months now and finally have had the opportunity to get into the guts of the lvm configuration. I am preparing myself for the situation where my LVM environment gets corrupted in some manner. Actually, last week I encountered a problem with LVM and was unable to quickly recover so I ended up simply rebuilding the LVM PV's, VG's and LV's and restoring data. Fortunately, it was an easy restore. I have been comparing the vgscan utility with vgcfgrestore. In a test environment I have deleted the /etc/lvm* stuff and even deleted the /dev/lvm* stuff and successfully recovered the VG and LV by simply doing a vgscan.

Yes, vgscan's task is to discover any PVs, retrieve the LVM metadata, store it in /etc/lvmtab* and created devnodes for access to the VGs/LVs.

Quoted 1 line

Whew... nice... I understand vgcfgbackup and vgcfgrestore but am not sure when I would need to use the configuration backup. The VGDA as I understand it is stored on the PV's. If I have the PV's intact I therefore have the VGDA and hence am able to recover using vgscan. When would I need to use vgcfgrestore?

You indirectly answered your onw question ;)

You need vgcfgrestor, when the metadata on the PVs is *not* intact (eg, accidential overwrite or starnge crash). and vgscan fails to discover your VG(s).

Quoted 1 line

I have found much information on LVM on the web but nothing that really pinpoints my question. If there is something out there that I can refer to, please tell me.

Have you referenced the LVM-HOWTO yet (URL below) ?

Quoted 8 lines

Regards,
Rob
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

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

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

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                            +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-