Operating System - HP-UX
1753263 Members
5269 Online
108792 Solutions
New Discussion юеВ

How to manage volume groups & locgical volumes safely

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to manage volume groups & locgical volumes safely

Hi

There is some volume groups (vg00, vg01) and
some Logical volumes (lvol1, lvol2, lvol3 ...) in my HP-UX servers.

I want to manage them safely.

and I want to know the purpose of following commands

1) vgcfgbackup
2) vgcfgrestore
3) vgexport
4) vgimport

pls explain above commands in detail with full syntax of the command.

5 REPLIES 5
Torsten.
Acclaimed Contributor

Re: How to manage volume groups & locgical volumes safely

Hi,

for full syntax see

man vgcfgbackup
man vgcfgrestore
...

This will explain everything.

1) stores the VG layout
2) restores the layout to a certain disk
3) "remove" the VG configuration from the system; data will stay on the disks
4) import an existing VG to the system configuration

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Johnson Punniyalingam
Honored Contributor
Solution

Re: How to manage volume groups & locgical volumes safely

Hi Senthil Kumar,

1) vgcfgbackup

vgcfgbackup allows you to backup the metadata or Volume Group Descriptor Area (VGDA) of one to all volume groups to files in /etc/lvmconf. If you don├в t give any volume groups in the command line, all of them will be backed up. This DOESN├в T backup user/system data in logical volume(s)! To restore volume group descriptor area backups see the vgcfgrestore(8) tool. A 10 step history is backed up in /etc/lvmconf/VolumeGroupName.conf and /etc/lvmconf/VolumeGroupName.conf

2) vgcfgrestore

DESCRIPTION
vgcfgrestore restores the volume group descriptor area from backup files in /etc/lvmconf or from VGConfPath to the given initialized (see pvcreate(8) ) PhysicalVolumePath. The default backup file is /etc/lvmconf/VolumeGroupName.conf. This command DOES NOT restore data contained in logical volume(s), only the LVM configuration metadata

3) vgexport

DESCRIPTION
vgexport allows you to make the inactive VolumeGroupName(s) unknown to
the system. You can then move all the Physical Volumes in that Volume
Group to a different system for later vgimport(8). Most LVM2 tools
ignore exported Volume Groups.


4) vgimport

vgimport allows you to make a volume group known to the system which has previously been exported (see vgexport(8) ) on this or another system

>>pls explain above commands in detail with full syntax of the command<<

please refer to man pages for above mention commands.

Thanks,
Johnson

Problems are common to all, but attitude makes the difference
senthil_kumar_1
Super Advisor

Re: How to manage volume groups & locgical volumes safely

Hi Johnson

I have follwoing questions?

1) do we have to backup the volume groups whenever we are including physical volumes in to volume group and creating logical volumes with in that volume group.

2) is it possible that volume group may corrupt?

3) in what situation volume groups are get corrupted?

4) we can restore the volume group / logical volume using "vgcfgrestore" command. but not with original data?

5)is it possible that recovering the user data / system data if volume group / logical volumes are corrupted.

Richard Hepworth
Esteemed Contributor

Re: How to manage volume groups & locgical volumes safely

Hi Senthil,

1) It is good practise to backup your volume group configuration when carrying out tasks such as adding/removing disks to VG, creating/removing LV's etc

2) Yes

3) Disk failure, incorrect disk configuaration

4) vgcfgrestore only restores the VGDA only, it will not put back user data contained in the VG

5) You will need to use a backup/restore tool such as dataprotector to recover user data if you have had to recreate a VG from scratch

regards,

Richard

Johnson Punniyalingam
Honored Contributor

Re: How to manage volume groups & locgical volumes safely

have follwoing questions?

1) do we have to backup the volume groups whenever we are including physical volumes in to volume group and creating logical volumes with in that volume group.

while creating volume Group or Logicak volume backup It will be automatically taken by the "LVM" Logical volume Manager. so we no need to backup


2) is it possible that volume group may corrupt?

If the (2) Question related to above .. Answer is NO.

It depends if "volume group corrupt" you still can recover form you performing as below

moving /etc/lvmtab to lvmtab.bk

and try to generate a new one with vgscan -a -v command.


3) in what situation volume groups are get corrupted?

depends in may ways,

1. some one accidenting corruptted the /etc/lvmtab

2. pvcrate -f /dev/rdsk/cXtxdx

4) we can restore the volume group / logical volume using "vgcfgrestore" command. but not with original data?



Example:- for vgcfgrestore "One of my mirror disk problem after replacing the disk "

Recover mirror

vgcfgrestore -n vg00 /dev/rdsk/c2t6d0
vgchange -a y vg00
vgsync vg00


5)is it possible that recovering the user data / system data if volume group / logical volumes are corrupted.

possible . and depends on how you avoid your "Single point of failure"

Example:-

1. You should have RAID - level in "Storage"
2. You should have software mirroring,


would encourage you "get Logical Volume manger" documentation.

Thanks,
Johnson
Problems are common to all, but attitude makes the difference