Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 99 9:14:33 PDT
From:      Ken Harrenstien <klh@us.oracle.com>
To:        freebsd-fs@freebsd.org
Cc:        klh@us.oracle.com
Subject:   When is a FFS not a FFS?
Message-ID:  <CMM.0.90.4.925488873.klh@churchy20.us.oracle.com>

next in thread | raw e-mail | index | archive | help
I'm a relative newcomer to FreeBSD/NetBSD and have run into some
problems with the filesystem code that have me both puzzled and
concerned.  Hopefully this is the appropriate list and someone can
quickly set me straight.

I have a number of large disks with UFS filesystems and data generated
by non-BSD systems such as Alpha Digital Unix and SPARC Solaris.  So
far I've been able to directly mount and use Alpha D/U drives under
both NetBSD/i386 and NetBSD/Alpha, and this has been a TREMENDOUSLY
useful capability.  (I've also noticed with admiration that the NetBSD
filesystem code includes provision for detecting and handling byte
swapping, which I'm hoping will permit me to eventually use SPARC
drives as well.)

However, to my surprise this doesn't work for FreeBSD/i386 (at least
the 3.1-RELEASE version I have), and I'm not sure why.  The magic
numbers are the same and the structures look the same, but any attempts
to mount simply fail:

	# mount /dev/da5a /mnt
	mount: /dev/da5a on /mnt: incorrect super block

Trying to examine the disklabel typically gives:

	# disklabel da5
	disklabel: ioctl DIOCGDINFO: Invalid argument

But if I instead use "disklabel -r da5" it *does* read and print the
correct disklabel information.

My current theory (wild guess) is that for some reason the disklabel
information from the disk is never taking up residence in the system
proper, which means any reference to the [a-h] partitions will return
bogus data.  And that reason probably has something to do with
interference by whatever code handles the DOS partition ("slice") table
from the boot sector; possibly an unfortunate artifact of PC-centricism.

Or is FreeBSD FFS really different from NetBSD FFS?  D/U UFS?  Why is
there a ufs/ffs/* and ufs/ufs/* if according to the doc they're the same?
I'm lost.

I have enough disk backup that I'm willing to help alpha-test any fixes
that might be forthcoming.  I do hope I'm not the only one who thinks
filesystem compatibility is an incredibly handy and useful feature...

Thanks for any info!
--Ken


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CMM.0.90.4.925488873.klh>