xfs
[Top] [All Lists]

Re: superblocks and lilo

To: Linux XFS <linux-xfs@xxxxxxxxxxx>
Subject: Re: superblocks and lilo
From: Derek James Witt <djw@xxxxxxxxxxxxxx>
Date: 26 Mar 2002 10:32:49 -0600
In-reply-to: <1017158130.5820.39.camel@saiya-jin.flinthills.com>
References: <1017092300.2173.13.camel@saiya-jin.flinthills.com> <1017093184.1748.32.camel@stout.americas.sgi.com> <1017096745.2172.18.camel@saiya-jin.flinthills.com> <1017114614.1754.6.camel@saiya-jin.flinthills.com> <1017153250.19650.31.camel@jen.americas.sgi.com> <1017158130.5820.39.camel@saiya-jin.flinthills.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi, Nathan. ok. That makes perfect sense now. Looks like the mirroring
superblocks is out of the question then. Oh well. :-)

Thanks for the heads up.
On Tue, 2002-03-26 at 09:55, Derek James Witt wrote:
> On Tue, 2002-03-26 at 08:34, Steve Lord wrote:
> > On Mon, 2002-03-25 at 21:50, Derek James Witt wrote:
> > > Hey all.
> > > 
> > > I'm going through the kernel source for XFS and I'm trying to find out
> > > how many superblocks a partition usually has and the maximum it's
> > > allowed to have.  So far in xfs_mount.h, I'm seeing that we are allowed
> > > two superblocks.  I am proposing that we have two consecutive primary
> > > superblocks (duplicates) in use. In other words, mirrored blocks. 
> > > 
> > > So, if lilo or any other boot loader comes along and overwrites a part
> > > of the first superblock, the mounting code can still get at the 2nd sb.
> > > But, the problem is that the size of the superblock I've seen varies
> > > from 512 bytes to 65535 bytes.  In lilo's sources, we got blocks of size
> > > 1024 and sector sizes of 512. Any ideas on what to do on this?
> > > 
> > 
> > Nathan answered some structural details here, but the idea of placing
> > a second super block after the first will not work, the second 512 bytes
> > of the filesystem contain another data structure. In fact there are
> > data structures in the first 2K of disk, then a 2K gap, then regular
> > metadata can start at 4K.
> > 
> > The only fields in the primary superblock which change are the totals
> > of free space and inodes used. These can all be reconstructed with xfs
> > repair.
> > 
> > Thanks for the lilo patch though.
> > 
> > Steve
> > 
> > 
> > -- 
> > 
> > Steve Lord                                      voice: +1-651-683-3511
> > Principal Engineer, Filesystem Software         email: lord@xxxxxxx
> > 
> -- 
> **  Derek J Witt                                              **
> *   Email: mailto:djw@xxxxxxxxxxxxxx                           *
> *   Home Page: http://www.flinthills.com/~djw/                 *
> *** "...and on the eighth day, God met Bill Gates." - Unknown **
-- 
**  Derek J Witt                                              **
*   Email: mailto:djw@xxxxxxxxxxxxxx                           *
*   Home Page: http://www.flinthills.com/~djw/                 *
*** "...and on the eighth day, God met Bill Gates." - Unknown **

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>