Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 1999 20:26:24 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Ken Harrenstien <klh@us.oracle.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: When is a FFS not a FFS?
Message-ID:  <Pine.BSF.4.05.9904302024040.59263-100000@herring.nlsystems.com>
In-Reply-To: <CMM.0.90.4.925488873.klh@churchy20.us.oracle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Apr 1999, Ken Harrenstien wrote:

> 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...

FreeBSD/alpha will mount UFS filesystems from NetBSD/alpha and OSF1 with
no problems at all. Your problem is that FreeBSD/i386 puts the disklabel
at a different place on the disk from the alpha OSs. On the alpha, the
disklabel is stored at offset 64 in block zero but on FreeBSD/i386, it is
stored at offset zero in block one of the FreeBSD fdisk slice (which can
be anywhere).

I don't think FreeBSD/i386 is going to be sharing disks with different
disklabel policies any day soon.

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037




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?Pine.BSF.4.05.9904302024040.59263-100000>