From owner-freebsd-virtualization@freebsd.org Fri Nov 20 13:05:26 2015 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA626A32EB1 for ; Fri, 20 Nov 2015 13:05:26 +0000 (UTC) (envelope-from john@potato.growveg.org) Received: from potato.growveg.org (potato.growveg.org [62.49.247.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B09761F43 for ; Fri, 20 Nov 2015 13:05:26 +0000 (UTC) (envelope-from john@potato.growveg.org) Received: from john by potato.growveg.org with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1ZzlNT-000O7y-M7 for freebsd-virtualization@freebsd.org; Fri, 20 Nov 2015 13:05:23 +0000 Date: Fri, 20 Nov 2015 13:05:23 +0000 From: John To: freebsd-virtualization@freebsd.org Subject: Re: adding diskspace to a bhyve instance Message-ID: <20151120130523.GA46962@potato.growveg.org> Reply-To: freebsd-virtualization@freebsd.org Mail-Followup-To: freebsd-virtualization@freebsd.org References: <20151119172034.GA93977@potato.growveg.org> <564E263A.3030106@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <564E263A.3030106@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 13:05:27 -0000 On Thu, Nov 19, 2015 at 02:42:50PM -0500, Manas Bhatnagar wrote: >On 19/11/15 12:20 PM, John wrote: >> Hello list, >> >> What's the best way of increasing the space of a bhyve guest instance? >> Would it be via growfs? Inside or outside of the vm? Or would it be >> better to truncate another chunk of space and refer to it in /etc/fstab? >> >> thanks, > >Hello John, > >- Do you use virtio-blk (a file created with 'truncate') or ahci-hd (A >ZFS filesystem, for example) for your guest disk? You have to increase >the space of the virtual disk that bhyve uses. > - If you used 'truncate', my guess is that you can use truncate to >create a new file of larger size. Then, boot into a livecd in bhyve with >both disks and do a 'dd' from one disk to the other. I have tried to >'dd' between files on the host but that didn't seem to work. > - If it is a ZFS filesystem, create a new filesystem with 'zfs create >-V 50gb zroot/new-volume/' then use a 'zfs send ... | zfs receive ...' > >- Are these FreeBSD guests (and which filesystem - UFS or ZFS) or Linux >guests? > - If these are FreeBSD guests running UFS, look at >https://www.freebsd.org/doc/handbook/disks-growing.html > - If these are FreeBSD guests running ZFS, you can probably create the >filesystems on your new disk and then use zfs send & receive > - If these are linux guests, you will have to use a livecd and >something like 'gpart'. Hello Manas The host runs ZFS on FreeBSD-10.2-STABLE. The FreeBSD guests (10.2 and 11-) run UFS. The Linux guests run Ubuntu 14.04-server on ext4. All the guest disks were created using truncate. Thanks for the links, it's what I was looking for. -- John