the command df /
displays the following output on my host.
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5177344 1065096 80% 13676 9% /
according to the manpage of df, by default all sizes are displayed in number of 512 blocks. Therefore, my / filesystem has 1065096 512-blocks empty. Now say I want to add one more block of 512 bytes to the filesystem, I will use the chfs command to increase the size of the filesystem. Below:
chfs -a size=+1 /
the man page of chfs says that sizes can be increased in number of 512 byte blocks if the number is not followed by M or G. Here is what happened when I ran the above mentioned command.
$ df /
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5177344 1065096 80% 13676 9% /
$ chfs -a size=+1 /
Filesystem size changed to 5177344
$ df /
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5177344 1065096 80% 13676 9% /
$ expr 1065096 \- 999568
65528
Can someone explain how instead of increasing by one 512 block, the size increased by 127 512 blocks?
I believe you messed up with copy-paste. I will explain how it works and you apply this to your environment.
When you're using chfs -a size=+1
the command increases your LV by one block but the thing is that you can only increase LV by some amount of PPs. For example if you have PP size configured to 64Mb you'd have your LV automatically increased by 64*1024=65536 blocks.
So issue a command lsvg <vg_name>
, check "PP size" and count.