Subject: NetBSD "dump" output vs. Solaris 9 "ufsrestore"
To: None <port-sparc@NetBSD.ORG>
From: Greg Earle <earle@isolar.DynDNS.ORG>
List: port-sparc
Date: 01/13/2004 20:14:21
It looks like NetBSD's "dump" (1.6.1 version) outputs dump archives
that give the Solaris 9 "ufsrestore" indigestion:

solaris9:1:51 [/export/home] # rsh NetBSD "dump 0usf 100000 - /dev/rsd2f" | \
ufsrestore -dvrf -
Verify volume and initialize maps
  DUMP: Found /dev/rsd2f on /home in /etc/fstab
  DUMP: Date of this level 0 dump: Tue Jan 13 19:03:15 2004
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rsd2f (/home) to standard output
  DUMP: Label: none
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 970580 tape blocks.
  DUMP: Volume 1 started at: Tue Jan 13 19:03:23 2004
  DUMP: dumping (Pass III) [directories]
Volume header
Dump   date: Tue Jan 13 19:03:15 2004
Dumped from: the epoch
Level 0 dump of /home on NetBSD:/dev/rsd2f
Label: none
Starting inode numbers by volume:
        Volume 1:      0
maxino = 262145
Remove mask header
Dump mask header
Begin level 0 restore
Initialize symbol table.
Extract directories from tape
Segmentation fault (core dumped)
solaris9:1:52 [/export/home] #

Never seen a dump | (remote) restore fail like this before.  Any idea why?
Is the output of "dump" so far removed from the way it used to be that
it no longer is recognizable to other UFS/FFS apps like "ufsrestore"?

It fails almost immediately:

write(1, 0x00139550, 30)                        = 30
   E x t r a c t   d i r e c t o r i e s   f r o m   t a p e\n
getpid()                                        = 1042 [1041]
sysconfig(_CONFIG_MAXPID)                       = 30000
lstat64("/tmp/rstdir1074050201.CAaqcc", 0xFFBFF578) Err#2 ENOENT
fstat(-1, 0xFFBFF2B0)                           Err#9 EBADF
openat(-3041965, "/tmp/rstdir1074050201.CAaqcc", O_WRONLY|O_CREAT|O_TRUNC|O_EXCL
|O_LARGEFILE, 0600) = 5
getpid()                                        = 1042 [1041]
lstat64("/tmp/rstmode1074050201.DAaqcc", 0xFFBFF578) Err#2 ENOENT
openat(-3041965, "/tmp/rstmode1074050201.DAaqcc", O_WRONLY|O_CREAT|O_TRUNC|O_EXC
L|O_LARGEFILE, 0600) = 6
getcontext(0xFFBDF3C8)
fstat64(5, 0xFFBDF210)                          = 0
brk(0x00170EE0)                                 = 0
brk(0x00172EE0)                                 = 0
fstat64(5, 0xFFBDF0B8)                          = 0
ioctl(5, TCGETA, 0xFFBDF19C)                    Err#25 ENOTTY
    Incurred fault #6, FLTBOUNDS  %pc = 0x000C8AC0
      siginfo: SIGSEGV SEGV_MAPERR addr=0x0000000C
    Received signal #11, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x0000000C

Conversely, any chance anyone's ported NetBSD's "restore" to Solaris instead?

	- Greg