Before migrating to AIX 6.1 you might want to check that ncargs is set to a value greater than or equal to 256 e.g.

# chdev -l sys0 -a ncargs=256

$ lsattr -El sys0 -a ncargs

ncargs 256 ARG/ENV list size in 4K byte blocks True

Let me elaborate.

Recently we migrated our LPARs from AIX 5.3 to AIX 6.1. Our AIX 5.3 systems were migrating from 5300-07-05-0831 to AIX 6.1 at 6100-03-01-0921.

During the testing of the migration process we noticed that some of the sys0 tunables were being reset to their default settings after the migration had completed. This was rather odd. Id never had this issue during an AIX migration in the past.

We noticed the following attributes had changed.

fullcore- Was set to true before migration. Set to false after migration.

iostat - Was set to true before migration. Set to false after migration.

maxuproc- Was set to 2048 before migration. Set to 128 after migration.

The maxuproc value was of particular concern as it has an impact on the number of processes an application (user) can start. So when one of our SAP/Oracle test systems was unable to start because maxuproc was set to low, we were very puzzled. After we had discovered that maxuproc was incorrect, we changed it to the appropriate value and restarted SAP/Oracle successfully. We were then very determined to identify the root cause of this issue. We could not see any issue with our migration process (via nimadm) and decided to log a call with IBM.

IBM AIX support were able to assist us in determining the problem.


After building more debug methods and performing further debug, which

involves multiple restore attempts, we figured out the root cause.

- During second phase of boot, when cfgsys_chrp run, it tries to set all

customized values for sys0 device. However, in this process, if and

when an error occurs, all customized values for sys0 will be reset to

allow the system to boot. (Instead of hang/crash).

- In the case of the customer's scenario, when cfgsys_chrp() tries to set ncargs

to value of 30, it fails with an error. Reason being, for

AIX 6.1, minimum value for ncargs is 256. If it is less than 256, the kernel

returns an error and then cfgsys_chrp "resets" all customized attribute

values for sys0 to their defaults.



Error changing v_ncargs,rc=-1

Error during SYS_SETPARMS, errno=22

Invalid value in SYS_SETPARMS


# odmget -q "attribute=ncargs" PdAt


uniquetype = "sys/node/chrp"

attribute = "ncargs"

deflt = "256"

values = "256-1024,1"

width = ""

type = "R"

generic = "DU"

rep = "nr"

nls_index = 71



Purpose: Specifies the maximum allowable size of the ARG/ENV list (in 4

KB blocks) when running exec() subroutines.

Values: Default: 256; Range: 256 to 1024

Display: lsattr -E -l sys0 -a ncargs

Change: chdev -l sys0 -a ncargs= NewValue Change takes effect

immediately and is preserved over boot.

Diagnosis: Users cannot execute any additional processes because the

argument list passed to the exec() system call is too long. A low

default value might cause some programs to fail with the arg list too

long error message, in which case you might try increasing the ncargs

value with the chdev command above and then rerunning the program.

Tuning: This is a mechanism to prevent the exec() subroutines from

failing if the argument list is too long. Please note that tuning to a

higher ncargs value puts additional constraints on system memory



As per discussion with Architect, this is not an issue with cfgsys_chrp.

However, when the limit for ncargs was changed, it should have changed

appropriately to handle migration cases. I need to follow up with the

team that handles this for a solution.

As per work around, before migration, make sure ncargs is

greater than or equal to 256.

Action Plan :

- More updates to follow about the solution after discussion with team

that handles ncargs.


If anyone is interested, Ill update my blog again, as soon as a fix is available. In the meantime check the ncargs value before you start a migration to AIX 6.1, just in case.