1834458 Members
2898 Online
110067 Solutions
New Discussion

Cannot pvcreate a disk

 
SOLVED
Go to solution
krizevac
Advisor

Cannot pvcreate a disk

I cannot pvcreate a disk. The system returns the message that is already recorded in lvmtab.
The disk is no more used (I'm sure).
Any suggestion ?
-*-
6 REPLIES 6
Bill McNAMARA_1
Honored Contributor

Re: Cannot pvcreate a disk

pvcreate -f /dev/rdsk/cXtYdZ

but you should be really sure!

You will also want to remoce it from your /etc/lvmtab if it is there..

vgreduce it out of the vg it appears in first.

strings /etc/lvmtab to see which vg it's in.
then vgdisplay -v vgname | grep cXtYdZ
to see if there are extents in use.

You can use pvmove -n src
to move data (lv structures) from the disk to free space on another pv in that vg.. should the pv be in use that is.

Later,
Bill
It works for me (tm)
krizevac
Advisor

Re: Cannot pvcreate a disk

The vg01 containig the disk was already vgremoved.
But the vg01 is still present in lvmtab.
I can I remove the entry from the lvmtab
-*-
nancy rippey
Trusted Contributor

Re: Cannot pvcreate a disk

Move /etc/lvmtab to /etc/sv.lvmtab, or whatever you want to rename it. Then run 'vgscan -a' this will rescan the controllers. You may wish to read the man page for vgscan. I have never encountered any problems running the vgscan.

Hope this helps
nrip
James R. Ferguson
Acclaimed Contributor

Re: Cannot pvcreate a disk

Hi:

It would appear that something wasn't done correctly. Try a 'vgexport' of the volume group to cleanup the /etc/lvmtab. After the export, verify that the volume group has been removed from /etc/lvmtab:

# strings /etc/lvmtab

If the /etc/lvmtab is now clean, do:

# pvcreate -f /dev/rdsk/cXtYdZ

Regards!

...JRF...
krizevac
Advisor

Re: Cannot pvcreate a disk

Please Nancy repost your question so I'll assign you 10 points.
Your suggestion solved my problem!!!
Thank you!

-*-
nancy rippey
Trusted Contributor
Solution

Re: Cannot pvcreate a disk

I don't really understand what you want me to repost. I can repost what I wrote earlier

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

You may wish to read the man page on vgscan prior to running the comnmand. I have never had any problems.
nrip