From owner-freebsd-questions@FreeBSD.ORG Wed Dec 24 09:27:47 2014 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from chateau.d.if (localhost [IPv6:::1]) by hub.freebsd.org (Postfix) with ESMTP id 4C5087FF; Wed, 24 Dec 2014 09:27:46 +0000 (UTC) Received: from chateau.d.if (chateau.d.if [IPv6:::1]); by chateau.d.if (OpenSMTPD) with ESMTP id 7125049e; Wed, 24 Dec 2014 14:57:44 +0530 (IST) From: ashish@FreeBSD.org (Ashish SHUKLA) To: kpneal@pobox.com Subject: Re: zvol vs plain file for VMs Organization: The FreeBSD Project References: <54947594.2060202@gmx.com> <86mw6ilvyf.fsf@chateau.d.if> <549801AF.5000208@gmx.com> <86fvc7my1o.fsf@chateau.d.if> <20141223031411.GA752@neutralgood.org> X-Face: )vGQ9yK7Y$Flebu1C>(B\gYBm)[$zfKM+p&TT[[JWl6:]S>cc$%-z7-`46Zf0B*syL.C]oCq[upTG~zuS0.$"_%)|Q@$hA=9{3l{%u^h3jJ^Zl; t7 X-Uptime: 2:34PM up 15:15, 17 users, load averages: 0.22, 0.12, 0.11 X-Operating-System: FreeBSD/FreeBSD 10.1-RELEASE/amd64 X-OpenPGP-Fingerprint: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 X-Attribution: =?utf-8?B?4KSG4KS24KWA4KS3?= Organisation: The FreeBSD Project X-Hashcash: 1:20:141224:kpneal@pobox.com::U9MmEeRkaQUIuKMY:018aq X-Hashcash: 1:20:141224:freebsd-questions@freebsd.org::qC2MoXJhGF9WGEWt:0000000000000000000000000000000005h2 X-Hashcash: 1:20:141224:nvass@gmx.com::MgEQx9R0gt+/dFqQ:00005QQo Date: Wed, 24 Dec 2014 14:57:44 +0530 In-Reply-To: <20141223031411.GA752@neutralgood.org> (kpneal@pobox.com's message of "Mon, 22 Dec 2014 22:14:11 -0500") Message-ID: <86zjads8hb.fsf@chateau.d.if> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (amd64-portbld-freebsd10.1) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEWpqal/f39tbW1jY2Md HR2goKCenp6UlJROTk7////9/f35+fnT09ORJdieAAACVklEQVQ4jXXUP2vbQBQA8AvUTkgz5OzY Z0iGWhpS6BSrkECn0mvx0MEJ6AjtYrfoBCVDlD8naJYmNlRfwZq8+mkKlIZaGpJSYmP7Q/XkJDrJ Td8i/H68u3vHPaPufwLdf32AMA4A6GcAgvAamY1pOJiDIFqicTwLswDhfr3uxfFtkAY/GFHPMwzD 8zpnACmIOnE6js7rQb+v4NJrG9od0C+QgpHMy5jBewV+UDSMWiw1Y4fWfyV7+NGFzDsYa3pth9LJ Q4XvXxFHcJRvHOmygn5NAEabnDcQQguarnfoiwSCJ99jmKKcphsZONmWsDK9Ro7cvZOCtQdg8nje egLhc2LNlkLmsezzTFUUy5w18ocox/f0LaLgJy0zO75zk+9pp85GAj36xjqhdI0y3tq2m4dqqcWX zQWBTz8L1irvolXV4J+3q7eCDgVnttjNq6X8H+9KOZsuNk1uCzx8pSp+E9HImfJOTLdcGqo+YKnG EIovizkEn48V7BO+ch2DXcD4ENSpWiU+q8hjjbgTBZCXnZtyj0Ws4Q1Q0B2WXFtYZo65Bbyeeldw RS6qFueM80LlLA29YlVwGRYvFD+kwI/0O+A2PlpOP9GwslUVciHuYGechuBTp922YiDZCrghTknm XSyOM+D3aoRZlo0Jb42zY7DN4p2x4AeZ+QAYutx1sHwTHzMT5cMNduQ9yW3GczN4KZ86kb0c9O8T yXDeFqpl2fryPEAYGXIlezAPXYh2NgVr/gvdoHIuDwuPwOhcWE8f8mmICq41eATkn8x0kuRTIKcB wE9+/QUtiiAnYcaN7wAAAABJRU5ErkJggg== MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Cc: Nikos Vassiliadis , freebsd-questions@FreeBSD.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 09:27:47 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 22 Dec 2014 22:14:11 -0500, kpneal@pobox.com said: | On Mon, Dec 22, 2014 at 10:17:31PM +0530, Ashish SHUKLA wrote: || On Mon, 22 Dec 2014 12:34:07 +0100, Nikos Vassiliadis sa= id: ||=20 ||=20 || | On 12/20/14 06:41, Ashish SHUKLA wrote: || || On Fri, 19 Dec 2014 19:59:32 +0100, Nikos Vassiliadis = said: || || | Hi, || ||=20 || || | I have to convert a mail server to a VM and I don't know what kind = of || || | storage to use, a plain file or a zvol? || ||=20 || || | Are there any pros in using ZVOLs instead of plain files? || ||=20 || || | Thanks, Nikos || ||=20 || || I don't use FreeBSD for VMs, but theoretically plain file will have f= ilesystem || || overhead which ZVOL won't. || ||=20 || || HTH || ||=20 ||=20 || | Hi, ||=20 || | Thank you for your reply Ashish! ||=20 || | When you say overhead, you mean overhead on disk or in RAM? could you || | explain a bit more? ||=20 || Overhead as in, read/writes to file will go through filesystem driver to= block || devices, which involves traversing filesystem structures, compared to ZV= OL || which is likely to be contiguous and is exposed as a block device. | Wait, is that correct? I doubt it. | A zvol is created with the 'zfs' command. The man page doesn't say it | allocates space up front, but rather it says it sets a reservation. This | is probably the same meaning of reservation that is used for normal datas= ets. | It doesn't allocate space on disk, but instead makes a note about basical= ly | quotas for future allocations of space. | Furthermore, for the space on disk to be contiguous it must not be COW. | But ZFS is a COW filesystem. It cannot be both COW and contiguous in use. | Also, if a zvol bypasses the filesystem code then it wouldn't make sense | for zvols to be managed with the 'zfs' command. The zpool command would | make more sense since zpool operates at a lower level than the zfs comman= d. | The practical upshot of all of this is to say that I don't know what the | benefit is, but I also would not put any money on the previous response's | correctness. It can't as simple as described. Sorry, I confused with ZVOLs with LVM LVs, and misunderstood COW's implication. My since apologies for the incorrect reply. Thanks for clarifying it. =2D-=20 Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 Sent from my Emacs --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJUmocQAAoJEMdGz6nnT6SwoGUP/17YC74zur2Flv6IA3becBcY /AZQENJSPqKmg+MpUa/t7AQX8/4VsBA/7mBO8Bra45L3O+x3bXaWa+30XbFFt3YP 8qtBl03sSuWjfd+L/Doe42ab73bDNzcYAn6yuBfSfMdIkHw6KMlFCLUrZS38wB89 bbE5ELF+JFNkQbU9g0NE7uZ5C4p6EAHAyt/j7GInNBeFQcsLKTt5NRUW/yHAg983 J00pC07YDtOSuiOriFgjFO131ttlOj4OvxxpXvgDna1Bl0m3oGIJr+7s/ogC/JT7 aGRK1DyZs6QV6GGBOiHLIUKKnJwRrhWZz3TiC84WW8/yJiAMdNap7SjvykOcCDSb 6cNWEZxupDBwcw3j48d0P0QkfWs+Ufm7X1Uw1v+jUMLC+RFHoyMGkEfPBN29zURC QTqZeHMHkqYxbWRB9mEJDSWCbUL15YcXBKf5+U8AHB1ulOjlRAmLfvR185sibhrl SNLjFsULtwWGQerXDaS2yznHJk5bBKIKd3tC+D4CPq75BbnuoFI8OIkU9zIziyJ4 9tv6FXDESNwUCY2dFGTgPyoqQYg+UXJnOwBnBvrBRmcG6GSxpQk6XXaAcHvXh3b4 U+UTP1fLirXkIXiaAnrNZSkXFZ/3dF+M1/rWwicyEpxfA/G896vNimrh6mEqA46B 7xZQjOkAF8SkBuszkNa8 =Jg/u -----END PGP SIGNATURE----- --=-=-=--