Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2020 10:01:30 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        freebsd-fs@freebsd.org
Subject:   Re: how to resize a zvol (legacy version of zfs)
Message-ID:  <c94c4089-d423-bfd9-c30d-13144e6f0dbc@freebsd.org>
In-Reply-To: <20200913130321.GJ91422@bastion.zyxst.net>
References:  <20200913121522.GI91422@bastion.zyxst.net> <20200913130321.GJ91422@bastion.zyxst.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--SgZDBmLpeOy27MoMiHsyk6DU3fFV4JRvK
Content-Type: multipart/mixed; boundary="ixOQgHIZNoTctBol5XtgJLqLn3BjZF2bP";
 protected-headers="v1"
From: Allan Jude <allanjude@freebsd.org>
To: freebsd-fs@freebsd.org
Message-ID: <c94c4089-d423-bfd9-c30d-13144e6f0dbc@freebsd.org>
Subject: Re: how to resize a zvol (legacy version of zfs)
References: <20200913121522.GI91422@bastion.zyxst.net>
 <20200913130321.GJ91422@bastion.zyxst.net>
In-Reply-To: <20200913130321.GJ91422@bastion.zyxst.net>

--ixOQgHIZNoTctBol5XtgJLqLn3BjZF2bP
Content-Type: text/plain; charset=windows-1252
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 2020-09-13 09:03, tech-lists wrote:
> On Sun, Sep 13, 2020 at 01:14:55PM +0100, tech-lists wrote:
>> Hi,
>>
>> I have a bhyve instance mounted on a zvol on a freebsd-12-stable host.=

>> I'm not
>> using any special tool to manage the bhyve apart from screen.
>>
>> How can I resize the bhyve instance wihtout making it unusable? The
>> zol is
>> 64GB and I'd like to make it 256GB.
>=20
> As a test, I've successfully resized it on the host. The problem is whe=
n
> the
> guest boots up, the guesnt's growfs (the fs in the guest is ufs) cant
> see the
> space.
>=20
> On the guest I did this:
>=20
> # sysrc growfs_enable=3DYES
> growfs_enable: NO -> YES
>=20
> # reboot
>=20
> then on the host, did this:
>=20
> # zfs get volsize data/current
> NAME=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PROPERTY=A0 VAL=
UE=A0=A0=A0 SOURCE
> data/current=A0=A0=A0=A0=A0=A0=A0=A0=A0 volsize=A0=A0 64G=A0=A0=A0=A0=A0=
 local
>=20
> # zfs set volsize=3D256G data/current
>=20
> # zfs get volsize data/current
> NAME=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PROPERTY=A0 VAL=
UE=A0=A0=A0 SOURCE
> data/current=A0=A0=A0=A0=A0=A0=A0=A0=A0 volsize=A0=A0 256G=A0=A0=A0=A0 =
local
>=20
> log into the guest...
>=20
> # mount
> /dev/vtbd0s1a on / (ufs, local, journaled soft-updates)
> devfs on /dev (devfs)
>=20
> # growfs /
> growfs: requested size 61GB is not larger than the current filesystem s=
ize
> 61GB
>=20
> # gpart recover /dev/vtbd0
> vtbd0 recovering is not needed
>=20
> # gpart resize -i 1 /dev/vtbd0
> GEOM_PART: vtbd0s1 was automatically resized.
> =A0 Use `gpart commit vtbd0s1` to save changes or `gpart undo vtbd0s1` =
to
> revert
> them.
> vtbd0s1 resized
> Sep 13 13:36:31 current syslogd: last message repeated 1 times
>=20
> # gpart commit vtbd0s1
> # # growfs /
> growfs: requested size 61GB is not larger than the current filesystem s=
ize
> 61GB
>=20
> What am I doing wrong?

Look at 'gpart show' but it looks like you have resized vtbd0s1, but
have not yet resized vtbd0s1a (the BSD partition the UFS filesystem
lives in)



--=20
Allan Jude


--ixOQgHIZNoTctBol5XtgJLqLn3BjZF2bP--

--SgZDBmLpeOy27MoMiHsyk6DU3fFV4JRvK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQIcBAEBAgAGBQJfXiZHAAoJEBmVNT4SmAt+mHgP/AuLdkLd0dPq9kHY8BTdNta+
SN6anUZvRO+w7CwU3vjjz//KVBqPuqEdfwRKul+wogqhow69mPL466xwe/I3L6Vj
p/ujHxboply/Jq4uy4YblbhOQUllBeEoEg1DnKVaxRxvCqmjK5uLOYBK/+LHs3Yy
WrrxAZ/VM/0F1xPuWW6zTY+Un27SU5NZqiDtW20jgapzn52tuV7feuUnHf7fBDa+
z7BigUkyBrvUQrJ+rTM7lUtYy6/L42iO3tdhatBNDO8x1TLTfVT4y6MpwMeDHtwO
ysHsCMALypXI0lTM9LQCTHJVI7r+lJ3Nxp8c4dPQdk1pNimyG5Gkh1YK0a519M+i
/LrHVxY2gj6SMvBTSdnGmFjr2oXa53HEmECR4jH5rrX2XZ3GPbOr+rlbEPp8U321
7jRYWgdVCqYUa9so8NS1GPEofpGZrm8LEthFEI6vpup1xgATmezXMsOqDVjJI2pv
PTPQa6izCkVa18trU3nsNrdTadoR3a/NxfShr5DiBlk7VKN8n1JHllv5drDoD34g
BFKvSPFeWm3Mazw0j106Fbc32/WS/cYfGXMDA8LlKrF75XI7XWEo2OfeNsgI2i0k
NLTsLXon8poqqgm3x8tP+7aJnv1Cq2wsneBOn+K8O80m2UUISkt/th61umrklyiH
KVdQSdtmPwvn9wj3uDl8
=tmqB
-----END PGP SIGNATURE-----

--SgZDBmLpeOy27MoMiHsyk6DU3fFV4JRvK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c94c4089-d423-bfd9-c30d-13144e6f0dbc>