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.
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.
---------------------
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.
---------------------
IN SETVAR()
Error changing v_ncargs,rc=-1
Error during SYS_SETPARMS, errno=22
Invalid value in SYS_SETPARMS
---------------------
# odmget -q "attribute=ncargs" PdAt
PdAt:
uniquetype =
"sys/node/chrp"
attribute = "ncargs"
deflt =
"256"
values =
"256-1024,1"
width =
""
type =
"R"
generic =
"DU"
rep =
"nr"
nls_index = 71
---------------------
ncargs
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
resources.
---------------------
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.