[linux-lvm] Can not use vgimportclone multiple times for the attached disk

Stuart D. Gathman stuart at bmsi.com
Thu Apr 1 13:38:24 UTC 2010

On Thu, 1 Apr 2010, Sarkar, Kaushik wrote:

> After verifying I un-mounted logical volume and remove the volume group.
> Vgremove -f NEWVG 
> But the new disk /dev/sdc2 still attached
> I tried to do vgimportclone again it fails
> # vgimportclone -n NEWVG /dev/sdc2
> Fatal: /dev/sdc2 is not a PV., error: 5

This should be expected since you just removed the volume group.

> I tried to remove the physical volume labeling then tried from the fresh
> but still no luck.
> #Pvremove -f /dev/sdc2
> # rescan-scsi-bus.sh
> # vgimportclone -n NEWVG /dev/sdc2
> Fatal: /dev/sdc2 is not a PV., error: 5

The PV was already removed - hence the "not a PV" error.

> What went wrong? What is the correct step to achieve it.

Nothing went wrong.  What are you trying to do?  

If you want to create a new VG from scratch, then start with
pvcreate /dev/sdc2, then do vgcreate -n NEWVG /dev/sdc2.

If you wanted your old VG back, you've got problems - since you just
deleted it.  If you have a metadata backup, you can install it with

	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

More information about the linux-lvm mailing list