After Solaris rootdisk encapsulation, the dumpdevice is unexpectedly showing as (dedicated) in dumpadm.

book

Article ID: 100020940

calendar_today

Updated On:

Resolution


SYMPTOM:

The Solaris dumpadm command shows that the Dump Device as (dedicated), even though it's shared by a VxVM encapsulated swap device.

# dumpadm -d /dev/dsk/c0t0d0s1
     Dumpcontent: kernelpages
      Dumpdevice: /dev/dsk/c0t0d0s1 (dedicated)   <--- This means that "savecore -L" will happily use this device.
Savecore directory: /var/crash/server1
Savecore enabled: yes

#  vxprint -g rootdg -qht swapvol
Disk group: rootdg

v  swapvol    -          ENABLED  ACTIVE  997248  ROUND   -      swap
pl swapvol-01  swapvol    ENABLED  ACTIVE  997248  CONCAT  -      RW
sd rootdisk-01 swapvol-01  rootdisk 0      997248  0      c0t0d0  ENA

# swap -l
swapfile                  dev       swaplo blocks  free
/dev/vx/dsk/bootdg/swapvol 258,21001 16     997232   997232

This occurs when a disk is:
a. swap is encapsulated using VERITAS Volume Manager (VxVM) object like swapvol.
b. swap devices and/or dump device definitions are changed without a reboot.

The Dump device's 'dedicated' label should only persist until the next reboot, as the vxvm-startup2 script calls the vxswapctl command that sets the dumpadm flag as a (swap).

1.Get the dump device from the dumpadm command:
# dumpadm | grep "Dumpdevice"
      Dumpdevice: /dev/dsk/c0t0d0s1 (dedicated)

2. Get the device and use the vxswapctl command:
#/etc/vx/bin/vxswapctl add /dev/dsk/c0t0d0s1

3. Confirm it's changed to (swap):
# dumpadm | grep "Dumpdevice"
      Dumpdevice: /dev/dsk/c0t0d0s1 (swap)


For people interested in reproducing the scenario and testing this fix (repro on 5.0mp3, Solaris9):

1. Determine if the VxVM swapvol device is seen in swap-l

# swap-l
swapfile            dev  swaplo blocks  free
/dev/vx/dsk/bootdg/swapvol258,21001     16 997232 997232

2. Remove swap device for swapvol, temporarily add swap's associated /dev/dsk device, and then remove swap device again to clear both swap and dumpadm (dumpdevice):

# swap -d /dev/vx/dsk/bootdg/swapvol
# swap -a /dev/dsk/c0t0d0s1
# swap -d /dev/dsk/c0t0d0s1
/dev/dsk/c0t0d0s1 was dump device --
invoking dumpadm(1M) -d swap to select new dumpdevice
dumpadm: no swap devices are available

3. Add the dump device manually to get a dedicated swap device:

# dumpadm -d /dev/dsk/c0t0d0s1
     Dumpcontent: kernel pages
     Dumpdevice: /dev/dsk/c0t0d0s1 (dedicated)
Savecore directory:/var/crash/server1
Savecore enabled: yes

4. Add the VxVM swapvol as the swap device:

# swap -a /dev/vx/dsk/bootdg/swapvol
# dumpadm
     Dumpcontent: kernelpages
     Dumpdevice: /dev/dsk/c0t0d0s1 (dedicated)
Savecore directory:/var/crash/server1
Savecore enabled: yes

Note:  At this point the condition of having a dedicated dump device and having a VxVM swapvol as a swap device is reproduced

5. vxswapctl will change the dumpadm flag from 'dedicated' to 'swap'. This protects against savecore -L causing corruption of swap.

# /etc/vx/bin/vxswapctl set/dev/dsk/c0t0d0s1
#dumpadm
     Dumpcontent: kernelpages
     Dumpdevice: /dev/dsk/c0t0d0s1(swap)
Savecore directory:/var/crash/server1
Savecore enabled: yes


6. Note that when dumpadm "Dump device" appears as (swap), then savecore -L will correctly abort when trying to copy the memory contents to the device already being used for swap.

# savecore-L
savecore: dedicated dump device required

7. Alternatively, a reboot from Step 4. will execute the /etc/init.d/vxvm-startup2 startup script.