1748195 Members
2700 Online
108759 Solutions
New Discussion юеВ

Re: vgcfgrestore

 
SOLVED
Go to solution
Anjaneyulu
Frequent Advisor

vgcfgrestore

Hi

I want to know we take backup in the tape. why we use vgcfgrestore after creating pv's. and also i want to know why we use vgchange -a -y, pvchange -a -y commands for the new disk.
10 REPLIES 10
Anjaneyulu
Frequent Advisor

Re: vgcfgrestore

We restore the data from tape. why we use vgrestore before create lv's. whatt is the use?
Robert-Jan Goossens
Honored Contributor
Solution

Re: vgcfgrestore

Hi,

You will need to restore the LVM information to the disks (vgcfgrestore) , activate the physical volume (pvchange ) and the activate the volume group (vgchange)

Have a look at attached document. I can't find the document in the docs.hp.com at this moment.

Regards,
Robert-Jan
sujit kumar singh
Honored Contributor

Re: vgcfgrestore

Hi,

1) vgcfgrestore is for restoring the LVM Metadata on a disk which had no metadata or has got that corrupted.

we use this command when we are repacing a broken disk. This readds the VG Config file from the /etc/lvmvonf/vgxx.conf and restores the LVM Metadata structure for that VG on that disk.

we do not need to do a pvcreate for a PV during replacement of that when it is a part of VG because vgcfgrestore itself creates the LVM structures on the disk and restores the LVM information on that.

2)vgchange -a y and vgchange -a n are for activating and deactivating the VG. Once a VG is activated then only we can use the LVs inside that for mounting and using. We need to deactivate a VG whwn we do not want that the LVs in them are used in the system. Typically we need to deactivate a VG for the tasks that we can not perform whwn the VG is activated. For Example exporting a VG in actual mode (not in preview mode) we need the VG to be deactivated because vgexport removes the VG from the system. Also the same way when we import a VG we have to activate this before we can use this VG on the system. There are various mode of activating a VG like read-only, read-write , Exclusive, shared etc, efer to man page vgchange.
3)pvchange is used to set the parameters like time out setting for a PV. When a PV is non-responsive for a time greater than the PV timeout that PV is assumed to be offline by the LVM.
also pvchange is used in OLAR scenarios to activate or deactivate a PV without deactivating the VG itself and we can do maintenance like Replacement on that PV. etc etc.



Regards
Sujit
Anjaneyulu
Frequent Advisor

Re: vgcfgrestore

How to create the mirrored disks? We have to build the new server. after installing OS. we create the disks with mirrored disk. what is the command. after put the disk into the server which steps we use?
sujit kumar singh
Honored Contributor

Re: vgcfgrestore

Hi


This depends slightly on the platform that u use like PARISC or INTEGRITY .


Please find the following link and refere to the appendix :;: mirroring a root disk.


This is a very great and helpful documment.

http://www.docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf


regards


Sujit

sujit kumar singh
Honored Contributor

Re: vgcfgrestore

of the above said doc please follow the pages 24 to 28 ,
Depending on u have a PARISC or Integrity System.


regards

sujit
Anjaneyulu
Frequent Advisor

Re: vgcfgrestore

PARISC systems
Ganesan R
Honored Contributor

Re: vgcfgrestore

Hi Anjaneyulu,


Mirroring Procedure of root disk - PARISC

# ioscan -fnC disk

Mirror the root disk:

Step 1. Create the new physical volume using the 'pvcreate' command.

For example:

# pvcreate -B /dev/rdsk/cited [ If it is not part of root VG, # pvcreate /dev/rdsk/cXtXdX ]
Step 2. Extend the volume group to include the new physical volume using the vgextend
command:

For example:
# vgextend /dev/vg00 /dev/dsk/cXtXdX

Step 3. The mkboot command must be run to make the device bootable, for example:
# mkboot /dev/rdsk/cXtXdX

Step 4. Use the mkboot command again to add the HP-UX auto-file-string.
For example:

# mkboot -a "hpux -lq" /dev/rdsk/cXtXdX

Step 5. Run lvlnboot:
# lvlnboot -R

Step 6. 'lvextend' a mirror into the replaced disk drive. This may take several minutes as it will have to copy all the data from the original copy of the data to the mirrored extents. The logical volume(s) are still accessible to users' applications during this command.

# lvextend -m 1 /dev/dsk/cXtXdX
OR

# lvextend -m 2 /dev/dsk/cXtXdX (for 3 way mirroring)
For example:
# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/cXtXdX
# lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/cXtXdX
Repeat this for each logical volume to be mirrored.

Step 7. Verify the mirror is bootable and AUTO file is correct.
# lifls -l /dev/rdsk/cXtXdX
# lifcp /dev/rdsk/cXtXdX:AUTO -
Step 8. Verify the mirroring is set up properly.

# vgdisplay -v /dev/vg00
# lvdisplay /dev/vg00/lvol1 - lvol8
# lvlnboot -v /dev/vg00
Both should appear in the 'lvol' lists.



Best wishes,

Ganesh.
Torsten.
Acclaimed Contributor

Re: vgcfgrestore

See this link for the updated document (appendix for mirroring):

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad_WP.pdf

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!