Subject: Re: FilesSystem managment (stupid question)
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 09/02/2002 21:36:32
>> before doing the final install of NetBSD on my SS5, I wonder if I
>> can enlarge or reduce the size of a file system "on the fly", like
>> using "vgexpand" on a HP-UX box ?
> No, it's not possible.

I don't know vgexpand, and have no HP-UX handy to check on it.

But depending on what you're willing to accept as "on the fly", I have
something that is probably most of the way there.  It requires that the
filesystem be unmounted, and it works only on FFS filesystems, but
doesn't require doing a backup-and-restore rebuild.

The reason I say it's only _most_ of the way there is that it shows up
a long-standing bug in the FFS code: after running it, something is
slightly corrupt, and after a little use the resulting filesystem
panics the kernel ("ffs_alloccgblk: can't find blk in cyl" is the
NetBSD panic string).  I call this a bug in the FFS code, not in my
code, because fsck is happy with the filesystem when it's in this
state.  I call the bug "long-standing" because it appears in a
basically identical form in SunOS, which means it almost certainly is
in the common BSD ancestor to both SunOS and NetBSD.

Now, one of the NetBSD folk who knows filesystems looked at it and, as
I recall, decided the bug was in fsck.  I'm sure I created a version
that deliberately corrupts the relevant data structure, so you can run
fsck and have it rebuild it, but I have no idea what's become of it.
(Manuel, wasn't that you?  Did you ever do anything further on it?)

Thus, I don't say that it's a solution out of the box.  But if you know
a bit about FFS (or are willing to learn), and want to build such a
tool, it could be a suitable starting point.  Of course, as with
(almost) all my software, I'll be happy to send a copy to anyone who
wants.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B