Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Oct 2023 15:42:37 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        void <void@f-m.fm>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: free space considerations writing bhyve image to a zvol
Message-ID:  <1733602178.6691.1697636557003@localhost>
In-Reply-To: <ZS_WZD-JlHEo_Em5@int21h>
References:  <ZS_WZD-JlHEo_Em5@int21h>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_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 <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
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head></head><body>You can test how much it will compress your linuxvm.img.<br>
<br>
$ [/tmp] ls -l ./bla.txt<br>
-rw-------&nbsp; 1 ronald&nbsp; wheel&nbsp; 5242880 Oct 18 15:39 ./bla.txt<br>
<br>
$ [/tmp] lz4 -c ./bla.txt | wc -c<br>
&nbsp;&nbsp; 20604<br>
<br>
<br>
So do "lz4 -c linuxvm.img | wc -c" and it will print about the size of the zvol you need.<br>
<br>
NB: What keeps you from just trying to write it to the zvol and see if it works?<br>
<br>
Regards,<br>
Ronald,<br>
<br>
&nbsp;
<p><strong>Van:</strong> void &lt;void@f-m.fm&gt;<br>
<strong>Datum:</strong> woensdag, 18 oktober 2023 14:58<br>
<strong>Aan:</strong> freebsd-fs@freebsd.org<br>
<strong>Onderwerp:</strong> free space considerations writing bhyve image to a zvol</p>

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="TextPlainViewer" id="P.P">A linux file-backed vm was created initially like this:<br>
<br>
truncate -s 2T linuxvm.img<br>
<br>
Within the vm, df -h reports 1.1Tb used in total.<br>
Externally, on the freebsd host, the linuxvm.img is 2Tb.<br>
<br>
If i write the vm to a 1.6Tb zvol with compression set (lz4),<br>
would it be feasible to expect the vm to work?<br>
<br>
I expect it might break the vm's filesystem internally,<br>
now, thinking about it.<br>
--&nbsp;<br>
&nbsp;</div>

<hr></div>
</blockquote>
<br>
&nbsp;</body></html>
------=_Part_6690_1862543576.1697636556997--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1733602178.6691.1697636557003>