Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: growfs(8) for NetBSD



On Fri, 28 Mar 2008, Juan RP wrote:
On Fri, 28 Mar 2008, Juan RP wrote:
I've just adapted growfs(8) from OpenBSD (they adapted the FreeBSD code),
which is able to grow FFSv1 and FFSv2 filesystems.

I tested growing a partition in FFSv1 and FFSv2 from 1GB to 4GB and the
process was smooth (and fast); after this I ran 'fsck_ffs -yf /fs' and it
found one error that was fixed correctly.

I didn't find any error, so I'd think it should be safe to use it
everywhere. Also please note that I only tried it on i386, perhaps it needs
changes for BE and/or LP64 archs.

http://www.netbsd.org/~xtraeme/growfs-20080328.tar.gz

Please review and/or test it, thanks!

I've not tested it yet, but it appears that the -y flag (expert mode)
doesn't quite behave as documented as it doesn't check that the filesystem
is not mounted (but it does check for an active snapshot which isn't
documented either).

No, that's not right. The -y flag *supresses* this check and others:

That's not quite what I meant...

I can't see a check for whether it is mounted that is skipped by ExpertFlag being 1, i.e. -y doesn't skip the check for whether it is mounted. In fact, I can't see the check at all.

And the snapshot code is in an ifdef FSMAXSNAP code, so it's built by
default.

In your later mail you say you mean NOT built. But it includes
<ufs/ffs/fs.h> which defines FSMAXSNAP.

--
Stephen



Home | Main Index | Thread Index | Old Index