Operating System - HP-UX
1753979 Members
4813 Online
108811 Solutions
New Discussion юеВ

what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

Hi

I want you to explain the purpose of vgcfgbackp, vgcfgrestore, vgexport and vgimport.

I need following details for each command.

1) purpose:
2) scenario (where we are using):
3) configuration files details:
4) execution (how to execute):
5) what are the changes made when execution:

So pls explain me in details.

I want all important details that we have to must know when we are executing these commands.

23 REPLIES 23
Richard Hepworth
Esteemed Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

Pleaes check the LVM documentation:

http://docs.hp.com/en/5992-4589/5992-4589.pdf
Wim Rombauts
Honored Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

vgcfgbackup : creates a backup of the LVM configuration extent within the volume group.
vgcfgrestore : Use this to restore the LVM configuraztion on a physical disk, for instance, after it has been replaced. When the LV on a replaced disk is not mirrored, a vgcfgrestore is rather useless, but when your LV is mirrored, you can resync your mirror to the new disk after a vgcfgrestore.

vgexport : Gathers the physical disks and LV-number/name mapping to configuration files and removes the VG configuration from the LVM, but leaves all information on disk intact.
vgimport : Reads the above configuration files to add a VG to the LVM setup, but the data on the disks itself should already be there.

vgcfgrestore/vgcfgbackup : Backups the LVM configuration on disk for pure restore/recovery reasons.
vgexport/vgimport : Backups LVM layout to allow you to move the disks to another system and import the configuration there.
щ╗ЮчЗГ
Valued Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

Hi senthil,

1)vgcfgbackup is used to backup the VG configuration. This is automatically done when you execute any other LVM commands like
lvcreate, vgextend etc..

Syntax:- #vgcfgbackup

2)vcfgrestore is used to restore the VG configuration on to a PV. This is normally done, when we replace the failed disks.

Syntax:- #vgcfgrestore -n

3)'vgexport' is used to export the volume group configuration by specifying a map file, and this exported configuration can be imported in another machine by using the same map file and 'vgimport' command.

Syntax:-
machine1#vgexport -v -s -m /tmp/mapfile

copy the mapfile to other machine, make sure the vg device file exists on the second machine

machine2#vgimport -v -s -m /tmp/mapfile

machine2#vgcfgbackup

Always keep a copy of the config files like /etc/lvmtab, fstab, lvmrc etc ...

Hope this helps!

regards!
Man's mind, once stretched by a new idea, never regains its original dimensions
Ganesan R
Honored Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

Hi Senthilkumar,

The best source I would recommand is man page. It has enough details to clarify you.

#man vgcfgbackup/vgcfgrestore/vgexport/vgimport

vgcfgbackup:
------------
whenever you do any lvm activities like lvcreate, remove, disk add... should be updtated in the respective volume group conf file under /etc/lvmconf. If disk fails we can restore the LVM configuration onto the disk using this backup configuration file.
By default, LVM will run vgcfgbackup command in the background whenever you do lvm activities unless you specified with -A n option.

vgcfgrestore:
-------------
As I explained above, if any disk fails we need to restore the LVM configuration onto the new disk with vgcfgrestore with backup configuration file.

vgexport:
=========
Removing the VG entirely from the server. It will remove the vg directory, device files, lvmtab entry. But it will not remove any lvm configurations or data residing on the disk.

vgimport:
=========
You can import the VG which is exported by vgexport on same server or any other server using vgimport command.
Best wishes,

Ganesh.
Shils
Occasional Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

Andrew Rutter
Honored Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

hi,

sounds like you need to be booking yourself on one of HP's LVM training courses and sys admin courses.

you have already been given some ideas, but really you probably be should not be using the commands if you cannot even find some basic info from the man pages

buy a good hpux book and read the docs on docs.hp.com

Andy
James R. Ferguson
Acclaimed Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

Hi:

If you take the root of each word --- backup, restore, export and import --- you can begin to understand the action of each.

If you read the document that Richard cited; the manpages as mentioned; and take a course as Andrew suggested you will benefit greatly.

You need to devote more time to reading the wealth of documents on the HP web.

Regards!

...JRF...
Taifur
Respected Contributor
Solution

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"

Hi Senthil Kumar

You can check below link which is as follows for detailis regarding vgcfgbackup,vgcfgrestore, vgexport and vgimport

http://docs.hp.com/en/B2355-60127/vgcfgbackup.1M.html

http://docs.hp.com/en/B2355-60127/vgcfgrestore.1M.html

http://docs.hp.com/en/B2355-60127/vgexport.1M.html

http://docs.hp.com/en/B2355-60127/vgimport.1M.html

Rgds//
Taifur
Sajjad Sahir
Honored Contributor

Re: what is the difference between "vgcfgbackup & vgcfgrestore" and "vgexport & vgimport"


Dear Senthil kumar

vgcfgbackup for any changes happening in lvm
i mean any changes u are doing in lvm
by default system is doing itself, but u can specify destination path.

vgexport for exporting volume group
for example if u want to rename a volume group or u want to export a volume group in another node etc...
vgimport is importing a volume a group map files

Sajjad Sahir