Increasing ./usr or any filesystem

Hi guys,

I want to increase my ./usr or just one path in my aix6.1 machine.

currently if I

# lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00f6126500004c00000                 0012aef0c9035
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1092 (139776 megaby                 tes)
MAX LVs:            256                      FREE PPs:       1004 (128512 megaby                 tes)
LVs:                12                       USED PPs:       88 (11264 megabytes                 )
OPEN LVs:           11                       QUORUM:         1 (Disabled)
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
PV RESTRICTION:     none
# df -k
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           393216    202272   49%    10599    18% /
/dev/hd2          2359296    252912   90%    47500    44% /usr
/dev/hd9var        524288    175432   67%     9768    20% /var
/dev/hd3           262144    242380    8%       40     1% /tmp
/dev/hd1           131072    130708    1%        5     1% /home
/dev/hd11admin      131072    130692    1%        5     1% /admin
/proc                   -         -    -         -     -  /proc
/dev/hd10opt       393216    185584   53%     8744    18% /opt
/dev/livedump      262144    261776    1%        4     1% /var/adm/ras/livedump
# lsvg -l rootvg | grep /usr
hd2                 jfs2       18      36      2    open/syncd    /usr
# 256                      FREE PPs:       1004 (128512 megabytes)

I've read :-

my questions would be ->
1) is there any side effects to my current ./usr if I add space to it. Any risk of losing any data in the directory?

2) would this command be correct?

chfs -a size=+3000M /usr

or

extendlv /hd2 22

I can see that free PP is 1004, not so sure 1 PP stands for how many MBs. I just assume 139776 devide by 1004 = 139.219 mb per 1PP.

my intention is just to create a space with at least 3G of free space in one location.

please advice.

---------- Post updated at 03:02 PM ---------- Previous update was at 12:39 PM ----------

I just tried

# chfs -a size=+3000M /usr
Filesystem size changed to 11010048

before ->

# df -k
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           393216    202272   49%    10599    18% /
/dev/hd2          2359296    252912   90%    47500    44% /usr
/dev/hd9var        524288    175432   67%     9768    20% /var
/dev/hd3           262144    242380    8%       40     1% /tmp
/dev/hd1           131072    130708    1%        5     1% /home
/dev/hd11admin      131072    130692    1%        5     1% /admin
/proc                   -         -    -         -     -  /proc
/dev/hd10opt       393216    185584   53%     8744    18% /opt
/dev/livedump      262144    261776    1%        4     1% /var/adm/ras/livedump

after ->

# bootinfo -K
64
# df -k
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           393216    202272   49%    10599    18% /
/dev/hd2          5505024   3398160   39%    47500     6% /usr
/dev/hd9var        524288    176672   67%     9770    20% /var
/dev/hd3           262144    242380    8%       40     1% /tmp
/dev/hd1           131072    130708    1%        5     1% /home
/dev/hd11admin      131072    130692    1%        5     1% /admin
/proc                   -         -    -         -     -  /proc
/dev/hd10opt       393216    185584   53%     8744    18% /opt
/dev/livedump      262144    261776    1%        4     1% /var/adm/ras/livedump
# 

seems that everythings fine. It did add 3G i guess.hmm..Now lets hope all the original files in /usr are there :slight_smile:

+ One additional question.

Can I keep on adding the size? meaning lets say after this I still find 3G not enough and I want to add more, would it effect anything? My assumption is No.

chfs works fine and does not affect existing data. you can keep adding space as long as you have physical space available. I would strongly suggest moving non-OS data out of /usr though. This will make backup/restores go much smoother and avoid having an application affect the OS in a negative way.

chfs is normally the only command that is needed for this. be *very* careful with LVM commands. They are very powerful and can make for a bad day if used improperly.

Hi,

Wrong. As your own output shows:

You do not have to extend /usr ever - as it is supposed to be used only for package installations - and these have the capability to extend the filesystem according to their needs. If it runs full, commit old packages that are only applied - this makes a lot of space free.

Sure - as long as you haven't reached the size you defined when creating your logical volume filesystem. If you did reach you will get an error message and need to change this size to a greater value.
btw - if you run df -g instead of df -k, it makes the entire output a lot more readable.

For future, read the LVM redbook or at least a basic system administration redbook - these are written for AIX 5L but basic commands never change on AIX. If you are switching from Solaris or HP to AIX there are very good redbooks for this as well.
Kind regards
zxmaus