1834628 Members
3323 Online
110069 Solutions
New Discussion

lvm

 
Florin Gentu
New Member

lvm

after running vgscan -p -v
getting this:
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/c1t5d0
/dev/dsk/c1t6d0
How do I find to which VG they bellong to?
men sana in corpore sano
9 REPLIES 9
Satish Y
Trusted Contributor

Re: lvm

pvdisplay /dev/dsk/c1t5d0
pvdisplay /dev/dsk/c1t6d0

Cheers...
Satish.
Difference between good and the best is only a little effort
Florin Gentu
New Member

Re: lvm

pvdisplay /dev/dsk/c1t5d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c1t5d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c1t5d0".
Thanks Satish
men sana in corpore sano
Ravi_8
Honored Contributor

Re: lvm


Hi,
just try
#vgimport -v /dev/dsk/c1t5d0 /dev/dsk/c1t6d0
never give up
Florin Gentu
New Member

Re: lvm

Thanks,
vgimport -v /dev/dsk/c1t5d0 /dev/dsk/c1t6d0
Beginning the import process on Volume Group "/dev/dsk/c1t5d0".
vgimport: Cannot open the control file "/dev/dsk/c1t5d0/group":
Not a directory
men sana in corpore sano
Satish Y
Trusted Contributor

Re: lvm

Here is the procedure...

I think somebody created physical volumes(pvcreate) on these disks and let them without adding to any VG u, can findout by:

# pvcreate /dev/dsk/c1t5d0
# pvcreate /dev/dsk/c1t6d0

If it says physical volume already exist, then my guess is correct... In this case u can create a temporaray VG and a single LV using whole space, run newfs, mount filesystem and check data...

Otherwise,
1) # vgdisplay -v | more

and find out which VG is giving error that unable to quesry PV.

2) # vgexport -m -p -v /tmp/vgname.map /dev/vgname

3) check the map file whether all LVs present or not.... and notedown the present disks belongs to VG and minor number.

4) umount all filesystems mounted and make a list of them

5) # vgexport -m /tmp/vgname.map -v /dev/vgname

6) # mkdir -p /dev/vgname
# mknod /dev/vgname/group c 64 0x010000
7) # vgimport -v -m /tmp/vgname.map /dev/vgname /dev/dsk/c1t5d0 /dev/dsk/c1t6d0 /dev/dsk/cxtydz ..... #rest all PVs

8) Mount all the filesystems.

Hope this helps.........

Cheers...
Satish.
Difference between good and the best is only a little effort
Kenny Chau
Trusted Contributor

Re: lvm

Hi,

Try to type "strings /etc/lvmtab" to check if the PV is there. If not, used vgimport to import the PV to a new VG by:

# mkdir /dev/vgXX
# mknod /dev/vgXX/group c 64 0xXX0000
# vgimport -v /dev/vgXX /dev/dsk/cXtXdX /dev/dsk/cXtXdX

Hope this helps.
Kenny.
Kenny
Krishna Prasad
Trusted Contributor

Re: lvm

What is going on is that the drives where previously used in a volume group and still has the lvm header on the drive. The next question is was it done on the machine you are working on or a different machine? If the drive in question is storeed in a external-raid unit be very careful. It is possible it is in use from another system.

I attached a lvm11 executable I got from HP that will read the lvm header and tell you what host it is created from.

If it was created from another system verify that that system no longer needs the drive.

If you know it is save to use drive
simply do a vgimport after creating the directory and device file for group.
Positive Results requires Positive Thinking
Krishna Prasad
Trusted Contributor

Re: lvm

What is going on is that the drives where previously used in a volume group and still has the lvm header on the drive. The next question is was it done on the machine you are working on or a different machine? If the drive in question is storeed in a external-raid unit be very careful. It is possible it is in use from another system.

I attached a lvm11 executable I got from HP that will read the lvm header and tell you what host it is created from.

If it was created from another system verify that that system no longer needs the drive.

If you know it is save to use drive
simply do a vgimport after creating the directory and device file for group.
Positive Results requires Positive Thinking
Florin Gentu
New Member

Re: lvm

Ron I can not detach your file. Can you please let me know where did you get it?
men sana in corpore sano