ITEM: FG8338L

Questions about the allocation group size.



PROBLEM:Unable to copy two files into a large-file enabled filesystem with Allocation Group=64.

ACTION TAKEN:The customer is in the process of migrating from AIX 4.1.4 to AIX 4.2.1.
She was attempting to move two ADSM files, diskvol3 and diskvol4,  from her 4.1 system to 
her 4.2 system. diskvol3 is 1013972992 bytes. diskvol4 is 1015021568 bytes.

The customer created a large-file enabled filesystem on her 4.2 system that was the
same size as it was on her 4.1 system, 2.048GB.
She then used the \#cp command to try to copy the two ADSM files into the large-file enabled
filesystem.
The \#cp command failed with 'cp:\:there is not enough space in the file system'.
The filesystem in question is /sfl, and it was created with the default Allocation Group
size (AG) of 64.

The customer then created a second filesystem, /sfl1, that was one 8MB PP larger, but still with
an AG size of 64.
She was able to successfully copy the 2 files, diskvol3 and diskvol4, into this filesystem.

She then created a third large-file enabled filesystem, /sfll, at the original size, 2.048GB, 
but this time used an AG size of 8.
She was able to copy the same 2 files, diskvol3 and diskvol4, into this third filesystem.
The only difference between /sfl and /sfll is that she used a different AG size, 64 versus 8.
She used the default of 4096 NBPI and 4096 FRAG size for all three filesystems.
 Below is some of the information from the customers system after attempting to copy the
same two files to the three filesystems.

df -kv output
-------------

Filesystem    1024-blocks      Used      Free %Used    Iused    Ifree %Iused  Mounted on
/dev/sfl          2048000   2046244      1756  100%       19    524269     1%  /sfl  
/dev/sfl1         2056192   2047396      8796  100%       19    524269     1%  /sfl1 
/dev/sfll         2048000   2045860      2140  100%       19    511981     1%  /sfll

lsfs -q output
--------------
Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
/dev/sfl        --         /sfl                   jfs   4096000 rw         yes  no 
 (lv size: 4096000, fs size: 4096000, frag size: 4096, nbpi: 4096,compress: no, bf: true, ag: 64)

/dev/sfl1       --         /sfl1                  jfs   4112384 rw         yes  no 
 (lv size: 4112384, fs size: 4112384, frag size: 4096, nbpi: 4096,compress: no, bf: true, ag: 64)

/dev/sfll       --         /sfll                  jfs   4096000 rw         yes  no 
 (lv size: 4096000, fs size: 4096000, frag size: 4096, nbpi: 4096,compress: no, bf: true, ag: 8)

ls -al output
-------------
/sfl:
total 3960600
drwxr-sr-x   3 sys      sys          512 Feb 13 10:59 .
drwxr-xr-x  27 bin      bin         1024 Feb 17 09:26 ..
-rw-r--r--   1 root     sys      1013972992 Feb 12 17:03 diskvol3
-rw-r--r--   1 root     sys      1013841920 Feb 13 11:03 diskvol4
drwxrwx---   2 root     system       512 Feb 12 16:58 lost+found

/sfl1:
total 3962904
drwxr-sr-x   3 sys      sys          512 Feb 13 11:34 .
drwxr-xr-x  27 bin      bin         1024 Feb 17 09:26 ..
-rw-r--r--   1 root     sys      1013972992 Feb 13 11:31 diskvol3
-rw-r--r--   1 root     sys      1015021568 Feb 13 11:38 diskvol4
drwxrwx---   2 root     system       512 Feb 13 11:26 lost+found

/sfll:
total 3962904
drwxr-sr-x   3 sys      sys          512 Feb 13 08:19 .
drwxr-xr-x  27 bin      bin         1024 Feb 17 09:26 ..
-rw-r--r--   1 root     sys      1013972992 Feb 13 08:18 diskvol3
-rw-r--r--   1 root     sys      1015021568 Feb 13 11:12 diskvol4
drwxrwx---   2 root     system       512 Feb 13 08:13 lost+found

I created two test filesystems at the specified size, 2048000 1024-blocks, one with AG=64 and
one with AG=8.

df -k /ag*
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/lv01         2048000   1982124    4%       17     1% /ag64
/dev/lv02         2048000   1983660    4%       17     1% /ag8

From the initial creation of the filesystems, there is a difference in the FREE space in the
filesystems, 1982124 for the filesystem with AG=64, and 1983660 for the filesystem with AG=8.
This is a difference of 1.536MB.

I used \#dumpfs to look at the filesystem information:

\#dumpfs /ag64

/ag64:

magic                   0x65872143      cpu type                0x0
file system type        0               file system version     2
file system size        4096000         fragment size           4096
block size              4096            allocation group size   16384 (frags)
inodes/allocation grp   16384 \<======   compress                0
file system name        /ag64           volume name             lv01
log device              0x2b0001        log serial number       0x3
file system state       1               read only               0
last change             Wed Feb 18 18:45:23 EST 1998

\#dumpfs /ag8

/ag8:

magic                   0x65872143      cpu type                0x0
file system type        0               file system version     2
file system size        4096000         fragment size           4096
block size              4096            allocation group size   2048 (frags)
inodes/allocation grp   2048 \<======    compress                0
file system name        /ag8            volume name             lv02
log device              0x2b0001        log serial number       0x3
file system state       1               read only               0
last change             Wed Feb 18 18:46:09 EST 1998

The above shows that when using an AG size of 64, there are 16384 128-byte inodes created
per allocation group.
Using an AG size of 8, there are only 2048 128-byte inodes created per allocation group.

The customer created a filesystem of 2048000 1024-blocks, which is 49.152MB less than
2GB, which is 2097152 1024-blocks.
When this last 64MB AG was created, all of the 16384 inodes were created in the filesystem, but
not all of the associated space was claimed since the customer selected a size for the 
filesystem that was not a multiple of the AG size.

Creating a true 2GB filesystem of 2097152 1024-blocks with an AG size of 8 or 64 will yield the
same amount of free space in the filesystem.

df -k /ag*
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/lv01         2097152   2031276    4%       17     1% /ag64
/dev/lv02         2097152   2031276    4%       17     1% /ag8

When selecting an allocation group size, it is important to select a size that will allow
you to specify the NBPI value that you need, as well as be a even divider for the filesystem
size that you are creating. 



Support Line: Questions about the allocation group size. ITEM: FG8338L
Dated: February 1998 Category: N/A
This HTML file was generated 99/06/24~13:30:14
Comments or suggestions? Contact us