Operating System - HP-UX
1827807 Members
2600 Online
109969 Solutions
New Discussion

Re: cannot restore vg config on a single root

 
Joel P
New Member

cannot restore vg config on a single root

Hi
I have run pvcreate on /dev/rdsk/c1t2d0 by mistake which was a root disk. And now i need to restore the configuration on this disk.Kindly Help.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: cannot restore vg config on a single root

Hi Joel:

A bootdisk? On a running server? Did you force the pvcreate() with '-f'? Is your boot (root) disk mirrored?

Regards!

...JRF...
shanmuhanandam
HPE Pro

Re: cannot restore vg config on a single root

Hi,
unless you are not using the pvcreate with (-f) option, it will say "The physical volume already belongs to a volume group". it won't create the disk. so please confirm.

Thanks,
Shan.
I am an HPE Employee

Accept or Kudo

Deeos
Regular Advisor

Re: cannot restore vg config on a single root

hi Joel,

I agreed with shan comment!


Please confirm us what command you executed?
Deepak
Bill Hassell
Honored Contributor

Re: cannot restore vg config on a single root

> pvcreate on /dev/rdsk/c1t2d0 by mistake which was a root disk

Assuming that "root disk" means that it is part of vg00, you can put the header information back on the disk like this:

vgcfgrestore -n vg00 /dev/rdsk/c1t2d0

NOTE: pvcreate -f is a very dangerous command and should be used when you are sure that the disk is truly unused. When you remove a disk from a volume group, it is best practice to also use pvremove to erase the old LVM information. That way, you can always use pvcreate without -f.

I have attached a very useful script to show LVM information on one or more disks and report if it is:

- unassigned, with random data in the header
- initialized (pvcreate) but not assigned
- assigned to a VG but not the current host (perhaps from another computer)
- assigned to a VG and it belongs to the current system

To use showLVMinfo:

# showLVMinfo c1t2d0


Bill Hassell, sysadmin