This information presented here is a copy of what is available from sunsolve.sun.com in SRDB 16646 for contract customers created on Mar 29 2000.
Updated: 31 Jul 1999 Problem Description Upon boot, the following message is printed: vxvm: WARNING: No suitable partition from swapvol to set as the dump device. What does this message REALLY mean? ----------------------------------- This message means that Solaris is unable to find a hard partition on a disk drive which it can use to place a core file in the unlikely event of a system crash. This message does NOT mean that there's a problem with the swap area(s) on a system. It only means that if the system were to panic with savecore enabled, it would have no place to write out a core file. That is what a "dump device" is... a place to dump a core. How does Solaris determine which device to use as the "dump" device? -------------------------------------------------------------------- The FIRST device specified in the /etc/vfstab file specified with an "FS type" of type "swap" will be used as the dump device. For example, in the following vfstab file, ----------------------------------------------------------------------------- #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/dsk/c0t0d0s1 - - swap - no - /dev/dsk/c0t1d0s1 - - swap - no - /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - /dev/dsk/c0t3d0s1 - - swap - no - swap - /tmp tmpfs - yes - ----------------------------------------------------------------------------- the device /dev/dsk/c0t0d0s1 will be used as the dump device, because it is the first one listed. What's different when Volume Manager is being used? --------------------------------------------------- Practically, no difference. Like before, the FIRST device listed in the /etc/vfstab file specified with an "FS type" of type "swap" will be used as the dump device. When Volume Manager is being used on the system, the swap device MAY be a volume instead of an actual slice. The following vfstab file illustrates a volume named 'swapvol' as being the "dump device". ----------------------------------------------------------------------------- #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/vx/dsk/swapvol - - swap - no - /dev/vx/dsk/swap2 - - swap - no - /dev/vx/dsk/rootvol /dev/vx/rdsk/rootvol / ufs 1 no - /dev/vx/dsk/moreswap - - swap - no - swap - /tmp tmpfs - yes - ----------------------------------------------------------------------------- The only thing that's REALLY different is that Solaris can't really dump a core to a volume. It HAS to dump the core to a partition (slice). Please read on... OK. If my "first swap device" is a volume, and if Solaris can't dump a core into a volume, where's it going to dump it? ----------------------------------------------------------------------- This is the crux of the problem. Volume manager does something a bit tricky here to get around this restriction. Volume manager looks at the first swap volume in the vfstab file and assumes that there is a real partition (slice) on the disk that overlaps EXACTLY the subdisk of that volume. If it does, then VM sets the dump device to be that partition instead of the volume. If there is no partition on the disk that EXACTLY overlaps the subdisk, you get the warning message when you boot up. Here's an example of a swap volume that has an underlying partition: # vxprint -g rootdg -ht swapvol V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE v swapvol swap ENABLED ACTIVE 246240 ROUND - pl swapvol-01 swapvol ENABLED ACTIVE 246240 CONCAT - RW sd disk07-01 swapvol-01 disk07 0 246240 0 c4t1d3 ENA pl swapvol-02 swapvol ENABLED ACTIVE 246240 CONCAT - RW sd disk05-01 swapvol-02 disk05 246239 246240 0 c2t0d0 ENA According to this 'vxprint', there are two subdisks that MAY qualify as dump devices, because this volume is mirrored on each of these disks. These two disks are c4t1d3 and c2t0d0. Now what we need to do is find out if there is a partition (slice) on either one of those disks that starts at the same location (DISKOFFS) that the subdisk starts at, and is the same length (LENGTH) as the subdisk. Let's look at the layout of the first disk. # prtvtoc /dev/rdsk/c4t1d3s2 * First Sector Last * Partition Tag Flags Sector Count Sector 2 5 00 0 4154160 4154159 3 14 01 0 4154160 4154159 4 15 01 4152640 1520 4154159 Well, there does not seem to be a partition on this disk at all! No need to worry just yet, because this volume is a mirror, and perhaps the other subdisk on the other side of the mirror has a partition. Let's look. # prtvtoc /dev/rdsk/c2t0d0s2 * First Sector Last * Partition Tag Flags Sector Count Sector 0 2 00 0 246240 246239 1 3 01 246240 246240 492479 2 5 00 0 4154160 4154159 3 14 01 0 4154160 4154159 4 15 01 4152640 1520 4154159 5 6 00 492480 410400 902879 6 4 00 902880 563920 1466799 Eureka! Here we can see that there IS a slice (slice 1) which starts at sector 246240 (which matches the DISKOFFS) shown in the 'vxprint' and is exactly 246240 sectors in length. NOTE: The disparity of the offset (note 'vxprint' shows the offset to be 246239, not 246240) can be attributed to the fact that this is an encapsulated boot disk. On encapsulated boot disks, because of the VTOC on the disk, the public area actually starts 1 block (512 bytes) into the disk, so the offset is off by one sector as well. Since Solaris only can have ONE dump device, this will be it, so c2t0d0s1 is set to be the actual dump device. What if you GROW the swap volume? --------------------------------- If you grow the swap volume that appears first in your vfstab file, the 'vxprint' will show that the volume is composed of two subdisks. For example: # vxprint -g rootdg -ht swapvol V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE v swapvol swap ENABLED ACTIVE 492480 ROUND - pl swapvol-01 swapvol ENABLED ACTIVE 492480 CONCAT - RW sd disk01-01 swapvol-01 disk05 246239 246240 0 c2t0d0 ENA sd disk02-01 swapvol-01 disk07 0 246240 0 c3t2d4 ENA It's IMPOSSIBLE to have a hard partition that covers this whole volume, because the volume spans more than one physical drive. There is NO WAY for this volume to be used as a dump device. How can you create a new swap volume to be used as the dump device? ------------------------------------------------------------------- Many System Administrators often find the need to add additional swap to a running system. The Volume Manager software makes it very easy to create a volume to be used as swap; simply create a new volume and then put it into the /etc/vfstab file. However, if you want this new swap device to also be used as the dump device, an extra step is involved: you need to create a hard partition on the disk. For example, if you have created a volume whose 'vxprint -ht' shows: # vxprint -g rootdg -ht newswap V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE v newswap gen ENABLED ACTIVE 4194304 SELECT - pl newswap-01 newswap ENABLED ACTIVE 4197879 CONCAT - RW sd disk16-01 newswap-01 disk16 0 4197879 0 c2t4d0 ENA This means that a real partiton needs to be created on this disk starting at the begining of the public area (DISKOFFS is 0, meaning the beginning of the public area), and is exactly 4197879 sectors long). The Volume Manager command 'vxmksdpart' makes this step easy as well. Simply running this command creates a partition in the correct location on the disk. All you give it is the subdisk name (in this case, it would be 'disk16-01') and an 'unassigned' and unused partition number (for this example, we'll use partition number 0). The hexidecimal notations "0x03 0x01" specify this partiton's tag and flags (0x03 is 'swap' and 0x01 is 'wu'). /etc/vx/bin/vxmksdpart disk16-01 0 0x03 0x01 After running 'format' and creating this new partition, it would look like the following: Part Tag Flag Cylinders Size Blocks 0 swap wu 1 - 1169 2.00GB (1169/0/0) 4197879 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 4923 8.43GB (4924/0/0) 17682084 3 - wu 0 - 0 1.75MB (1/0/0) 3591 4 - wu 1 - 4923 8.43GB (4923/0/0) 17678493 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 See how the 'swap' partition begins at cylinder 1 (same place as the beginning of the public area (slice 4), and that it is exactly 4197879 sectors long. Now, this 2GB volume can be used as a dump device, provided it appears first in the /etc/vfstab file.