Operating System - HP-UX
1827294 Members
2297 Online
109717 Solutions
New Discussion

Unable to add volume groups

 
Joe Robinson_1
Occasional Advisor

Unable to add volume groups

I've posted this in the storage area as well.

I've added two Seagate FW SCSI drives to an external cabinet in order to add disk onto a test box (why buy it when I already have it?); the problem is both drives were used previously and I am unable to add a vg to the system as there are still physical extents being utilized. How can I remove that "image" and start over on these disks?
4 REPLIES 4
Jordan Bean
Honored Contributor

Re: Unable to add volume groups

pvcreate -f each disk before vgcreate.
A. Clay Stephenson
Acclaimed Contributor

Re: Unable to add volume groups

Hi Joe,

Do a pvcreate -f on both drives first.

e.g. pvcreate -f /dev/rdsk/c2t6d0
pvcreate -f /dev/rdsk/c2t5do

Use the appropriate device path.

You should then be able to do a vgcreate.

Clay
If it ain't broke, I can fix that.
Joe Robinson_1
Occasional Advisor

Re: Unable to add volume groups

As soon as I saw that, I remembered using the force flag; but in doing that, I'm getting "physical volume /dev/dsk/c0t2d0 is already recorded in /etc/lvmtabl". This isn't a file to be manually edited, so... ???
A. Clay Stephenson
Acclaimed Contributor

Re: Unable to add volume groups

Hi again,

Evidently you didn't do a vgexport to properly clean up. Do a strings /etc/lvmtab and look for the volume group which has the unused/unwanted devices. e.g. vg02

Then, vgexport /dev/vg02

You can also cp /etc/lvmtab /etc/lvmtab.old and do a vgscan to recreate it.

Clay
If it ain't broke, I can fix that.