Re: indirect JFS mount

From: Holger.VanKoll@SWISSCOM.COM
Date: Thu Dec 18 2003 - 12:27:49 EST


veritas might be right, depending on your problem
 
here is something from ibm about mind-option
 
*PROBLEM*
AIX 4.3.3, ML10, Multiprocessor machine
As part of a file copy (rcp) files were becoming truncated at 32KB and
some filesystem corruption was seen.

*SOLUTION*
The solution was actually very simple. Below is the full text of the
IBM answer but to summarise:

* unmount the filesystem with errors, it may be prudent to run a
check on the filesystem whilst it is unmounted
* mount the filesystem using the 'mind' option (Multiple INDirect
i-node addressing) with:
chfs -a options='mind' <filesystem>

That should be fixed.

*EXTRA DETAIL VERSION*
To further understand this, here is a quick overview of the JFS File
System

Geometry:

This is by no means exhaustive. Only a pointer to clarify things. It
only
assumes the most simplest cases. A file's geometry is described by
one of
three paradigms: direct, single indirect, and double indirect. The
disk
inode contains 9 slots for disk addresses. The first 8 are used for
the
direct addressing while the ninth is used for indirect addressing.

Indirection: None, Single, Double:

No indirect: If the file is less than or equal to 32K then the file
will
use direct addressing. The inode points directly to the data blocks.

Single indirect: If the file is too large for direct addressing, it
will
use a form of indirect addressing. Single indirect addressing will be
used
if the file's data blocks can be addressed by a single indirect block.
In
this case, the direct block addresses are unused and the indirect
block
address contains the disk address of the one and only indirect block.
Each
4 byte entry in the indirect block refers to a data block. Hence
single
indirect addressing is used for files greater than 32K yet less than
4MB.

Double indirect: If the file is larger than 4 MB for large file, then
double indirect addressing is used. In this case, the indirect field
contains the block number of the double indirect block for the file.
The
double indirect block contains 512 pointers to the indirect blocks .
As
before, each indirect block contains 1024 block addresses for the data
for
the file.

There is one .indirect "file" per file system, accessed through
special
inode #4. To reference any file bigger then 32K involves some amount
of
black-magic (too detailed to cover in here) ie. it needs a empty slot
to
dereference further addresses. When this gets exhausted you end up
with an
ENOMEM situation.
Detection & workarounds.

ENOMEM can happen due to other reasons too. So a sure-fire way of
figuring
out that you have this problem and nothing else is to make sure that.

1. It is difficult to create files over 32K
2. And the error returned is ENOMEM or errno 12.

Please note that as each file-system has its own .indirect block, any
ENOMEM errors that happen are localised to that file-system only.

A quick work-around for those who can't/won't migrate to new releases
is to
unmount and remount the file-system which effectively clears the
.indirect.

Another way of possibly figuring out if you are approaching the
condition
is to use svmon in the following way. Please note as .indirect block
is a
dynamic resource, its values change with time and this method may not
work.

# svmon -Ssu|grep /dev/hd2:4 and you get output
like
50b4 -pers /dev/hd2:4 124 0 - - 0..#

Replace the /dev/hd2 with LV of the file-system you are interested in.
In
the above output, the # is the number to look at and if it is
approaching
60,000 then that filesystem is possibly a candidate for being
remounted
with the "mind" option.

So if all this is getting too much and you would simply like to mount
all
the file-systems with mind option proactively, you can. The over heads
are
negligible in using this option.

How to order the FIX?

It can be ordered using APAR number IY13763.

Ordering the fix and installing it is only half the work. After
installing
it, one must enable the fix for it to take effect.

What is the fix?

The fix will install a new version of unix_up/unix_mp kernel along
with a
new version of the mount command. The customer will continue to see
old
behaviour until the file-system is specifically mounted with a new
option
called "mind"(Multi INDirect). Under this new scheme of things there
are
eight .indirect segments as opposed to one.

How do I enable the fix and differences in 4.3 and 5.1?

Unmount file-systems that see the ENOMEM problem and mount them again
using
the following option:

# mount -o mind </Filesystem_Experiencing_Problems>

OR to permanently reflect the changes one could also do

# chfs -a options=mind </Filesystem_Experiencing_Problems>

Only File-systems which are affected need to be remounted with the
"mind"
option. So for eg if you have ten file-systems it is okay to mount one
with
mind option and leave the others as is. Both single .indirect & multi
.indirect based FS can co-exist.

The mount command can be used to verify that the file-system mounted
with
"mind" option is working as designed. The output from mount will show
a
presence of "mind" string in the options field for those filesystems
which
are mounted with the above option.

/dev/hd1 /home jfs Feb 08 15:58 rw,log=/dev/hd8
/dev/lv01 /usr/welcome jfs Feb 08 16:05 rw,mind,log=/dev/hd8

Under 5.1 all file-systems by default are mounted with this option.
If you
would prefer for any reason to mount them as single .indirect then
please
remount them using -o nomind option.
 

        -----Original Message-----
        From: Marcelino Mata [mailto:mmata@MULTIMATIC.COM]
        Sent: Thursday, December 18, 2003 5:56 PM
        To: aix-l@Princeton.EDU
        Subject: indirect JFS mount
        
        
        We use Netbackup to backup our AIX server and we are
encountering problems which Veritas says can be fixed by us changing our
JFS mount option to "multiple indirect addressing". Using a command like
this "chfs -a options=rw,mind /fsname".

        I am concerned about any negative aspects of changing the
default mount options on a production server. I have a very low
confidence level with Veritas's knowledge of AIX filesystems. Has anyone
else made changes to their systems and can they comment on the pro's and
cons' of indirect mount options?

        Marcelino



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:25 EDT