Skip to content
Home » AIX » How AIX Resize File System

How AIX Resize File System

When we want to raise the space of /home to 10GB, there're several way to do it. First of all, let's see current size.

[root@primary01 /]# df -g /home
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd1           5.00      4.97    1%      133     1% /home

Here we use AIX command chfs to change attributes of a file system.

1. Specify Target Size

We can specify the definite size of the file system in the command.

[root@primary01 /]# chfs -a size=10G /home
Filesystem size changed to 20971520

Only size unit M and G are valid suffixes.

2. Specify Added Size

We can alos specify the size we want to add to the file system by a plus sign (+) in the command.

[root@primary01 /]# chfs -a size=+5G /home
Filesystem size changed to 20971520

3. Specify Target Blocks

If you are used to calculate the file system by blocks, you can specify the value in blocks without any suffix.

[root@primary01 /]# chfs -a size='20971520' /home
Filesystem size changed to 20971520

Please note that, the unit of size is a 512-byte block. So we expect to get:

20971520 * 512 / 1024 / 1024 / 1024 = 10GB

As a result, we have 10g on the file system /home now.

[root@primary01 /]# df -g /home
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd1          10.00      9.97    1%      133     1% /home

2 thoughts on “How AIX Resize File System”

Leave a Reply

Your email address will not be published. Required fields are marked *