From nobody Wed Oct 18 13:42:37 2023 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9X912GZVz4x31W for ; Wed, 18 Oct 2023 13:42:45 +0000 (UTC) (envelope-from SRS0=bnZY=GA=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int-backup.realworks.nl (smtp-relay-int-backup.realworks.nl [87.255.56.188]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9X906wJtz3CS9 for ; Wed, 18 Oct 2023 13:42:44 +0000 (UTC) (envelope-from SRS0=bnZY=GA=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; none Received: from rwvirtual373.colo.realworks.nl (rwvirtual373.colo.realworks.nl [10.0.10.73]) by mailrelayint1.colo2.realworks.nl (Postfix) with ESMTP id 4S9X8s4THrz3xHd; Wed, 18 Oct 2023 15:42:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1697636557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wK88Lh2nJZtwXzPY+gnRp6Y8Q1v+x/7k4n15FX8r9w0=; b=pepkPk0iHzkKR2AHktmPZwq0Pt6OhJXU4oaTW6ZLRyO3KLgmSnd+z2cvo+R9XcmkM8Ifj8 jbhwoETQpUf3sl3qu0bmhexfiSEWQs5USnIzg4JXF0G38BDRlbZB0DNBnRsgFc3Ml2HQk2 aKHQR7/DPsNYe28ApFKSu8YzmQ64nEU6hB3xBtQEwhOYBTCBgXqrtyhNWQrWnnlYGNX8xt neFQULCpSUEtQD9MWJ8a+tOINETimNwjDx93x2St2fAt3qSHPTpbXjU6y3d/mCztFhzEw5 1DUs3dgeHtYvijhzi1G0g/Qhbfvt8EtLEP7/kV+pYi4/PYFvRzcdTcZ5ke/3cg== Received: from rwvirtual373.colo.realworks.nl (localhost [127.0.0.1]) by rwvirtual373.colo.realworks.nl (Postfix) with ESMTP id 43526140327; Wed, 18 Oct 2023 15:42:37 +0200 (CEST) Date: Wed, 18 Oct 2023 15:42:37 +0200 (CEST) From: Ronald Klop To: void Cc: freebsd-fs@freebsd.org Message-ID: <1733602178.6691.1697636557003@localhost> In-Reply-To: References: Subject: Re: free space considerations writing bhyve image to a zvol List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6690_1862543576.1697636556997" X-Mailer: Realworks (675.202) X-Originating-Host: from (89-20-164-210.static.ef-service.nl [89.20.164.210]) by rwvirtual373 [10.0.10.73] with HTTP; Wed, 18 Oct 2023 15:42:37 +0200 Importance: Normal X-Priority: 3 (Normal) X-Originating-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/118.0 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:38930, ipnet:87.255.32.0/19, country:NL] X-Rspamd-Queue-Id: 4S9X906wJtz3CS9 ------=_Part_6690_1862543576.1697636556997 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit You can test how much it will compress your linuxvm.img. $ [/tmp] ls -l ./bla.txt -rw------- 1 ronald wheel 5242880 Oct 18 15:39 ./bla.txt $ [/tmp] lz4 -c ./bla.txt | wc -c 20604 So do "lz4 -c linuxvm.img | wc -c" and it will print about the size of the zvol you need. NB: What keeps you from just trying to write it to the zvol and see if it works? Regards, Ronald, Van: void Datum: woensdag, 18 oktober 2023 14:58 Aan: freebsd-fs@freebsd.org Onderwerp: free space considerations writing bhyve image to a zvol > > A linux file-backed vm was created initially like this: > > truncate -s 2T linuxvm.img > > Within the vm, df -h reports 1.1Tb used in total. > Externally, on the freebsd host, the linuxvm.img is 2Tb. > > If i write the vm to a 1.6Tb zvol with compression set (lz4), > would it be feasible to expect the vm to work? > > I expect it might break the vm's filesystem internally, > now, thinking about it. > -- > > > > ------=_Part_6690_1862543576.1697636556997 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit You can test how much it will compress your linuxvm.img.

$ [/tmp] ls -l ./bla.txt
-rw-------  1 ronald  wheel  5242880 Oct 18 15:39 ./bla.txt

$ [/tmp] lz4 -c ./bla.txt | wc -c
   20604


So do "lz4 -c linuxvm.img | wc -c" and it will print about the size of the zvol you need.

NB: What keeps you from just trying to write it to the zvol and see if it works?

Regards,
Ronald,

 

Van: void <void@f-m.fm>
Datum: woensdag, 18 oktober 2023 14:58
Aan: freebsd-fs@freebsd.org
Onderwerp: free space considerations writing bhyve image to a zvol

A linux file-backed vm was created initially like this:

truncate -s 2T linuxvm.img

Within the vm, df -h reports 1.1Tb used in total.
Externally, on the freebsd host, the linuxvm.img is 2Tb.

If i write the vm to a 1.6Tb zvol with compression set (lz4),
would it be feasible to expect the vm to work?

I expect it might break the vm's filesystem internally,
now, thinking about it.
-- 
 


  ------=_Part_6690_1862543576.1697636556997--