Date: Thu, 9 Jan 2003 15:29:43 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> 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> In-Reply-To: <20030109091230.GA4320@dhcp01.pn.xcllnt.net> References: <20030109091230.GA4320@dhcp01.pn.xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030109232943.GA1189>