[OmniOS-discuss] ufsdump/ufsrestore: Segmentation Fault ?

Dan McDonald danmcd at omniti.com
Sat Nov 29 02:05:39 UTC 2014


Wow.  I didn't know anyone still used UFS.  (Perhaps to restore prior to migration to ZFS?)

Wait a minute...


> root at kayak:/tmp# zfs create -V 100m rpool/test
> root at kayak:/tmp# newfs /dev/zvol/rdsk/rpool/test
> newfs: construct a new file system /dev/zvol/rdsk/rpool/test: (y/n)? y
> Warning: 4130 sector(s) in last cylinder unallocated
> /dev/zvol/rdsk/rpool/test:      204766 sectors in 34 cylinders of 48 tracks, 128 sectors
>        100.0MB in 3 cyl groups (14 c/g, 42.00MB/g, 20160 i/g)
> super-block backups (for fsck -F ufs -o b=#) at:
> 32, 86176, 172320,


I'm not sure if we support UFS on zvols officially.  Having said that... I tried to reproduce your bug with a raw disk, and it fails the same way:


# newfs /dev/rdsk/c5t0d0s0 
newfs: /dev/rdsk/c5t0d0s0 last mounted as /mnt
newfs: construct a new file system /dev/rdsk/c5t0d0s0: (y/n)? y
Warning: 290 sector(s) in last cylinder unallocated
/dev/rdsk/c5t0d0s0:	16760542 sectors in 2728 cylinders of 48 tracks, 128 sectors
	8183.9MB in 171 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
 15831200, 15929632, 16028064, 16126496, 16224928, 16323360, 16421792,
 16520224, 16618656, 16717088
# mount -F ufs /dev/dsk/c5t0d0s0 /mnt
# ufsdump 0f test.dump /mnt
  DUMP: Date of this level 0 dump: November 28, 2014 09:03:39 PM EST
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c5t0d0s0 (danmcd-oi:/mnt) to test.dump.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 32 Kilobyte records
  DUMP: Estimated 604 blocks (302KB).
  DUMP: Dumping (Pass III) [directories]
  DUMP: Dumping (Pass IV) [regular files]
  DUMP: 574 blocks (287KB) on 1 volume at 17937 KB/sec
  DUMP: DUMP IS DONE
# ufsrestore ifv ./test.dump
Verify volume and initialize maps
Media block size is 126
Dump   date: November 28, 2014 09:03:39 PM EST
Dumped from: the epoch
Level 0 dump of /mnt on danmcd-oi:/dev/dsk/c5t0d0s0
Label: none
Extract directories from tape
Initialize symbol table.
Segmentation fault
# 

It fails in the function lookupparent():

	http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/backup/restore/symtab.c#191

I don't claim to begin to know how this crufty code works, especially as its change history comes from pre-OpenSolaris, never mind anything in Illumos.

Sorry I can't be of more immediate assistance, however.

Dan



More information about the OmniOS-discuss mailing list