How to change the system default dump device

The default location where AIX copies the system dump to is page space.

# sysdumpdev -l

primary              /dev/hd6
secondary            /dev/sysdumpnull
copy directory       /var/adm/ras
forced copy flag     TRUE
always allow dump    TRUE
dump compression     ON

# lsvg -l rootvg

rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     112     224     2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       1       2       2    open/syncd    /
hd2                 jfs2       32      64      2    open/syncd    /usr
hd9var              jfs2       1       2       2    open/syncd    /var
hd3                 jfs2       8       16      2    open/syncd    /tmp
hd1                 jfs2       3       6       2    open/syncd    /home
hd10opt             jfs2       4       8       2    open/syncd    /opt
local_lv            jfs2       1       2       2    open/syncd    /usr/local

This can create a problem since the system will not automatically reboot in case of a crash. Instead the system will prompt for instructions with what to do with the dump. It is easy to change this settings however and to allocate a dedicated logical volume for storing the system dump.

First you need to know how big the sysdump logical volume should be.

# sysdumpdev -e

0453-041 Estimated dump size in bytes: 701287628

So, in this case the LV should be at least 669MB. If you take a closer look at the logical volume output above, you'll notice that all values in the 'PPs' column are twice as big as values in the 'LPs' column. That can only mean our root volume group is mirrored. So actually we will need 669MB x 2. Let's check if our root volume group has enough free space.

# lsvg rootvg

VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c7b5dc00004c00000001041cea4c66
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1092 (139776 megabytes)
MAX LVs:            256                      FREE PPs:       240 (30720 megabytes)
LVs:                14                       USED PPs:       852 (109056 megabytes)
OPEN LVs:           13                       QUORUM:         1 (Disabled)
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

We have 30GB free, more than enough. Also we found out that we have 2 physical volumes in this volume group. Let's check what are the names of these PVs, we will need them soon.

# lsvg -p rootvg

rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            546         116         00..00..00..07..109
hdisk1            active            546         124         00..00..00..86..38

Now, what we need to do is create two logical volumes, one on each PV, and set one as a primary dump device and the other as a secondary dump device. The reason why we do this is that we don't want to mirror the sysdump device, but we still need two copies in case one of the hard drives fails.

In this example physical partition is 128MB so we should add 6 PPs to our new logical volumes.

# echo $((128*6))

768

# mklv -t sysdump -y sysdump1 rootvg 6 hdisk1

# mklv -t sysdump -y sysdump2 rootvg 6 hdisk2

# lsvg -l rootvg

rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     112     224     2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       1       2       2    open/syncd    /
hd2                 jfs2       32      64      2    open/syncd    /usr
hd9var              jfs2       1       2       2    open/syncd    /var
hd3                 jfs2       8       16      2    open/syncd    /tmp
hd1                 jfs2       3       6       2    open/syncd    /home
hd10opt             jfs2       4       8       2    open/syncd    /opt
local_lv            jfs2       1       2       2    open/syncd    /usr/local
sysdump1            sysdump    4       4       1    closed/syncd  N/A
sysdump2            sysdump    4       4       1    closed/syncd  N/A

Logical volumes sysdump1 and sysdump2 are created. Now, let's change the system dump settings. First the primary device.

# sysdumpdev -Pp /dev/sysdump1

And now the second.

# sysdumpdev -Ps /dev/sysdump2

Let's check if it's applied.

# sysdumpdev -l

primary              /dev/sysdump1
secondary            /dev/sysdump2
copy directory       /var/adm/ras
forced copy flag     TRUE
always allow dump    TRUE
dump compression     ON

Everything seems fine. All we have to do now is to wait for a system to crash to test our new settings.