How to find out the filesystem block size in AIX

root's picture

There are many ways to achieve this.

1.Via smitty:

Add / Change / Show / Delete File Systems
=> Journaled File Systems
=> Change / Show Characteristics of a Journaled File System
=> Select the file system you want to see

2. With lsfs -q, one block size is 512 bytes so in our example, the filesystem block size is 2kb:

gzaix@root:/ # lsfs -q .
Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
/dev/lv_BLAH   --         /oracle/BLAH          jfs2  524288  rw         yes  no 
  (lv size: 524288, fs size: 524288, [color=green]block size: 4096[/color], sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: no, MAXEXT: 0, MountGuard: no)

3. With echo and ls, again the value is 2kb:

Add one character into a file and the file's will occupy exactly one block. Simple, no? :)

gzaix@root:/ # echo b >tmp.tmp
gzaix@root:/ # ls -l -s tmp.tmp
   4 -rw-r--r--    1 root     system            [color=green]2[/color] Feb 25 13:14 tmp.tmp

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.