Expand LV

Under the df command, one of my logical volumes, /dev/hd4, was showing 100% Used, so I added 2 logical partitions, but its still showing 100% used. Is there a separate command I need to execute to reallocate?

By adding PPs to the LV you expanded just that: the LV. You have to expand the FS too to make use of the enlarged capacity:

First, calculate how much space you added by multiplying the size of the PP (check with lsvg <vgname> ) with the number of LPs you added. Let us suppose you have PPs of 1GB size and you added 2 LPs. Now calculate, how many disk blocks this is (a block is the standard FS unit, 512 bytes) - 2 LPs of 1024 * 1024 * 2 blocks:

# bc
2*1024*1024*2
4194304

Now use this value in a chfs command:

# chfs -a size=+4194304 /path/to/mountpoint

I hope this helps.

bakunin

In this case you could also just run

# chfs -a size=+1 /

twice

i.e., one time for each lp you had already extended. In the future you could extend by 256M by entering

# chfs -a size=+256m /

or any other filesystem.

Hope this helps!

Michael, thanks for replying. As I recall, AIX can expand the FS on the fly, correct? That is, without dropping the FS

If you mean by "on the fly" online: yes, AIX neither requires a recreation of the FS nor do you have to unmount it, you can do it safely while fully accessing the FS.

If you increase the FS AIX will automatically increase the underlying LV too, so you could use "chfs" without even touching the underlying LV. Increasing the LV prior to increasing the FS gives you just better control over the allocation of the PPs used to increase the size of the LV. If you want to use specific PPs from a certain disks (out of several possible ones) you better increase the LV by hand and only then enlarge the FS, otherwise you can immediately enlarge the FS.

I hope this helps.

bakunin

Bakunin, thanks for your reply. I didn't think AIX would require a remount, but thought I'd check. Have a good new years