Log in as a Root User
To install the ZFS File system in your Oracle Linux 8 system, you have to first log in as a root user. So, open your terminal and write the below command to work as a root user:
Oracle Linux 8 system will ask for your root user password. After providing your root user password, you can work now as a root user.
Check Installed Repositories
First of all, check for the repositories already installed on Oracle Linux 8. For this, try the repolist command under root user privilege. It will display all the repositories which are already been installed.
Install Yum Repository Utilities
Now you have to install Yum utilities to avoid any inconvenience in the future while installation.
Install EPEL Repository
Now, it is time to install the EPEL repository in Oracle Linux 8, which is necessary for the installation of the ZFS file system. You have to directly install it, from the official Fedora Project website mentioning the version and release of the EPEL RPM file. Try this command:
-latest-8.noarch.rpm
The system may ask you to hit y or Y to continue the installation process. If you want to install EPEL hit y from the keyboard, and it will start downloading and installing the EPEL repository.
After a while, the EPEL repository will be installed on Oracle Linux 8.
You can confirm the installation of the EPEL utility by using the same repolist command.
Enable EPEL Utility Extra Modules
To enable EPEL utility in your system, execute the enable command in the terminal followed by epel name.
It could be possible that some of the EPEL modules cannot be installed. To install extra packages of Enterprise Linux Modular 8, use the simple yum command followed by the keyword dkms.
Download ZFS RPM File
Finally, you are very near to install the ZFS File system. To install it on our system, we have to download it first from the official ZFS website. Now try the rpm command followed by a Link.
-release.el8_2.noarch.rpm">http://download.zfsonlinux.org/epel
/zfs-release.el8_2.noarch.rpm</a>
The ZFS rpm file has been successfully downloaded in our Oracle Linux 8.
Install ZFS File System
Finally, we can install the ZFS File system now. To install ZFS on Oracle Linux 8, try the yum command followed by the keyword zfs like this:
It will start installing ZFS on Oracle Linux 8. The completion of the installation will be done in a while. After the completion of installation. you can further proceed with the other things to do.
Load the driver
You have to load the ZFS driver to start using it. To load it try this:
Verify Loaded Utility Services
Now we can check about the ZFS File System loaded packages using the systemctl command.
This will show you which utilities and services are currently active, inactive, and failed.
Also, you can check for the enabled and disabled utility files using the systemctl grep command.
The image below is showing some utility services having statuses, enabled, and disabled.
Mutually Connect the Services
To mutually connect the utility services at the same time, try the below command.
zfs-import-scan zfs-target
Now you can enable the services, to enable a single disabled utility service you can try this:
Now when you verify for the utility services, you will get to know that previously disabled services are now enabled.
Check/Identify the Devices
Now you can check for the devices already running in correspondence with the ZFS File system. To identify the devices, try the fdisk command with the –l keyword to list devices.
You will be able to see a list of Devices and Disk currently present in your system with their information regarding size, ID, type, start, and endpoints.
You can check for the already created and mounted pools by:
at last, we have successfully installed ZFS File System on Oracle Linux 8. Now your system is ready to create pools, mount pools, Import and Export pools, delete pools, and other file-related things as well.
ZFS Commands
Now, here are some commands to try in ZFS File System. To create a pool in ZFS File System execute this command:
To check the pool list, try this:
To check the list of datasets available, try this
To check the current status of a pool, try this:
To import pool try this:
To export pool try this:
To delete a pool try this:
Also, you can create a ZFS File system using pools as below:
And most importantly, you can mount the pool using the simple mount command as used below:
Conclusion
The ZFS file system is a groundbreaking modern file system that radically improves the way data files are handled, with enormous capabilities and huge advantages that are not possible today in almost any other file system. You can feel at ease after trying this article thoroughly.