LVM and VxVM

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

 
SOLVED
Go to solution
DnD_1
Regular Advisor

problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

Hi

I have new LUN, 0/4/2/0.1.34.0.0.0.6 4 Unused -- 102400 NETAPP LU

and tried to create a new logical volume from it, but received this error

pvcreate: The physical volume "/dev/dsk/c23t0d6" is already recorded in the "/etc/lvmtab" file.

Creation of the volume group VgStorage failed. No logical volumes were created or extended.

Anyone please advise what went wrong ?

10 REPLIES 10
Michael Steele_2
Honored Contributor
Solution

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

Hi

Did you pvcreate the lun first?

Use 'vgscan -p -a -v' to preview a new /etc/lvmtab. See if the lun responds.

Use 'vgreduce -f /dev/vg##' to force out the PV
Support Fatherhood - Stop Family Law
DnD_1
Regular Advisor

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

hi...

the output

HSBC1:/#vgscan -p -a -v
vgscan: The physical volume "/dev/dsk/c2t1d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c3t0d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c23t0d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c23t0d1" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c23t0d2" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c23t0d3" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c23t0d4" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c23t0d5" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c23t0d6" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c24t0d6" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c26t0d6" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c27t0d6" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c0t0d0":
Invalid argument


/dev/vg00
/dev/dsk/c2t1d0
/dev/dsk/c3t0d0



/dev/vgbanking
/dev/dsk/c23t0d0
/dev/dsk/c23t0d1
/dev/dsk/c23t0d2
/dev/dsk/c23t0d3
/dev/dsk/c23t0d4
/dev/dsk/c23t0d5
/dev/dsk/c24t0d0
/dev/dsk/c24t0d1
/dev/dsk/c24t0d2
/dev/dsk/c24t0d3
/dev/dsk/c24t0d4
/dev/dsk/c24t0d5
/dev/dsk/c26t0d0
/dev/dsk/c26t0d1
/dev/dsk/c26t0d2
/dev/dsk/c26t0d3
/dev/dsk/c26t0d4
/dev/dsk/c26t0d5
/dev/dsk/c27t0d0
/dev/dsk/c27t0d1
/dev/dsk/c27t0d2
/dev/dsk/c27t0d3
/dev/dsk/c27t0d4
/dev/dsk/c27t0d5


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/c23t0d6
/dev/dsk/c24t0d6
/dev/dsk/c26t0d6
/dev/dsk/c27t0d6

The Volume Group /dev/vgbank01 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank03 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank was not matched with any Physical Volumes.
The Volume Group /dev/vgbank05 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank06 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank08 was not matched with any Physical Volumes.
DnD_1
Regular Advisor

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

i run the following cmd,

mknod /dev/VgStorage/group c 64 0x03000
vgimport -v -p /dev/VgStorage /dev/dsk/c23t0d6

and got this error too,

The physical volume "/dev/dsk/c23t0d6" is already recorded in the "/etc/lvmtab" file.
R.K. #
Honored Contributor

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

Hi DnD,

# pvdisplay -v
Do you have mapfile in /etc/lvmconf/ ?
# vgimport -p -s -v -m /etc/lvmconf/vgxxx.map vgxxx /dev/dsk/cxtydz
Don't fix what ain't broke
Michael Steele_2
Honored Contributor

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

Hi

You can ignore these messages

####################
vgscan: The physical volume "/dev/dsk/c27t0d6" is already recorded in the "/etc/lvmtab" file.
####################

These appear to me as problems

####################
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/c23t0d6
/dev/dsk/c24t0d6
/dev/dsk/c26t0d6
/dev/dsk/c27t0d6

The Volume Group /dev/vgbank01 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank03 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank was not matched with any Physical Volumes.
The Volume Group /dev/vgbank05 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank06 was not matched with any Physical Volumes.
The Volume Group /dev/vgbank08 was not matched with any Physical Volumes.
####################################

a) you've got 4 disks already recorded.
b) you've got 6 volume groups already created without phsical volumes.

Sigh. Look, first of all you need a class, because this is a mess.

#####################################

1) pvdisplay -v /dev/dsk/23t0d6 | more

Note: Run this for all four disks and attach.

/dev/dsk/c23t0d6
/dev/dsk/c24t0d6
/dev/dsk/c26t0d6
/dev/dsk/c27t0d6

2) vgdisplay -v /dev/vgbank08 on all vol. groups and attach.

3) ll /etc/lvmconf and attach.

4) vgcfgrestore /dev/vgbank08 -l for every volume group listed in 3) and attached.

NOTE: Attach as TEXT file.
Support Fatherhood - Stop Family Law
shanmuhanandam
HPE Pro

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

Hi,
1.check with pvdisplay command, if the PV is related to any vg's.
2.If not, then move the /etc/lvmtab file and do the vgscan.
3.then u will be able to do the pvcreate.

regards,
Shanmugam.
I am an HPE Employee

Accept or Kudo

DnD_1
Regular Advisor

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

hi again,

The Volume Group
/dev/vgbank01
/dev/vgbank03
/dev/vgbank05
/dev/vgbank06
/dev/vgbank08
/dev/vgbank

already not in used.

so i already removed.

HSBC:/#pvdisplay -v /dev/dsk/c23t0d6
pvdisplay: "/dev/Vgcdr/group": not a character device.
pvdisplay: Cannot display physical volume "/dev/dsk/c23t0d6".
HSBC:/#pvdisplay -v /dev/dsk/c24t0d6
pvdisplay: "/dev/Vgcdr/group": not a character device.
pvdisplay: Cannot display physical volume "/dev/dsk/c24t0d6".
HSBC:/#pvdisplay -v /dev/dsk/c26t0d6
pvdisplay: "/dev/Vgcdr/group": not a character device.
pvdisplay: Cannot display physical volume "/dev/dsk/c26t0d6".
HSBC:/#pvdisplay -v /dev/dsk/c27t0d6
pvdisplay: "/dev/Vgcdr/group": not a character device.
pvdisplay: Cannot display physical volume "/dev/dsk/c27t0d6"¨

HSBC:/etc/lvmconf#ll
total 5568
---------- 1 root root 0 Jul 13 2005 lvm_lock
-r-------- 1 root sys 330752 Dec 11 09:46 vg00.conf
-rw------- 1 root sys 330752 Oct 30 11:25 vg00.conf.old
-rw-r--r-- 1 root sys 104 Oct 30 11:25 vg00.mapfile
-rw------- 1 root sys 1080320 Oct 30 11:34 vgnetapp.conf
-rw------- 1 root sys 1080320 Oct 29 10:02 vgnetapp.conf.old
-rw-r--r-- 1 root sys 29 Oct 30 11:34 vgnetapp.mapfile

any comments ?
R.K. #
Honored Contributor

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

Hi Again,

>>>HSBC:/#pvdisplay -v /dev/dsk/c23t0d6
>>>pvdisplay: "/dev/Vgcdr/group": not a character device.

This is because /dev/Vgcdr do not exist

You can try this:
# mkdir /dev/Vgcdr
# ll /dev/*/group # to check available minor number
# mknod /dev/Vgcdr/group c 64 0x?0000 #any unique minor number in place of ?
# vgchange -a y Vgcdr # try activate vg
If everything goes fine, you will be able to access the data.
Now if you do NOT need this vg (Vgcdr), export it
# vgexport -v -s -m /etc/lvmconf/Vgcdr.map Vgcdr

This will free the disk /dev/dsk/c23t0d6
Don't fix what ain't broke
DnD_1
Regular Advisor

Re: problem with pvcreate......physical volume is already recorded in the "/etc/lvmta

hi...

i can't, i keep received this error.

pvcreate: The physical volume "/dev/dsk/c23t0d6" is already recorded in the "/etc/lvmtab" file.