Operating System - HP-UX
1834000 Members
2206 Online
110063 Solutions
New Discussion

Re: Volume Group Questions

 
Mohd Mohtar
Frequent Advisor

Volume Group Questions

Hi,

Need some enlightenment on volume group question.

Going into sam -> Disks and File Systems -> Volume Group -> Choose and view more information on vg13. Output results as follows:

View General Information for Volume Group: vg13
Volume Group Name: vg13
Activation Mode: Read/Write
Maximum Capacity (mbytes): 138944
Current Capacity (mbytes): 17360
Megabytes Used: 17280
Megabytes Free: 80
Max. No. of Logical Volumes: 255
Cur. No. of Logical Volumes: 2
Disk Capacity Limit (mbytes): 8684
Maximum Number of Disks: 16
Current Number of Disks: 2
Hot Spares Configured: 0


The questions:

1) Based on Max capacity (138944) and mbytes free (80), can I increase the capacity?
2) If can, by how much and how to do it?
3) If cannot, beside adding new harddisk, what else can I do?


Appreciate any replies on these.

Thanks

Mok
10 REPLIES 10
KCS_1
Respected Contributor

Re: Volume Group Questions

Hi, Mok

Look at some instances and make new filesystem if you need.

# vgdisplay -v vg13

(View of information specified VG)

PE(megabyte)= ? (defalut 4)
free PE = ?

PE(megabyte)* free PE = Allocation avaliable size

# lvcreate -L Size(megabyte) /dev/vg13

- Look at the manpage more options.

# newfs -F vxfs /dev/vg13/rlvolX

- Look at the manpage more options.

# mount /dev/vg13/rlvolX /mount_point







Easy going at all.
Rajeev  Shukla
Honored Contributor

Re: Volume Group Questions

Hi,
By default when you create a VG the maximum number of PV that can be allocated to the VG is 16. So in your case one disk size is 8684MB and 16times that equals 138944.
Which means you can at a maximum add 14 more disks(since 2 already added) and get maximum 138944 space in that VG.

No with the vgcreate -p option you can increase this parameter. The value can be max 255.
Now if you say set it to 100 then you can get Maximum Capacity (mbytes):868400
Rajeev  Shukla
Honored Contributor

Re: Volume Group Questions

Hi, In addition to what i explained...answers to you'r questions.
1. Yes You can increase the capacity.
2. use vgcreate -p option. have a look at the man pages of vgcreate.
3. But even by increasing that Max Capacity you wont that get that capacity untill and unless you add more disks. Means if you want more free space that 80MB you'll have to add more disks.

That "Max Capacity" just means that, thats the limit this voulme group can have by adding more disks.
Mohd Mohtar
Frequent Advisor

Re: Volume Group Questions

Hi,

Thanks for the quick reply. So this meaans I actually need to add more harddisks.

Ok, another question with reference to the attachment.

lvol2 has used only 544 mbytes out of 8683 mbytes allocated (correct me if i'm wrong). So in this case, can I transfer the available space in lvol2 to lvol1. If it is possible, how do i achieve it?

Thanks again.

Mok
Rajeev  Shukla
Honored Contributor

Re: Volume Group Questions

Hi,
Dont even think about lvol2.
The percentage of usage lvol2 shows is dynamic since its not a filesystem. Lvol2 is swap space. Normally this is created based on the total memory of the system, which i dont recommend to reduce lvol2
Zigor Buruaga
Esteemed Contributor

Re: Volume Group Questions

Hi,

/dev/vg13/lvol2 has a size of 544MB ( 6% of disk size ).
Could you please post the output of "vgdisplay -v /dev/vg13" and "bdf | grep vg13" ?

Kind regards,
Zigor
Rajeev  Shukla
Honored Contributor

Re: Volume Group Questions

I am sorry, i appologize i overlooked the VG and thought of just lvol2. I am sorry.

But ya if you feel the lvol2 in your'r VG is free to a lot extent. You can do following steps.

1. Take a backup of lvol2
2. lvreduce lvol2
3. lvextend lvol1
4. extendfs lvol1
5. newfs on lvol2
6. restore lvol2

Mohd Mohtar
Frequent Advisor

Re: Volume Group Questions

Hi,

%bdf|grep vg13
/dev/vg13/lvol2 557056 3465 518999 1% /d13/sp1/his
/dev/vg13/lvol1 8290304 5435626 2676329 67% /d13/sp1/dat

The vgdisplay of vg13 is as per attached.

From the bdf output, i understand that it is not in the alarming state as yet but what worries me is the free capacity of 80 MB available.

From the previous attachment, lvol2 only used 544 Mbytes out of 8683 allocated giving it 8193MB available space.

My question is, can I use the available 8193MB from lvol2 to transfer it to lvol1 since they are on the same vg13?
If this possible, how do I do it coz I will need to do the same to other vg.

Really looking forward to your kind reply.

Thanks again.


Zigor Buruaga
Esteemed Contributor

Re: Volume Group Questions

Hi again,

lvol2 has a size of 544 MB and has approx 507 MB free ( not 8193 ).
As you already know, you don't have space problems, since your lvol1 has approx. 2500 MB free.
But yes, you only have 80MB free to extend your lvols ( or create a new one ). So, whenever you have space problems, you will need to add more disks ( or delete the mirror if you don't need it ).

Hope this helps.
Kind regards,
Zigor
Zigor Buruaga
Esteemed Contributor

Re: Volume Group Questions

Hi again,

Sorry for my poor prior answer, let me explain better:

Your lvol1 size is 8096MB
Your lvol2 size is 544MB
Total: 8640MB

Your disks are 2170PE * 4 = 8680MB
Each disk have 10 Free PE * 4 = 40MB free per disk

So 8680MB ( disk capacity ) - 40MB ( free ) = 8640MB used (lvol1 + lvol2 sizes ).

Looks like you have mirrored your lvols, so lvol1 uses 8096MB in disk1 ( c6t8d0 ), and 8096MB in disk2 ( c7t8d0 - mirrored ).
The same for lvol2. So you have 80MB free in both disks but you can extend your lvols only 40MB, the other 40MB will be for mirror.
So, " ... From the previous attachment, lvol2 only used 544 Mbytes out of 8683 allocated giving it 8193MB available space." is not correct.
But as mentioned before, the file systems mounted in those lvols have a lot of free space.

You also mention other VG, please let us know what do you need, do you have space problems in other VG?
or maybe you want to redistribute the space between lvols?

Hope this helps.
Kind regards,
Zigor