tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

dump to cgdNb device



Hi,

I setup an encrypted disk cgd1 (aes-cbc 256 on top of wd0g, disklabel
verification) with a dump device cgd1b but I can't dump to it (I enter
ddb and type sync to dump). It prints "device bad".

If I enable CGDDEBUG and set cgddebug to 1, it prints some additional
information (typing from a photo):

dumping to dev 20,17 (offset=215879, size=3119109):getcgd_softc(0x1411): unit =
1
cgdsize(0x1411)
cgdopen(0x1411, 0)
getcgd_softc(0x1411): unit = 1
cgdclose(0x1411, 0)
getcgd_softc(0x1411): unit = 1

dump cgddump(0x1411, 215879, 0xffff8000d6c3e000, 4096)
getcgd_softc(0x1411, unit = 1
device bad

With more verbose debugging it can hang instead of printing "device
bad". For example, if I set cgddebug to 4 and mount cgd1e

dumping to dev 20,17 (offset=215879, size=3119109):getcgd_softc(0x1411): unit =
1
cgdsize(0x1411)
cgdopen(0x1411, 0)
getcgd_softc(0x1411): unit = 1
getcgd_softc(0x1413): unit = 1
cgdstrategy(0xfffffe836f63b5a8): b_bcount = 512
cgd_diskstart(x0fffffe836f85cd08, 0xfffffe836f63b5a8)


Is it expected to work at all?

I'm running:

NetBSD neva 7.99.30 NetBSD 7.99.30 (GENERIC) #0: Sun May 29 20:24:03 BST
2016
alnsn@nebeda.localdomain:/home/alnsn/netbsd-current/clean/src/sys/arch/amd64/compile/obj/GENERIC
amd64

wd0 disklabel (cgd1 is on wd0g):
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   1049328 134219776     4.2BSD   1024  8192     0  # (Cyl. 133154*- 134195*)
 b:  25168752 135269104       swap                     # (Cyl. 134195*- 159164*)
 c: 365898416 134219776     unused      0     0        # (Cyl. 133154*- 496148)
 d: 500118192         0     unused      0     0        # (Cyl.      0 - 496148)
 e:  33554432      2048 Linux Ext2      0     0        # (Cyl.      2*-  33290*)
 f: 100663296  33556480 Linux Ext2      0     0        # (Cyl.  33290*- 133154*)
 g: 339680336 160437856     4.2BSD   2048 16384     0  # (Cyl. 159164*- 496148)

cgd1 disklabel:

#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   1048576         0     4.2BSD   1024  8192     0  # (Cyl.      0 -    511)
 b:  25168752   1048576       swap                     # (Cyl.    512 -  12801*)
 d: 339680336         0     unused      0     0        # (Cyl.      0 - 165859*)
 e:   6292188  26217328     4.2BSD   2048 16384     0  # (Cyl.  12801*-  15873*)
 f: 227059614  32509516     4.2BSD   2048 16384     0  # (Cyl.  15873*- 126742*)
 g:  41943040 259569130     4.2BSD   2048 16384     0  # (Cyl. 126742*- 147222*)
 h:  33554432 301512170     4.2BSD   2048 16384     0  # (Cyl. 147222*- 163606*)
 i:   2516582 335066602     4.2BSD   2048 16384     0  # (Cyl. 163606*- 164835*)
 j:   1048576 337583184     4.2BSD   1024  8192     0  # (Cyl. 164835*- 165347*)
 k:   1048576 338631760     4.2BSD   1024  8192     0  # (Cyl. 165347*- 165859*)

Thanks,
Alex


Home | Main Index | Thread Index | Old Index