From owner-freebsd-current Thu Jan 9 15:29:47 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 182FD37B401; Thu, 9 Jan 2003 15:29:45 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03FE843ED8; Thu, 9 Jan 2003 15:29:44 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h09NTh2G018555; Thu, 9 Jan 2003 15:29:43 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id h09NTh9b001228; Thu, 9 Jan 2003 15:29:43 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id h09NTh6Y001227; Thu, 9 Jan 2003 15:29:43 -0800 (PST) Date: Thu, 9 Jan 2003 15:29:43 -0800 From: Marcel Moolenaar To: current@FreeBSD.org Cc: gordon@FreeBSD.org Subject: Superblock layout hosed on LP64 systems [was: Re: HEADS UP: VFS changes breaks GPT] Message-ID: <20030109232943.GA1189@athlon.pn.xcllnt.net> References: <20030109091230.GA4320@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030109091230.GA4320@dhcp01.pn.xcllnt.net> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jan 09, 2003 at 01:12:30AM -0800, Marcel Moolenaar wrote: > > GPT based systems are unable to mount the root file system. I > haven't had the time to dig into this, but we must be making > assumptions we previously didn't make. In any case ia64 is > hosed. More to come... Ok, after digging a bit I noticed that the super block layout has changed in a way that makes it incompatible with previous super blocks. It appears to be the alignment of fs_uuid on revision 1.36 of sys/ufs/ffs/fs.h. Previously: Sizeof superblock=1376 Offset of magic=1372 Now: Sizeof superblock=1384 Offset of magic=1380 This typically results in not being able to fsck the file system with a post-change fsck on a pre-change kernel and not being able to mount the file system with a post-change kernel. The following patch fixes the problem (and fixes the misuse of uuid for something that is not universally unique): Index: fs.h =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/fs.h,v retrieving revision 1.36 diff -u -r1.36 fs.h --- fs.h 8 Jan 2003 22:53:54 -0000 1.36 +++ fs.h 9 Jan 2003 23:23:28 -0000 @@ -117,7 +117,7 @@ * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in * the super block for this name. */ -#define MAXMNTLEN 472 +#define MAXMNTLEN 468 /* * The volume name for this filesystem is maintained in fs_volname. @@ -311,7 +311,8 @@ int8_t fs_old_flags; /* old FS_ flags */ u_char fs_fsmnt[MAXMNTLEN]; /* name mounted on */ u_char fs_volname[MAXVOLLEN]; /* volume name */ - u_int64_t fs_uuid; /* system-wide unique uid */ + u_int64_t fs_swuid; /* system-wide unique id */ + int32_t fs_pad; /* these fields retain the current block allocation info */ int32_t fs_cgrotor; /* last cg searched */ void *fs_ocsp[NOCSPTRS]; /* padding; was list of fs_cs buffers */ -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message