Operating System - HP-UX
1752577 Members
4225 Online
108788 Solutions
New Discussion юеВ

LVM - DeConfigure LVM Disks W/O VgImporting First

 
SOLVED
Go to solution
Alzhy
Honored Contributor

LVM - DeConfigure LVM Disks W/O VgImporting First

VxVM is unable to initialize a couple disks because it detects it used to be (or still is) under LVM control.. This is a new install of HPUX that I am doing and would like to configure those disks into Veritas VM... Vgimporting, lvremoving, pvremoving and finally vgremoving does the trick..

Is there a quick way to wipe out LVM configs on disks without going through the gyrations of VGimporting them first....
Hakuna Matata.
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

Hi Nelson:

# pvremove pv_path

...is the command you are seeking.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

Because the LVM data structures are on the few few sectors of the disks, nothing more complicated than a dd should be needed.

e.g.
dd if=/dev/zero of=/dev/rdsk/c1t6d0 bs=1024k count=16

That ought to do it. Of course, substitute the appropriate raw disk device node for you disk(s).
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

Because the LVM data structures are on the few few sectors of the disks, nothing more complicated than a dd should be needed.

e.g.
dd if=/dev/zero of=/dev/rdsk/c1t6d0 bs=1024k count=16

That ought to do it. Of course, substitute the appropriate raw disk device node for your disk(s).
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

Hi (again) Nelson:

Please note that the command I cited is 'pvremove' as in "remove". It is not a typographical error for 'pvcreate'!!! see the man pages for 'pvremove'.

Regards!

...JRF...
Alzhy
Honored Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

Thanks A. Clay,

That was what I was thinking as well and wanted to be sure first and how far should I go "NULLing" the header/private region area of the disk... I was hoping there would be a "-f" (force) argument to pvremove...
Hakuna Matata.
James R. Ferguson
Acclaimed Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

Hi Nelson:

I suggest you read my posts, too. Including:

http://docs.hp.com/hpux/onlinedocs/B2355-90692/B2355-90692.html

...JRF...
Alzhy
Honored Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

James,

Thanks.. I was aware already of pvremove as well as the families of commands relating to LVM (vg???, lv??? and pv???) -- it's just that this is a fresh install of HPUX11i and the disks I'd like to use in VxVM formerly belonged to a LVM VG.. pvremove does not allow me to remove its LVM properties without importing it first and going thought the procedures for wiping out the entire VG... A. Clay's approach would seem to work for all intents and purposes..
Hakuna Matata.
Sunil Sharma_1
Honored Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

hi,

did you tried to initialise disks using vxdisksetup -i option.
or vxdisk init
It should work.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Alzhy
Honored Contributor

Re: LVM - DeConfigure LVM Disks W/O VgImporting First

Sunil,

No amount of vxdisksetp or vxdisk inits will initialize a disk that was previously used by LVM. VxVM strictly avoids conflicts with whatever other VM's there may be in a system..

Hakuna Matata.