Skip to contentSkip to conversation

vgcfgrestore

linux-lvm Patrick Boutilier 1 participant 3 messages Apr 12, 2000 – Apr 17, 2000

lore
Share & tools
lore
#0 lore raw

Hello,

Looks like I am going to have to resort to using vgcfgrestore as I get the following error running vgscan:

vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d"
vgscan -- reading all physical volumes (this may take a while...) vgscan -- scanning for all active volume group(s) first vgscan -- found active volume group "data_vg"
vgscan -- reading data of volume group "data_vg" from physical volume(s)

vgscan -- ERROR -364: can't get data of volume group "data_vg" from physical volume(s)
vgscan -- ERROR -364 creating "/etc/lvmtab" and "/etc/lvmtab.d"

I assume with an error like that there is no way I am going to be able to activate my logical volumes on the next reboot?

Also I haven't seen anywhere where it says that the logical volumes and volume group must be offline when running vgcfgrestore other than this piece at the end of the vgcfgrestore man page:

vgcfgrestore returns an exit state of 0 for success and > 0 for error:

       1  no physical volume on command line
       2  invalid physical volume name
       3  volume grou is active
        ......

So I will ask the question. Can vgcfgrestore be run on active logical volumes and volume groups?

#1 lore raw

I will answer my own questions just in case somebody is searching through the archives for answers to similar problems.

Quoted 11 lines · Patrick Boutilier

Hello,

Looks like I am going to have to resort to using vgcfgrestore as I get the following error running vgscan:

vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d"
vgscan -- reading all physical volumes (this may take a while...) vgscan -- scanning for all active volume group(s) first vgscan -- found active volume group "data_vg"
vgscan -- reading data of volume group "data_vg" from physical volume(s)

Quoted 7 lines

vgscan -- ERROR -364: can't get data of volume group "data_vg" from physical volume(s)
vgscan -- ERROR -364 creating "/etc/lvmtab" and "/etc/lvmtab.d"

I assume with an error like that there is no way I am going to be able to activate my logical volumes on the next reboot?

I will answer my own questions just in case somebody is searching through the archives for answers to similar problems.

Quoted 7 lines

Also I haven't seen anywhere where it says that the logical volumes and volume group must be offline when running vgcfgrestore other than this piece at the end of the vgcfgrestore man page:

vgcfgrestore returns an exit state of 0 for success and > 0 for error:

Quoted 7 lines
       1  no physical volume on command line
       2  invalid physical volume name
       3  volume grou is active
        ......

So I will ask the question. Can vgcfgrestore be run on active logical volumes and volume groups?

As I thought the volume group did have to be inactive. One note though. I could not successfully run vgcfgrestore in single user mode. I kept getting an error (which I didn't write down) until I went to run level 3 without
activating my volume group. Good news is that the restore worked and vgscan now runs properly.

#2 lore raw

Patrick Boutilier wrote:

Correction to this piece. :-)

Quoted 5 lines
Quoted 4 lines

I assume with an error like that there is no way I am going to be able to activate my logical volumes on the next reboot?

On reboot the logical volumes did come up properly (I removed vgscan from the startup scripts) which suprised me.