- Integrated Systems
- About Us
- Integrated Systems
- About Us
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
01-09-2009 03:48 AM
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.
Solved! Go to Solution.
01-09-2009 04:12 AMSolution
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.
01-09-2009 04:19 AM
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.
01-09-2009 04:20 AM
01-09-2009 04:26 AM
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.
01-09-2009 06:33 AM
Mirroring Procedure of root disk - PARISC
# ioscan -fnC disk
Mirror the root disk:
Step 1. Create the new physical volume using the 'pvcreate' command.
# 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
# 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.
# 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
# lvextend -m 2
# 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.
01-09-2009 06:37 AM
Hope this helps!
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!
01-09-2009 09:32 PM
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!
Restoring Mirrored disk after Replacement of failed disk
vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t1d0
vgchange -a y vg00
>>vgchange -a -y, pvchange -a -y<<<
-a "refer's to activate a Volume Group
y "refer's Yes" n "refer NO"
same works for pvchange also
"man pvchange" to learn more about pvchange