1752780 Members
6838 Online
108789 Solutions
New Discussion юеВ

Help with LVM

 
SOLVED
Go to solution
Chris Fadrowski
Super Advisor

Help with LVM

trying to create a new disk using pvcreate -f

i am getting this error

root@host:/etc>pvcreate -f /dev/rdsk/ch5t0d2
pvcreate: The physical volume "/dev/dsk/ch5t0d2" is already recorded in the "/etc/lvmtab" file.

now, i can see it in lvmtab but this is just a remnant from a previous botched LVM. I tried vgremove, and vgexport, neither worked to remove it from lvmtab. Can anyone tell me how to remove from lvmtab so it lets me create this disk?
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Help with LVM

Normally a vgexport will suffice. You may need to do a new vgscan.

mv /etc/lvmtab /etc/lvmtab.old
vgscan -a

Note that /dev/rdsk/ch5t0d2 is a rather unusual device node name but that may be a typo.
If it ain't broke, I can fix that.
Sundar_7
Honored Contributor

Re: Help with LVM

vgexport should work.

Find out the VG it seems to "belong" in /etc/lvmtab, then run vgexport /dev/vgname. This will remove the volumgroup entry from /etc/lvmtab.

Ofcourse, the Volume group should be deactivated before you can export.

Learn What to do ,How to do and more importantly When to do ?
James R. Ferguson
Acclaimed Contributor
Solution

Re: Help with LVM

Hi Chris:

You can use 'vgscan' to recreate your '/etc/lvmtab'. Rename the old file first:

# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -a -v
# vgchange -a y
# lvlnboot -R

...and then use 'vgreduce' and 'vgextend' as necessary to promote secondary 'pvlinks' to primary ones if you need to reorder alternate LVM links for high-availablity.

Regards!

...JRF...
Chris Fadrowski
Super Advisor

Re: Help with LVM

actually the CH conotation if from the Hitachi disk SAN we use. It's part of dynamic link manager.