1833151 Members
3345 Online
110051 Solutions
New Discussion

mirroring root drive

 
SOLVED
Go to solution

mirroring root drive

E35 running 10.20. I'm trying to mirror my root (vg00) drive, which is a 4.3Gb hot swappable drive to a 9.1Gb hot swappable.

Commands used:
pvcreate -B /dev/rdsk/c2t11d0 (9.1GB drive)
mkboot /dev/rdsk/c2t11d0
mkboot -a "hpux -lq" /dev/rdsk/c2t11d0
vgextend /dev/vg00 /dev/dsk/c2t11d0
I get the following response on my vgextend command:
vgextend: Not enough physical extents per physical volume.
Need: 2170, Have: 2000.
Volume group "/dev/vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

Not sure why it thinks that there are only 2000 PE's on this drive.

If I do a vgdisplay -v vg03 on another drive that is the exact same drive as c2t11d0 (the one I'm trying to mirror to) it shows this:

--- Physical volumes ---
PV Name /dev/dsk/c2t9d0
PV Status available
Total PE 2170
Free PE 170

It shows Total PE's are 2170, why aren't there 2170 total PE's on the drive (c2t11d0) I'm trying to mirror to?

Any help would be greatly appreciate.
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: mirroring root drive

Hi Glenn:

You have discovered an LVM feature. You are limited to the number of Physical Extents/Drive that were allocated when the Volume Group was created. If you had started with the 9GB drive there would have been no problem. Your could do a make tape recovery and recreate your system or load from scratch on your 9GB drive and then mirror. Ideally, you would mirror to identical disks but this is not necessary it just keeps you out of trouble.
If it ain't broke, I can fix that.
Craig Rants
Honored Contributor

Re: mirroring root drive

This is what my 9GB disk looks like with the pvdisplay command:

PV Name /dev/dsk/c0t9d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 8
PE Size (Mbytes) 4
Total PE 2169
Free PE 845
Allocated PE 1324
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

What does yours show?
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
G. Vrijhoeven
Honored Contributor

Re: mirroring root drive

Hi,

I suppose you created vg00 with a 4 GB drive and now you are trying to add a 9Gb drive.
When you created vg00 you set a MAX PE in the vg00 volume group. can you give us the complete output of

vgdisplay -v vg00

Gideon
James R. Ferguson
Acclaimed Contributor
Solution

Re: mirroring root drive

Hi Glenn:

This error indicates that the new disk has a larger number of physical extents than the value of 'max_pe' (see "man vgcreate" that was set or chosen when the volume group was originally created.

If you do a 'vgdisplay /dev/vg00' and look at the "Max PE per PV" value you will see it is 2000 in your case. This is the limit, and your new disk exceeds this number of PE.

Your new disk has probably been added to the volume group, but you will not be able to utilize extents on it that exist beyond the original volume group limit of 2000.

Unfortunately, the only way to alter parameters like 'max_pe' is to recreate the volume group from scratch, which for vg00, would mean an Ignite cold-install as the safest, sane approach.

Regards!

...JRF...
Michael Tully
Honored Contributor

Re: mirroring root drive

Hi,

If you add a disk to volume group it must be of equal size or smaller. You cannot add a 9Gb to a VG that was created with a 4GB. When a VG is constructed is is built around the 4Gb disk.

-Michael
Anyone for a Mutiny ?

Re: mirroring root drive

Thanks for the responses. I understand why I can't create this mirror now. What is the easiest way to undo what's been done, ie; remove this disk from /etc/lvmtab and it's association to my root drive?

henrcc # strings /etc/lvmtab
/dev/vg02
/dev/dsk/c2t8d0
/dev/dsk/c2t12d0
/dev/vg00
/dev/dsk/c0t5d0
/dev/dsk/c2t11d0 - NEED TO REMOVE THIS!
/dev/vg01
/dev/dsk/c0t6d0
/dev/dsk/c2t15d0
/dev/vg03
/dev/dsk/c2t9d0
/dev/dsk/c2t13d0
A. Clay Stephenson
Acclaimed Contributor

Re: mirroring root drive

Hi Glenn:

If you have already mirrored (do an lvdisplay to find out) any logical volumes. You need to do an lvreduce -m 0 /dev/vg00/lvoln /dev/dsk/c2t11d0 for lvol.
Then do a vgreduce /dev/vg00 /dev/dsk/c2t11d0.

Man lvreduce and vgreduce for details before your do this.

Clay
If it ain't broke, I can fix that.
Thierry Poels_1
Honored Contributor

Re: mirroring root drive

hi,

vgreduce vg00
should remove unused disk(s) from the volum group

regards,
Thierry
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.