Operating System - HP-UX
1833777 Members
1837 Online
110063 Solutions
New Discussion

Re: accrete a vg without a new disk

 
SOLVED
Go to solution
Konrad Hegner
Frequent Advisor

accrete a vg without a new disk

Hello all

We have some volume groups they have a size from 9 GB, but the HDD have space for 18 GB.
How can I accret the disk-space? The system is mirrored, do I have to do this in both disks?
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: accrete a vg without a new disk

Once a logical volume is mirrored when you lvextend it it will extend both mirrors.

You can use use lvsplit, break the mirrors and then extend the logical volume.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor
Solution

Re: accrete a vg without a new disk

How did they ever get created in this situation?

Both vgcreate and vgextend work in terms of whole physical devices. There's no way to do a vgextend now to claim the other half of the device. The only thing I can think of is to back up your data, blow away the VG with a vgexport, then recreate it correctly and restore your data.


Pete


Pete
Helen French
Honored Contributor

Re: accrete a vg without a new disk

If I understood correctly, you have a disk that has capacity 18GB and out of that 9GB is used. You want to use the other 9GB to create another VG:

1) It is not possible to create 2VGs on a single disk.

Now if you are talking about creating another LV or extending the existing LVs:

1) It's possible.
2) You can also extend the mirrors, or create another LV mirror.
3) If you are not very good in command line, goto SAM and disk devices. Select the free space and create or extend the LVs.
4) Also, software mirroring is done on LV level.
Life is a promise, fulfill it!
Jeff Schussele
Honored Contributor

Re: accrete a vg without a new disk

Hi Konrad,

HP-UX only allows 1 VG per disk(s).
Can't have 2 or more VGs in that disk or group of disks.

You can only do one of two things
1) Extend the current LV(s) into the free space
2) Create a new LV(s) in that VG free space.

Before you do so check the VG with vgdisplay to verify that you indeed have free space in that VG.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James R. Ferguson
Acclaimed Contributor

Re: accrete a vg without a new disk

Hi Konrad:

If I understand correctly, you have a volume group that is comprised of 18GB physical disk(s) but can only address about 9GB.

If that is the case, it is because you 'vgextend'ed an 18GB disk into a volume group that was formerly created with (most likely) a 4GB disk or with the default 'pe_size' and/r 'max_pe' used during a simple 'vgcreate'. (See the man pages for 'vgcreate' for more information).

The LVM header is fixed during 'vgcreate' and cannot be altered. That is, the 'max_pe' and 'pe_size' are set. Adding a larger disk will accmplish nothing, since the LVM header information is merely replicated from the existing to the new physical volumes during the 'vgextend'.

The only way to utilize all of the physical extents in this situation is to backup your data; 'vgexport' the volume group to remove all knowledge of it; 'vgcreate' it with appropriate parameters (see the 'vgcreate' man pages); lvcreate your logical volumes; and reload your data.

Regards!

...JRF...
twang
Honored Contributor

Re: accrete a vg without a new disk

If you want to split the logical volume
# lvsplit /dev/vg01/lvolx
# fsck /dev/vg01/lvolxb
# mount /dev/vg01/lvolxb /abc

Remove mirror copies of logical extents of a logical volume from the physical volume
/dev/dsk/c2t0d0:

#lvreduce -m 0 /dev/vg01/lvol4 /dev/dsk/c2t0d0
Konrad Hegner
Frequent Advisor

Re: accrete a vg without a new disk

Pete: I don't know why this is so, but it is so.

Shiju Wilson: No, you understand me not correctly (sorry my mother-language is German).
--> I won't create a new VG on this disk and I won't create a new LV.

I will accrete this vg from 9 to 18 GB with the unused space. But I think Pete Randall have the only solution - the restore [this was, from what I was afraid ;-( ].

If I do a 'vgdisplay -v vg00' they show me the follow informations:
..
Total PE 8680
Alloc PE 6208
Free PE 2472
..

JRF: Yes, your'e right. I seems that I have to restore ;-(
Konrad Hegner
Frequent Advisor

Re: accrete a vg without a new disk

JRF:
Works the workaround with the backup and the restore also by the boot-disk? I think if I do a restore, the 'tape will create' the volume group?