Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2002 00:43:51 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Daniel O'Connor <doconnor@gsoft.com.au>
Cc:        Patrick Thomas <root@utility.clubscholarship.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: possible to expand a file for vn-device FS usage ?
Message-ID:  <3D5B5BB7.BC424E72@mindspring.com>
References:  <20020815002812.S58763-100000@utility.clubscholarship.com> <1029397652.36834.88.camel@chowder.gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel O'Connor wrote:
> On Thu, 2002-08-15 at 17:04, Patrick Thomas wrote:
> > Any suggestions on how to expand that file without doing the dump/restore
> > steps ?
> 
> man 8 growfs perchance? :)

You can unmount it, grow the underlying file with:

	dd if-/dev/zero bs=XXX,count=XXX >> filename

and *THEN* use growfs(8) on it.

Doing this will leave the allocation layout in the same state
that it is at present, so the bottom half of the FS will end
up fragmented, even though there is free space at the top (FS
growing does not equally redistribute the FS content into the
newly enlarged space).

The best approach is the same as it would be for a device:
dump and restore the FS from the old image to the new.  In
the vn device case, you could just create a new empty FS of
the necessary size, and dump from the old piped to a restore
of the new.

If you can live with the internal fragmentation, use growfs(8);
if you can't, use dump/restore.  IMO, you will have less
potential for future problems if you use dump/restore.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D5B5BB7.BC424E72>