Operating System - HP-UX
1822785 Members
4373 Online
109645 Solutions
New Discussion юеВ

Difference between vgexport/vgimport and vgcfgbackup/restore

 
Franky_1
Respected Contributor

Difference between vgexport/vgimport and vgcfgbackup/restore

Hi together,

can you explain to me what's the "big" difference between vgexport/vgimport and vgcfgbackup/vgcfgrestore respectively when to use the one and when to use the other ?
Somehow it doesn't seem quite clear to me

Thx in advance

Franky
Don't worry be happy
7 REPLIES 7
bhavin asokan
Honored Contributor

Re: Difference between vgexport/vgimport and vgcfgbackup/restore

hi,


The vgcfgrestore command restores the LVM configuration data from a default (-n option) or alternate (-f option) configuration backup file to the physical volume named by pv_path.it restores the vg information on disk(like VGRA ).

vgexport/vgimport is just adding/removing the entry of VG in the lvmtab file and creates LVs in the respective VG.it is not changing any data in the disk(PV)
regds,

melvyn burnard
Honored Contributor

Re: Difference between vgexport/vgimport and vgcfgbackup/restore

vgcfgbackup/vgcfgrestore is used to back up LVM info from the physical disks to a file on the system, which can then be used to rewrite that information onto a new replacement disk upon failure of an exisitng disk. It does not change the VG information, or touch /etc/lvmtab etc.

vgexport/import will remove the definitions of a VG from a system including removuing it from /etc/lvmtab, unless used with -p option, and vgimport is used to import the vg definitions onto a system..
Refer to the man pages for more information and details.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Bharat Katkar
Honored Contributor

Re: Difference between vgexport/vgimport and vgcfgbackup/restore

HI Franky,
Just to add something more:

1. vgexport/vgimport plays around with the VG configuration stored on the server itself whereas vgcfgrestore/backup play with the configuration which is there on the disk (PV's)

2. vgexport/import is is basically used to copy the VG structure from one server to another server which is required in HA cluster whereas the vgcfgrestore/backup is used to backup the Metadata stored on the PV's and restored incase of bad disk or disk replacement.

3. vgexport is also used to delete VG's

4. vgexport/import is used for replicating configuration whereas vgcfgrestore/backup is done for recovering from failures.

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Muthukumar_5
Honored Contributor

Re: Difference between vgexport/vgimport and vgcfgbackup/restore

vgimport / vgexport are used to make configuration on physical disk's volume groups there without modifying logical volume informations there. vgimport is combining the actions of creating new volume group with vgcreate to update the volume groups. vgexport used to delete existing volume groups

vgimport / vgexport can work on shared mode on cluster systems.

vgcfgbackup /vgcfgrestore are used to take backup of VG configuartion informations into a file / restore or list the VG informations again. It will not do any action on physical disk or volume group configurion file.

vgcfgrestore cannot be performed if the volume group is activated in shared mode.

Differences are physical volume group settings configuration and updation and volume group configuration file configuration and restoration.
Easy to suggest when don't know about the problem!
Franky_1
Respected Contributor

Re: Difference between vgexport/vgimport and vgcfgbackup/restore

Hi,

if i understand correctly then in case of desaster recovery you'll need both (vgexport and vgcfgbackup) to restore a disk from scratch - vgcfgbackup for the LVM Structures on the disk itself and vgimport for the VG's on the system (lvmtab)
Is that right ?

Thx

Franky
Don't worry be happy
Geoff Wild
Honored Contributor

Re: Difference between vgexport/vgimport and vgcfgbackup/restore

Depends on disaster - if server - then vgimport will work if you have map files.

If disks, then vgcfgrestore.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Kent Ostby
Honored Contributor

Re: Difference between vgexport/vgimport and vgcfgbackup/restore

If I am dealing with a situation where there seems to be some sort of problem on a boot disk or with disk activation, I will try the vgcfgrestore first.

This quite often works.

If that still hasnt worked then I will try the vgexport/vgimport.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"