From owner-freebsd-virtualization@freebsd.org Sat Apr 28 10:37:51 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13F80FAA3A5 for ; Sat, 28 Apr 2018 10:37:51 +0000 (UTC) (envelope-from list+org.freebsd.virtualization@io7m.com) Received: from mail.io7m.com (mail.io7m.com [IPv6:2001:19f0:5:752:f000::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.io7m.com", Issuer "arc7 CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B342E801B8 for ; Sat, 28 Apr 2018 10:37:50 +0000 (UTC) (envelope-from list+org.freebsd.virtualization@io7m.com) Received: from almond.int.arc7.info (unknown [IPv6:2a02:390:7502:2:0:2:4:0]) by mail.io7m.com (Postfix) with ESMTPSA id 9F75331C9; Sat, 28 Apr 2018 10:37:49 +0000 (UTC) Date: Sat, 28 Apr 2018 11:37:48 +0100 From: Mark Raynsford To: Daniel Braniss Cc: freebsd-virtualization@freebsd.org Subject: Re: Read-only view of a ZFS filesystem inside a bhyve guest? Message-ID: <20180428113748.72891422@almond.int.arc7.info> In-Reply-To: References: <20180427174341.03373bc8@almond.int.arc7.info> Organization: io7m.com OpenPGP: id=B84E17747616C6174C68D5E55C1A7B712812CC05; url=http://io7m.com/pgp/B84E_1774_7616_C617_4C68_D5E5_5C1A_7B71_2812_CC05.key MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/NaDD0LvfDH.anCt.7Kvhdwx"; protocol="application/pgp-signature" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 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: Sat, 28 Apr 2018 10:37:51 -0000 --Sig_/NaDD0LvfDH.anCt.7Kvhdwx Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2018-04-28T09:08:42 +0300 Daniel Braniss wrote: > since the clients and the server are sharing the zfs volume, > I=E2=80=99m doing the following: > on the server I did: > zfs create -sV 4G h/root.ro > newfs /dev/zvol/h/root.ro > mount /dev/zol/h/root.ro /mnt > copy a working root image to it. > umount /mnt > the clients then mount it as ro, > the vm conflg file has: > disk0_type=3Dvirtio-blk=E2=80=9D > disk0_name=3D=E2=80=9C/dev/zvol/h/root.ro =E2=80=9D > disk0_dev=3D=E2=80=9Ccustom=E2=80=9D >=20 > one solution to the fact that the root is read-only is to use unionfs (pr= obably nullfs will do too) >=20 > the only problem I have is updating the image. Wow, didn't know this was possible. Is this safe? Two essentially independent operating system instances being able to write to the same zvol? --=20 Mark Raynsford | http://www.io7m.com --Sig_/NaDD0LvfDH.anCt.7Kvhdwx Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWuRO/AAKCRBcGntxKBLM BVWOAP9saddfTN55XrBWM2Oonynt8y77rLrik6uqS7GxSKo3ZgD/e8JN6zcEPWW6 zFGAmQUgUVejemre3j4+Bb6N/Lw2kgk= =NSN+ -----END PGP SIGNATURE----- --Sig_/NaDD0LvfDH.anCt.7Kvhdwx--