Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

increase lv

Status
Not open for further replies.

aix43

Technical User
Apr 20, 2001
26
0
0
SA
please help,
can anybody tell me how to increase logical volume.
/dev/hd2 688128 17976 100% 21589 13% /usr

and also how to decrease logical volume ?

Thanks in advance
 
Use the chfs command eg. chfs -a size=+value /usr where value=size in 512-byte blocks to increase by.
OR
smitty chfs

I strongly suggest you see the man page 1st.
 


If i am right u cannot decrease the size of a logical volume. you can only increase its size. you can use smit to do this.

run smit lvm and click on logical volumes.then click on set charasteristics of a logical volume and under that u have an option to increase the size of a logical voulme.

yeah but refer to the man pages before you do that as francs says.

sendhil
 
If you have a logical volume with a file system inside increase the file system (like franc said) and the command first will expand the container logical volume. The logical volumes grow in partition units (4, 8, 16, 32MB etc) and you must give the size parameter to [tt]chfs[/tt] command in block units.

If you expand the container logical volume first, then you must carefully expand the file system within to match the size of container or else, you lose slack space or re-expand the logical volume again.

I hope it works...
Unix was made by and for smart people.
 
In AIX /usr is designed to be a "read mostly" file system. Log files and other things that grow are kept in /var. /usr should only contain executable code. So, in most systems it is perfectly all right for /usr to be 100% full. And you still have a little room left anyway, it just rounded up to 100%. Other file systems I worry at a lower level 80% or 50%, but /usr is ok being full. If you need to install IBM software or fixes, it will expand /usr for you.

But, if you want to expand /usr (or any file system) for some reason, you can do it in smit and change the size to what you want it to be. Often for me I just want it to be a little bigger, so I just increase it by 1 block. Since it can't do just one block, it increases it by the LP size, typically 4, 8, or 16 MB (depends on the size of your disk).
To do that you can run the command :
chfs -a size=+1 /usr
this will increase the size of the filesystem by one LP. By specifying the +1, you are increasing it by one block and you don't have to know what the size is now.

And in support of the previous post, DO NOT increase the logical volume. Increase the file system which will increase the logical volume for you. I have seen people who have filled up their entire disks with logical volumes but didn't expand their filesystems so they were still out of space.

Good luck.
 
A case where you would need to increase the size of a logical volume would be if you have reached the maximum Physical Partitions allowed for that LV.

To change that, use:
smitty extendlv
and then enter your desired Number of ADDITIONAL logical partitions.

Keep in mind what your PPs size is set to. You can get that with lslv lv01 (use your lvname).

So if you need to increase your LV by 100mg and your PPs are 16mg, you would need to enter 7 ADDITIONAL PPs. 7 x 16mg = 112mg.

To reduce the size of an LV, you have to backup it up, delete the LV, then recreate it in the smaller size you need. That's the only way. Remember, amateurs built the Ark, professionals built the Titanic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top