Operating System - HP-UX
1834491 Members
3288 Online
110067 Solutions
New Discussion

How to make use of LVM disk under VxVM?

 
SOLVED
Go to solution
Jun Zhang_4
Regular Advisor

How to make use of LVM disk under VxVM?

11i was installed with VxVM, root disk and group is fine.
lab001:root:/# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t2d0 simple - - LVM
c0t5d0 simple rootdisk01 rootdg online
# vxdisk -f init c0t2d0
vxvm:vxdisk: ERROR: Device c0t2d0 is already in use by LVM.
How to get over this?
There is no longer group info for c0t2d0, and I don't care the content on the disk, and just want it to be online.


Jun
Food lover
8 REPLIES 8
James A. Donovan
Honored Contributor

Re: How to make use of LVM disk under VxVM?

You need to run the pvremove command on the c0t2d0 disk to remove the LVM structures.

# pvremove /dev/rdsk/c0t2d0


You should then be able to add it to a VxVM disk group
Remember, wherever you go, there you are...
Jun Zhang_4
Regular Advisor

Re: How to make use of LVM disk under VxVM?

I tried that,
pvremove: /etc/lvmtab: No such file or directory
"/etc/lvmtab" could not be read into memory.


Jun
Food lover
James A. Donovan
Honored Contributor

Re: How to make use of LVM disk under VxVM?

OK, you'll need to rebuild your lvmtab file.

Run

# vgscan -av

followed by pvremove.
Remember, wherever you go, there you are...
Jun Zhang_4
Regular Advisor

Re: How to make use of LVM disk under VxVM?

Now see what I got,
# vgscan -av
Creating "/etc/lvmtab".
Physical Volume "/dev/dsk/c0t5d0" contains no LVM information

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c0t2d0

# pvremove /dev/rdsk/c0t2d0
pvremove: The physical volume "/dev/rdsk/c0t2d0" belongs to an exported volume g
roup.
pvremove: Couldn't remove physical volume "/dev/rdsk/c0t2d0".

The lvmtab is empty. What is the way I use the vgimport to get this disk under some vg? and will that work?



Jun
Food lover
Jun Zhang_4
Regular Advisor

Re: How to make use of LVM disk under VxVM?

Here is another indication of my dead end.

# pvdisplay /dev/dsk/c0t2d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c0t2d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c0t2d0".

Jun


Food lover
James A. Donovan
Honored Contributor
Solution

Re: How to make use of LVM disk under VxVM?

assuming the /dev/vg00 directory does not exist, try the following...

# mkdir /dev/vg00
# mknod /dev/vg00/group c 64 0x000000
# vgimport vg00 /dev/dsk/c0t2d0
# vgremove vg00
# pvremove /dev/rdsk/c0t2d0

Remember, wherever you go, there you are...
Jun Zhang_4
Regular Advisor

Re: How to make use of LVM disk under VxVM?

Thank!
Food lover
D Block 2
Respected Contributor

Re: How to make use of LVM disk under VxVM?

destructive, but works:

/etc/vx/bin/vxdestroy_lvmroot c0t2d0
target device (c0t2d0) is not a valid LVM root disk

Do you want this device destroyed anyway? [y/n]
y
Golf is a Good Walk Spoiled, Mark Twain.