<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">Why would you need disk compression on the root & user partitions?<br><br>Lindsay Mathieson </div></div><div dir="ltr"><hr><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">From: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:mettlerd@numlock.ch">Daniel Mettler</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Sent: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">‎19/‎03/‎2015 9:32 AM</span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">To: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:pve-user@pve.proxmox.com">pve-user@pve.proxmox.com</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Subject: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">[PVE-User] Proxmox VE 3.4 and ZFS: Using compression=lz4 instead ofcompression=on by default</span><br><br></div>Servus!<br><br>My questions:<br>*************<br><br>1) Will there soon be a Proxmox VE ISO that uses lz4 for transparent ZFS compression by default, i.e. at installation time already?<br><br>2) Is there any documentation on how the Proxmox VE 3.4 ISO image is being built/created (particularly, how it's made bootable)?<br><br>3) Why isn't it possible to activate and use other consoles (e.g. by hitting CTRL-ALT-F4) during the Proxmox VE installation? Or is it possible?<br><br>Background:<br>***********<br><br>I tried various workarounds to make Proxmox VE 3.4 use compression=lz4 for ZFS at installation time already (reason: lz4 is considered the best choice for ZFS compression algorithm in most cases. AFAIK, ZoL still uses lzjb by default, but there are plans to move to lz4 soon).<br><br>I finally decided, the best way for us to go is creating a bootable, patched ISO based on the original Proxmox VE 3.4 ISO.<br><br>Here’s how I created the patched ISO:<br><br>1. Loop-mount the original ISO (can only be mounted read-only):<br><br># mount -o loop /path/to/proxmox-ve_3.4-3f2d890e-1.iso /mnt/cdrom<br><br>2. Copy /usr/bin/proxinstall from the mounted ISO image to a read-writeable directory (create directories as necessary):<br><br># cp -a /mnt/cdrom/usr/bin/proxinstall /mnt/cdrom_patched/usr/bin/proxinstall<br><br>3. Edit the /usr/bin/proxinstall script as follows:<br><br># diff -u ../cdrom/usr/bin/proxinstall usr/bin/proxinstall <br>--- ../cdrom/usr/bin/proxinstall        2015-02-12 17:52:50.000000000 +0100<br>+++ usr/bin/proxinstall    2015-03-17 21:50:07.662031284 +0100<br>@@ -592,7 +592,7 @@<br>     # disable atime during insatll<br>     syscmd ("zfs set atime=off $zfspoolname") == 0 ||<br>       die "unable to set zfs properties\n";<br>-    syscmd ("zfs set compression=on $zfspoolname") == 0 ||<br>+    syscmd ("zfs set compression=lz4 $zfspoolname") == 0 ||<br>  die "unable to set zfs properties\n";<br> }<br><br>4. Use the complicated but very powerful tool xorriso (install it, if necessary) to create a bootable ISO image based on the original ISO, but with /usr/bin/proxinstall “overwritten” with the edited proxinstall script:<br><br># xorriso -boot_image grub patch -indev proxmox-ve_3.4-3f2d890e-1.iso -overwrite on -outdev proxmox-ve_3.4-3f2d890e-1-with-lz4-patch.iso -blank as_needed -pathspecs on -add /usr/bin/proxinstall=/mnt/cdrom_patched/usr/bin/proxinstall -- -commit<br><br>5. Use this patched ISO to install Proxmox VE 3.4 as usual<br><br>After rebooting the installed Proxmox VE 3.4 host/server, use the following command to verify that lz4 has been used by default:<br><br># zfs get compression<br>NAME              PROPERTY     VALUE     SOURCE<br>rpool             compression  lz4       local<br>rpool/ROOT        compression  lz4       inherited from rpool<br>rpool/ROOT/pve-1  compression  lz4       inherited from rpool<br>rpool/swap        compression  lz4       inherited from rpool<br><br>I hope this is of help to other users as well. And of course, that an official ISO implementing this small, but important improvement will be released soon :)<br><br>Cheers<br><br>Dani<br><br>-- <br>Daniel Mettler                                 http://www.numlock.ch<br><br>_______________________________________________<br>pve-user mailing list<br>pve-user@pve.proxmox.com<br>http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user<br></body></html>