Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Nov 2015 23:08:27 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Matt Churchyard <matt.churchyard@userve.net>
Cc:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   Re: adding diskspace to a bhyve instance
Message-ID:  <20151201070827.GZ65715@funkthat.com>
In-Reply-To: <6ee51d8f276a4b259bda009dc863e9e7@SERVER.ad.usd-group.com>
References:  <20151119172034.GA93977@potato.growveg.org> <564E263A.3030106@gmail.com> <6ee51d8f276a4b259bda009dc863e9e7@SERVER.ad.usd-group.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matt Churchyard via freebsd-virtualization wrote this message on Wed, Nov 25, 2015 at 10:18 +0000:
> Of course that's the easy bit. The more dangerous part is resizing the partitions inside the guest (if it's not whole disk ZFS), and then resizing the filesystems. If the disk is GPT partitioned in the guest you will probably have to recover the partition table first, as the secondary copy will no longer exist at the end of the disk. You'll then need to resize the partitions (hopefully the 'main' partition you want to resize is the last on the disk as that'll probably make it easier). Once done you then need to resize the filesystem. For ZFS you can usually just 'zpool online -e'. For UFS you'll need to grow the filesystem as shown in the handbook.

I have written an rc.d script growfs that is in HEAD that makes this
painless...  If you have a single UFS fs, w/ the root as the last
partition/fs on the disk, simply grow the disk, and then you can run
"service growfs start", and it just works...

This will work on any system, not just VMs...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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