From owner-freebsd-hackers Fri Feb 7 13:50:49 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 017D037B401 for ; Fri, 7 Feb 2003 13:50:48 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7899543F75 for ; Fri, 7 Feb 2003 13:50:46 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id h17LoWve092830 for ; Fri, 7 Feb 2003 21:50:32 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id h17LoW5n092829 for hackers@FreeBSD.ORG; Fri, 7 Feb 2003 21:50:32 GMT Date: Fri, 7 Feb 2003 21:50:32 +0000 From: Matthew Seaman To: hackers@FreeBSD.ORG Subject: Re: Resizing file-backed vnode disklabels Message-ID: <20030207215032.GA92670@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , hackers@FreeBSD.ORG References: <20030207213052.97188.qmail@web12804.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030207213052.97188.qmail@web12804.mail.yahoo.com> User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-3.3 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_MUTT version=2.44 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Feb 07, 2003 at 01:30:52PM -0800, Hans Zaunere wrote: > > Fairly straight forward question I suppose. I'm creating several file-backed > vnode devices on a single physical disklabel to support some jails. If I > start the file at 1gb is it possible to increase the file without losing the > data within it? Would growfs be safe to use? Could I be so bold as to just > tack on 100mb of null chars at the end of the file (I would doubt it, > although it'd be nice). That's doable. You have to re-write the disklabel to correspond to the new size of the backing store, and you need to make sure the fsize, bsize and bps/cpg fields in the disklabel are set to reasonable values in order for growfs(8) to do it's thing. http://www.freebsd.org/cgi/getmsg.cgi?fetch=403393+411791+/usr/local/www/db/text/2002/freebsd-questions/20021006.freebsd-questions Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message