From owner-freebsd-virtualization@freebsd.org Thu Nov 19 19:42:52 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 4B641A3373B for ; Thu, 19 Nov 2015 19:42:52 +0000 (UTC) (envelope-from b.manas.88@gmail.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10D881D01 for ; Thu, 19 Nov 2015 19:42:52 +0000 (UTC) (envelope-from b.manas.88@gmail.com) Received: by ioir85 with SMTP id r85so100694902ioi.1 for ; Thu, 19 Nov 2015 11:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=0mTPg9Imd6cc8t9RjnQFgZtDAIDHLBLP+XE/K8C73b4=; b=sjwVlsUwzI5y+GIXUZGdSpbLmVduCnyVlOWg65JTJ/LR73zf43az66rMSrRjIAPGAz 8GyDyNMRdgV3p70UlwbVjjlWlijSB2evUFsi/WPYIQl3/66S2/rM+Fhi7VBYHrzheQ+H P+k5BjwcJOc/Aq1l7BtqqQTwvq0BPD0RfpvBMoFP6yBWlag9hFlTaoPhDW89D0RMdkKM E5cdjSBs+2cY7CZsrEkRGmh1K8qM8BzbnOADjwL4N6qLfsbpiBGVs+Cz9J3qyk4RDbpZ bgHf0fuUSFHiwjqSObFK6fUEHvRsF4fFudewrBOnmoXCja14k5QvFyur96x/5xLudp3z rI/Q== X-Received: by 10.107.14.65 with SMTP id 62mr10195654ioo.57.1447962171471; Thu, 19 Nov 2015 11:42:51 -0800 (PST) Received: from [192.168.1.122] ([209.195.113.231]) by smtp.googlemail.com with ESMTPSA id ej5sm12682034igc.2.2015.11.19.11.42.50 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Nov 2015 11:42:51 -0800 (PST) Message-ID: <564E263A.3030106@gmail.com> Date: Thu, 19 Nov 2015 14:42:50 -0500 From: Manas Bhatnagar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: adding diskspace to a bhyve instance References: <20151119172034.GA93977@potato.growveg.org> In-Reply-To: <20151119172034.GA93977@potato.growveg.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: Thu, 19 Nov 2015 19:42:52 -0000 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'. Thanks, Manas