Operating System - HP-UX
1835564 Members
2658 Online
110078 Solutions
New Discussion

Re: pvdisplay shows LVM_disk=yes

 
Scott Newell
Advisor

pvdisplay shows LVM_disk=yes

I need to use a disk that to extend a vg that may or may not be used. The disk is actually on an EMC clarion that I believe was only used to test snapshots. I have done a vgexport on the volume group that was used for the snapshot tests. The disk is seen on the system as /dev/dsk/c6t0d6. It is no longer seen in /etc/lvmtab but if I do pvcreate without -f it says the device already belongs to a vg. If I do pvdisplay -l it says the LVM_disk=yes. How can I be SURE that this disk is not used before I use the -f option on pvcreate? This is my production system and I can't afford to lose data.

db2i:/ > strings /etc/lvmtab | grep c6t0d6
db2i:/ > pvdisplay -v /dev/dsk/c6t0d6
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c6t0d6" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c6t0d6".
db2i:/ > pvdisplay -l /dev/dsk/c6t0d6
/dev/dsk/c6t0d6:LVM_Disk=yes
db2i:/ > pvcreate /dev/rdsk/c6t0d6
pvcreate: The physical volume already belongs to a volume group

Thanks in advance for the help.

5 REPLIES 5
Denver Osborn
Honored Contributor

Re: pvdisplay shows LVM_disk=yes

You could look at other disks attached to the system for matching VGIDs. Just to be certain that c6t0d6 isn't an alternate path for one of your volumes.

for disk in /dev/dsk/c*
do
echo $disk `echo 0x2010?2x | adb $disk`
done


Although I wouldn't trust this as the VGID could match other disks since you mention it was previously used for snapshot testing.

You could also identify it by the Clariion's LUN ID from powermt display.

-denver
Tim Nelson
Honored Contributor

Re: pvdisplay shows LVM_disk=yes

IF you are unsure about needing to keep the data then import the disk, mount it, back it up, then blow it away.

All the steps above show that the disk is not currently being used. Especially after you vgexported it. If it were in use and mounted you would not have been able to vgchange and vgexported it.
Keshava_1
New Member

Re: pvdisplay shows LVM_disk=yes

One of the problems could be the disk is a shared disk between two systems.

you would have exported this from this system, but it is imported from some other system. Hence it does not have a /etc/lvmtab entry on this system, but the metadata is present on the disk

Try this.
1.
Verify whether the node is part of a cluster
#cmviewcl
If it is part of cluster then run
#cmquerycl
This would give you some lvm info. If this is not sufficient to debug

run scsimgr command on both the nodes with appropriate device files. This would give u wwid of the disks which is unique.( on 11iv3 only)
#scsimgr get_attr -a wwid -H
If the same wwid is obtained on both the machines, then it is the shared disk.

2. If it is not part of cluster, Then u can take a backup of the disk and go for a freas pvcreate -f

-Keshava
http://keshavabharadwaj.googlepages.com
Scott Newell
Advisor

Re: pvdisplay shows LVM_disk=yes

Ok, I tried several of the suggestions and the one I would like to focus on is Tim's for a minute. I have reimported the vg and mounted the data. I am pretty certain that I can blow this away and appreciate the help.

I would like to confirm one statement just in case I run into any related issue in the future. I didn't mention that this server IS part of a cluster but I did mention the disk is on EMC. Wouldn't I have been able to export the vg on this server even if it was being used actively on another server since they are all connected to the EMC?

Scott
Tim Nelson
Honored Contributor

Re: pvdisplay shows LVM_disk=yes

I am not well versed in SG configurations.

If this volume was shared between SG cluster members then there is probably more work to do.

Remove from the SG config is the 1st item I can think of.

I do not believe there would be anything stopping you from vgexporting on one SG member and not the other. Another good way to check is to review the masking config on the EMC. If the EMC only allows access to server1 then it cannot be used anywhere else.
Another good check when trying to determine where volumes are used.

If this is a symmetrix then a symmaskdb list database will give you the contents of the masking database.