Operating System - HP-UX
1753587 Members
7218 Online
108796 Solutions
New Discussion

Re: Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

 
SOLVED
Go to solution
rianui
Trusted Contributor

Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

Hi Gurus,

 

I recently did an ignite installation on an rp7410 server. I need to configure the mirror again but when I run pvcreate I get the errors below. I installed/recovered the OS with both disks installed.

 

# pvcreate -B /dev/rdsk/c3t6d0
pvcreate: The physical volume already belongs to a volume group
# pvcreate -f -B /dev/rdsk/c3t6d0
pvcreate: The physical volume "/dev/dsk/c3t6d0" is already recorded in the "/etc/lvmtab" file.

 

 

# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0
/dev/dsk/c3t6d0

 

 

Even if I copy the lvmtab file to another location, remove it and run vgscan, I get the same results. How do I go about this?

 

Regards,

 

Rianui

 

 

 

 

6 REPLIES 6
Matti_Kurkela
Honored Contributor

Re: Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

You must remove the PV from the VG first.

 

vgreduce vg00 /dev/dsk/c3t6d0

 If this is not successful, the PV contains some LV data and you should use pvmove to migrate it to the other PV.

MK
rianui
Trusted Contributor

Re: Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

Thank  you Mati.

I will work on it tomorrow and update this.

 

Regards,

 

Rianui

rianui
Trusted Contributor

Re: Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

Hi Matti,

 

I did not manage to pvmove to migrate  c3t6d0 to c0t6d0 because there are no free PEs on c0t6d0.

This is the error: pvmove: Not enough free physical extents available.

I do not have any free PEs in the storage either plus they are not part of VG00.

If I reboot the system with the c3t6d0 disk removed and run vgscan, will this process be successful or will the disk be written again to lvmtab when I run insf?

See the lvdisplay output below. I just can't see any LV in use on c3t6d0.

 

# lvdisplay -v /dev/vg00/lvol1 | grep -e  /dev/dsk/c0t6d0 -e "???"
   /dev/dsk/c0t6d0    38        38
   00000 /dev/dsk/c0t6d0    00000 current
   00001 /dev/dsk/c0t6d0    00001 current
   00002 /dev/dsk/c0t6d0    00002 current
   00003 /dev/dsk/c0t6d0    00003 current
   00004 /dev/dsk/c0t6d0    00004 current
   00005 /dev/dsk/c0t6d0    00005 current
   00006 /dev/dsk/c0t6d0    00006 current
   00007 /dev/dsk/c0t6d0    00007 current
   00008 /dev/dsk/c0t6d0    00008 current
   00009 /dev/dsk/c0t6d0    00009 current
   00010 /dev/dsk/c0t6d0    00010 current
   00011 /dev/dsk/c0t6d0    00011 current
   00012 /dev/dsk/c0t6d0    00012 current
   00013 /dev/dsk/c0t6d0    00013 current
   00014 /dev/dsk/c0t6d0    00014 current
   00015 /dev/dsk/c0t6d0    00015 current
   00016 /dev/dsk/c0t6d0    00016 current
   00017 /dev/dsk/c0t6d0    00017 current
   00018 /dev/dsk/c0t6d0    00018 current
   00019 /dev/dsk/c0t6d0    00019 current
   00020 /dev/dsk/c0t6d0    00020 current
   00021 /dev/dsk/c0t6d0    00021 current
   00022 /dev/dsk/c0t6d0    00022 current
   00023 /dev/dsk/c0t6d0    00023 current
   00024 /dev/dsk/c0t6d0    00024 current
   00025 /dev/dsk/c0t6d0    00025 current
   00026 /dev/dsk/c0t6d0    00026 current
   00027 /dev/dsk/c0t6d0    00027 current
   00028 /dev/dsk/c0t6d0    00028 current
   00029 /dev/dsk/c0t6d0    00029 current
   00030 /dev/dsk/c0t6d0    00030 current
   00031 /dev/dsk/c0t6d0    00031 current
   00032 /dev/dsk/c0t6d0    00032 current
   00033 /dev/dsk/c0t6d0    00033 current
   00034 /dev/dsk/c0t6d0    00034 current
   00035 /dev/dsk/c0t6d0    00035 current
   00036 /dev/dsk/c0t6d0    00036 current
   00037 /dev/dsk/c0t6d0    00037 current

 

# lvdisplay -v /dev/vg00/lvol* | grep -e  /dev/dsk/c3t6d0 -e "???"
#

rianui
Trusted Contributor

Re: Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

Some more info:

# pvdisplay -v /dev/dsk/c3t6d0 | more
--- Physical volumes ---
PV Name /dev/dsk/c3t6d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 6
PE Size (Mbytes) 8
Total PE 4340
Free PE 4069
Allocated PE 271
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/asesysprocs 75 75
/dev/vg00/asesysdb 13 13
/dev/vg00/asebkpmaster_dat 75 75
/dev/vg00/asebkpsysprocs_dat 75 75
/dev/vg00/asebkpsysdb_dat 13 13
/dev/vg00/asemaster 20 20



# lvreduce -m 0 -A n /dev/vg00/asesysprocs /dev/dsk/c3t6d0
lvreduce: "MirrorCopies" parameter "0" is not smaller than existing number "0";
therefore no mirrors are removed.
Matti_Kurkela
Honored Contributor
Solution

Re: Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

Your "pvdisplay -v /dev/dsk/c3t6d0" indicates the disk is occupied by at least parts of several LVs, which look like application LVs to me:

/dev/vg00/asesysprocs
/dev/vg00/asesysdb
/dev/vg00/asebkpmaster_dat
/dev/vg00/asebkpsysprocs_dat
/dev/vg00/asebkpsysdb_dat
/dev/vg00/asemaster

 

Because your earlier "lvdisplay" command was targeted to LVs named like /dev/vg00/lvol* only, these could not appear in the output. If MirrorCopies is 0 for each of these LVs, then these are not mirrors but actual parts of your LVs that have not fit on the other disk. Removing the c3t6d0 disk would cause your vg00 to have parts missing, which would cause the system to fail at boot-up, as vg00 could not be activated without errors in that situation.

 

Do these LVs have at least (271 * 8 =) 2168 Mbytes of free space available? If not, your vg00 simply has too much data to fit on a single disk. I would recommend moving the application data to separate disks on a different VG, if possible.

 

If you can have a service break, I would recommend using Ignite to take a full backup of vg00 and restoring the backup, choosing to use only one disk and adjusting the filesystem sizes to fit.

 

MK
rianui
Trusted Contributor

Re: Root Disk Mirroring Error: "The physical volume already belongs to a volume group"

Hi Matti,

 

I did a fesh installation from ignite and resized VG00 volumes to fit to one disk.

I have successfully mirrored the root volumes to the second disk.

Much appreciated!!

 

Best Regards,

 

Rianui