Date: Wed, 8 Feb 2017 10:24:14 -0500 From: Allan Jude <allanjude@freebsd.org> To: freebsd-virtualization@freebsd.org Subject: Re: Resizing ZVOL used for bhyve VM. Message-ID: <495d71a8-b4e0-fe9a-401f-a2ef607fbd3d@freebsd.org> In-Reply-To: <cbf9bb34ae4114d68af96b5a5fc25ae1@dweimer.net> References: <cbf9bb34ae4114d68af96b5a5fc25ae1@dweimer.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NRKki6sE5eHJ51tEDCnfRxLntOKqUXSII Content-Type: multipart/mixed; boundary="ST0430dag10TShac4gS6VI0nca4Xdp1dg"; protected-headers="v1" From: Allan Jude <allanjude@freebsd.org> To: freebsd-virtualization@freebsd.org Message-ID: <495d71a8-b4e0-fe9a-401f-a2ef607fbd3d@freebsd.org> Subject: Re: Resizing ZVOL used for bhyve VM. References: <cbf9bb34ae4114d68af96b5a5fc25ae1@dweimer.net> In-Reply-To: <cbf9bb34ae4114d68af96b5a5fc25ae1@dweimer.net> --ST0430dag10TShac4gS6VI0nca4Xdp1dg Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017-02-08 00:23, Dean E. Weimer wrote: > I am trying to resize a secondary data disk on a Debian Linux Virtual > machine. The data really isn't all that important, its video from IP > security cameras. Since nothing has happened that needs reviewed I coul= d > scrap it and start over. However I can't even do that. >=20 > I tried just setting the volsize to a larger value while the vm is > shutdown. zfs excepts the command, I boot up the VM but it is not > recognizing the volume properly I can see that its grown, but it errors= > trying to update the GPT partition table with the new size. I gave up > shutdown VM and tried to delete the zvol so I could create a new one. > However it believes the zvol is in use and wont let me destroy it. So > something funky seems to be going on. oddly enough I set the zvol back > to the original size boot up the vm, all the data is intact and > functioning just fine. So somehow I can't break it despite doing all > kinds of things that could have and probably should have destroyed the > data. >=20 > I am going to guess the only thing I have left to try is disable vms on= > startup and reboot to see if I can then destroy the zvol and create a > new larger one. But I was hoping someone else might have another > suggestion to correctly increase the volume size. >=20 Make sure you actually destroy the bhyve vm, not just shut it down. You may also be having issues where GEOM on the host has locked the device when it saw the disk resize. You likely want to have the zfs property 'volmode' set to 'dev', instead of the default 'geom', to prevent this when using bhyve. I'd recommend, with the bhyve 'destroyed' (the instance, not your data), gpart recover zvol/path/name To rewrite the backup copy of the GPT table at the new end of the drive. Then try booting the VM again. --=20 Allan Jude --ST0430dag10TShac4gS6VI0nca4Xdp1dg-- --NRKki6sE5eHJ51tEDCnfRxLntOKqUXSII 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) iQIcBAEBAgAGBQJYmzgfAAoJEBmVNT4SmAt+KjgP/1oOk8s0Y8X2F86wJ2/1DkJ9 5gUp0LSKFrkRkf4+YfunUoujJzGkJyelnkwYOASMG6230XJjs7wnPISFIq8WJIwV GOK/PWY1cnNdYhHEDiYJQOtDs9vrXMIFtiSMXcERrlSN2EjPd2qdj6sGZphxRU/g c/Jxak3wxkuLxkHmk+Muh5bvR4ufsf1ogKuTL2+0aIUY8W2M35rUm/3MNbtiT7Cr qJ7cZUcJJSHHlpMpopaLpGuJj0XraqUfUTPI+MMV8WLLgViR7qMBcHTvcIA00qZD EAjg2kLJQB3dNWAGU7bfDXXsK6dKVpn/ZXWmHY0Rk+t3unChS32KYwiLrhOFYmQX Vn55QR3hK1KugmbbiPzJFlCLASYT80FUUUrSeZ/XFdEpZ6qM3t6UQxfI9HKs/8t8 nDanZKzGjripyMR6hjcMInQoqrJaKql1y/LoE+M22xyyHkR+ZCukZaP5RgGJSwmF b1jzhPtaSM+w1AIRc8ziYTijdDAKqFcbiFDwoVNkB9+XIowYQDiLBxsOC4hxME5x PVNFaRXmBLqHxbDluuSVnuT8kZjATXem4qVjmgG/O22mXPAh+ncgPWtIFzPAbkPj ITHjLFRXzbf3fx1BYo15cbkv8gw3GOBRF4jqPzVpONqIXHgWETtF3JX2FJfAF+F9 +kPIw8zEwIKBIYwWhXt/ =lir2 -----END PGP SIGNATURE----- --NRKki6sE5eHJ51tEDCnfRxLntOKqUXSII--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?495d71a8-b4e0-fe9a-401f-a2ef607fbd3d>