From owner-freebsd-questions@FreeBSD.ORG Mon Jul 25 09:47:37 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D84A16A41F for ; Mon, 25 Jul 2005 09:47:37 +0000 (GMT) (envelope-from alexandre.delay@free.fr) Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 067EF43D45 for ; Mon, 25 Jul 2005 09:47:36 +0000 (GMT) (envelope-from alexandre.delay@free.fr) Received: from imp6-q.free.fr (imp6-q.free.fr [212.27.42.6]) by postfix3-2.free.fr (Postfix) with ESMTP id E258CC15D for ; Mon, 25 Jul 2005 11:47:35 +0200 (CEST) Received: by imp6-q.free.fr (Postfix, from userid 33) id 4FDCC260EC; Mon, 25 Jul 2005 11:36:09 +0200 (MEST) Received: from proxy8.sncf.fr (proxy8.sncf.fr [171.16.4.10]) by imp6-q.free.fr (IMP) with HTTP for ; Mon, 25 Jul 2005 11:36:09 +0200 Message-ID: <1122284169.42e4b2893a1eb@imp6-q.free.fr> Date: Mon, 25 Jul 2005 11:36:09 +0200 From: alexandre.delay@free.fr To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 171.16.4.10 Subject: resizing virtual disk (vn0) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2005 09:47:37 -0000 hi, I am searching how to resize a virtual disk created with: # dd if=/dev/zero of=newimage bs=1k count=5k 5120+0 records in 5120+0 records out # vnconfig -s labels -c vn0 newimage # disklabel -r -w vn0 auto # newfs vn0c Warning: 2048 sector(s) in last cylinder unallocated /dev/vn0c: 10240 sectors in 3 cylinders of 1 tracks, 4096 sectors 5.0MB in 1 cyl groups (16 c/g, 32.00MB/g, 1280 i/g) super-block backups (for fsck -b #) at: 32 # mount /dev/vn0c /mnt When I decide to add more space to this virtual disk, I would like to be able to resize it. The only solution I have is creating an other virtual disk and copy files before deleting the first one. It takes a long time and two time more space than what I want during the process. any idea? Cheers Alex