Subject: ddb: sync does not dump...
To: None <netbsd-help@netbsd.org>
From: Jukka Salmi <jukka-netbsd@2004.salmi.ch>
List: netbsd-help
Date: 05/27/2004 09:25:25
Hi,

on a current i386 system I have two disks (wd0 and wd1). Each of them
has a NetBSD MBR partition. The disklabels look like:

$ disklabel wd0
[...]
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  10489106     80325     4.2BSD   2048 16384 28120  # (Cyl.     79*-  10485*)
 b:   4194304  10569431       swap                     # (Cyl.  10485*-  14646*)
 c:  14683410     80325     unused      0     0        # (Cyl.     79*-  14646*)
 d: 120103200         0     unused      0     0        # (Cyl.      0 - 119149)
[...]

$ disklabel wd1
[...]
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   2097648  16787925     4.2BSD   1024  8192 45608  # (Cyl.  16654*-  18735*)
 b:   2097648  18885573       swap                     # (Cyl.  18735*-  20816*)
 c:  62926605  16787925     unused      0     0        # (Cyl.  16654*-  79081*)
 d: 120103200         0     unused      0     0        # (Cyl.      0 - 119149)
 e:   4195296  20983221     4.2BSD   1024  8192 46616  # (Cyl.  20816*-  24978*)
[...]

$ mount
/dev/wd1a on / type ffs (local)
/dev/wd0a on /var type ffs (local)
/dev/wd1e on /usr type ffs (local)
[...]

$ swapctl -l    
Device      512-blocks     Used    Avail Capacity  Priority
/dev/wd1b      2097648        0  2097648     0%    0

$ swapctl -z                                                                   
dump device is wd0b

$ grep 'wd[01]b' /etc/fstab  
/dev/wd1b       none            swap    sw              0 0
/dev/wd0b       none            swap    dp              0 0


Using wd0b as the kernel dump device doesn't seem to work. If I drop into
ddb and issue a 'sync', no crash dump is written, and the machine is not
rebooted:

db> sync
syncing disks... done

dumping to dev 0,1 offset 3146535
[ ... nothing happens ... ]


However, if I use wd1b as the dumpdev everything works fine, ddb sync writes
a crash dump and the machine gets restarted.


What do I have to change to successfully use wd0b as the dump device?

TIA, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~