With ZFS on Proxmox you will realized a very huge disk speed advantage within your virtual machines.
In this post I will explain you howto setup Native ZFS for Linux on Proxmox.
For my Setup I used two Hard Disks with the following Size:
Disk | Size | Path |
---|---|---|
WDC WD20EARX-00P | 2 TB | /dev/sda |
WDC WD20EARX-00P | 2 TB | /dev/sdb |
Surely you could also add some more or SDD Disks for extra Caching.
First of all, get you system up to date:
apt-get update && apt-get upgrade -y
Install following utilities/dependencies to your System:
apt-get -y install autoconf libtool git apt-get -y install build-essential gawk alien fakeroot zlib1g-dev uuid uuid-dev libssl-dev parted pve-headers-$(uname -r)
grab the latest source directory of SPL compile and install the compiled .deb packages:
cd /opt git clone https://github.com/zfsonlinux/spl.git cd spl ./autogen.sh ./configure make deb dpkg -i *.deb
check if spl loads correctly by entering:
modprobe spl
now do the same with ZFS source:
cd /opt git clone https://github.com/zfsonlinux/zfs.git cd zfs ./autogen.sh ./configure make deb dpkg -i *.deb
check if zfs is working:
modprobe zfs
now add the init script to your system:
update-rc.d zfs defaults
and reboot your system:
reboot
After reboot we are ready to build our Storage Pool:
zpool create -f -o ashift=12 storage mirror /dev/sdb /dev/sda
And add some tunings:
zfs set compression=on storage zfs set sync=disabled storage zfs set primarycache=all storage zfs set atime=off storage zfs set checksum=off storage
Important Caution note:
Deduplication feature requires up to 5 GB RAM per Terrabyte Storage Space, so if you cannot afford this amount of exclusive RAM disable dedup by entering:
zfs set dedup=off storage
List your Pool created before:
zpool list storage
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
storage 1.81T 20.5G 1.79T 1% 1.00x ONLINE –
If you see something like this above we are Done!
Finally add your newly created Pool /storage
to you Proxmox GUI. When adding new VM’s don’t forget to use RAW disk images and write back for your virtual disks as cache feature to get the huge speedy advantage of your zfs pool.
Update
If ZFS eats your memory and you ran out of it here is my solution: If ZFS eats your memory
Another problem solution
If you encountered a problem that daemons seems fail to start on server boot up,
here is the solution: configure zfs zo start before proxmox
HTTP/2 SSL Offloading with Hitch and Varnish Since Chrome browsers showing you insecure warning on…
File changed as we read it GlusterFS issue Recently i had trouble running Backups of…
Running multiple instances of varnish using systemd If you have not yet found a complete…
HTTP/2 SSL Offloading with Haproxy and Nginx After HTTP/2 becoming more an more prominent regarding SSL…
Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for Everyone knows the Problem. Get…
Review TDS2 How to backtest using tick data with Metatrader 4 in this Review TDS2…
This website uses cookies.
View Comments
Unfortunately, it will not speed up VM boot as l2arc is not persistent :(
Proxmox has built in backup feature. Does it work with ZFS?
Of course it will since you can store backups wherever you want if you define the backup target path.