This guide shows how to install and use ZFS on your server with Virtualizor.
Note : ZFS should be used only by experienced users. If not configured properly you could lose all your data.
You can skip this step and proceed to #Adding Storage in Virtualizor if your system provides ZFS from its repos.
The installer will only work on a 64-bit system. You are strongly encouraged to use a 64-bit system even if you are installing the ZFS manually. At the moment zfs will build in a 32-bit environment but will not be stable.
NOTE : Before using the Installer please ensure that your system is configured properly and meets the basic requirements (http://zfsonlinux.org/faq.html) to implement ZFS otherwise you might end up losing all your data and Virtualizor would not be responsible for it.
Open a Shell Terminal (e.g. PuTTY) and SSH to your server. Run the following commands:
wget -N http://files.virtualizor.com/zfs_install.sh chmod 0755 zfs_install.sh sh zfs_install.sh
NOTE: The installer has been tested on Centos 6, 7 and Ubuntu 14
The installation will begin immediately, and you will see a welcome message while the installation process runs in the background. You will see something like this :
This process might take a while so please be patient. You will see appropriate header messages as the installation progresses. If you are using Centos, after the installation is completed you will be asked to reboot. For Ubuntu, there is NO need to reboot and you don't have to run the modprobe command either.
After the reboot, you will have to run the modprobe command to load the ZFS modules(Only for Centos),
If everything worked fine you can then create a new zpool like this,
Example: $ zpool create -f myPool /dev/sdb -m /myPool
- -f : force to create zpool
- myPool : name of the zpool
- /dev/sdb : storage device to be assigned
- -m /myPool : specify mount point of zpool (mounts on /<zpool-name> if not specified)
NOTE : After executing the above command you will have to execute the following command to avoid issues which is very common in ZFS after rebooting the node. After reboot the zpool is gone if the following steps are not performed. Otherwise your zpool can be gone and you may loose your data.
For CentOS 7
systemctl enable zfs.target systemctl start zfs.target systemctl daemon-reload
Adding Storage in Virtualizor
Once the pool has been created you can log in to the Virtualizor Admin panel and create a new storage with type ZFS* and mention the path to your newly created pool there,
NOTE : Please add the path as /dev/zvol/YOUR_POOLNAME
After the storage has been created you can select the newly created zpool storage while creating a new VPS,