Re: bin/51619

From: Lukas Ertl <l.ertl_at_univie.ac.at>
Date: Fri, 9 May 2003 00:00:35 +0200 (CEST)
On Thu, 8 May 2003, Doug Barton wrote:

> On Thu, 8 May 2003, Kirk McKusick wrote:
>
> > The first UFS1 alternate is 32
> > sectors (16K) in from the beginning of the disk. That alternate
> > also remains untouched by UFS2. So, someone manually running
> > fsck will be given the opportunity to look for alternate
> > superblocks and will find that one and *still* end up messing
> > up the filesystem.
>
> Please forgive me if my ignorance about how this stuff actually works
> makes this a foolish question, but it occurs to me that part of the
> problem may be related to the fast newfs code for ufs2. In case I haven't
> been clear, I did actually do this fs ufs1 first, then re-did it in ufs2.

Yes, and that is exactly what leads to the problem. If you would put a
UFS2 fs on a blank, virgin disk, everything is ok (except the possibility
that some random magnetic forces accidentally create a UFS1 magic cookie
at the old UFS1 superblock location :-) ).

> While not a lot of our users will be doing what I did _next_ in terms of
> running a 4.x fsck binary against that ufs2 file system, I think that a
> lot of users will be converting existing ufs1 slices to ufs2.

I think so, too. And it will affect every 4.x binary that tries to do
anything with the superblock (like mounting etc.). Given the possibility
that some users might dual boot 4.x/5.x it's not a very constructed
scenario we have here.

> So, what if we pushed the problem of finding and deleting ufs1 alternate
> superblocks down to the ufs2 newfs code? That way, there is no possibility
> of getting boned by a releng_4 fsck, since it won't find _anything_ that
> it thinks it understands, and will just give up trying, instead of trying,
> and doing the wrong thing.
>
> Am I totally off base here?

No, you're very right, and this is actually what I'm trying to accomplish
with my humble patches :-)

regards,
le

-- 
Lukas Ertl                             eMail: l.ertl_at_univie.ac.at
UNIX-Systemadministrator               Tel.:  (+43 1) 4277-14073
Zentraler Informatikdienst (ZID)       Fax.:  (+43 1) 4277-9140
der Universität Wien                   http://mailbox.univie.ac.at/~le/
Received on Thu May 08 2003 - 13:00:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:07 UTC