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 15:30:09 +0000 (GMT)
Stephen Borrill <> 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.
> >
> >
> >
> > 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:

     -y         Expert mode.  Usually growfs will ask you if you have taken
                 a backup of your data and will test whether special is
                 currently mounted.  The -y flag suppresses this, so use
                 this option with great care!

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

Juan Romero Pardines - xtraeme at gmail|netbsd dot org
        The NetBSD Project

Make your own NetBSD/x86 Live CD:

Home | Main Index | Thread Index | Old Index