If you need to expand your cloud solution storage options, a ZFS storage pool might be ideal.
ZFS is a combined file system and logical volume manager that is scalable and includes features such as protection against data corruption. It also offers high storage capacity, allows for snapshots and copy-on-write clones, and much more. Because of its ability to deal with large amounts of data, a ZFS storage pool makes for a great way to extend your on-premises cloud solution.
Let's walk through the process of creating a ZFS storage pool. I'll demonstrate on Ubuntu Server 18.04.
SEE: Serverless computing: A guide for IT leaders (Tech Pro Research)
What you need
In order to successfully create the ZFS storage pool, you'll need:
- A running instance of Ubuntu Server.
- A user account with sudo privileges.
The first thing to do is to install the ZFS package. As this is found within the standard repository, it can be installed with the single command:
sudo apt-get install zfsutils-linux -y
Once that installation completes, you're ready to create the pool.
Creating a ZFS pool
The first step in creating your ZFS pool is knowing what type of pool to create and which drives to pool. There are two types of simple pools to create:
- Striped pool, where a copy of data is stored across all drives.
- Mirrored pool, where a single, complete copy of data is stored on all drives.
Next, you need to know which drives are available to pool. To find out what drives you have available, issue the command:
sudo fdisk -l
You should see all of your available drives (Figure A).
I created two virtual drives for the purpose of using them in a ZFS pool:
To create a striped pool, the command would be:
sudo zpool create pool1 /dev/vda /dev/vdb
To create a mirrored pool, the command would be:
sudo zpool create pool1 mirror /dev/vda /dev/vdb
In both of the above examples, the newly created pool would be called pool1.
Our new pool would then be mounted at /pool1 (Figure B).
You can check the status of your pool with the command:
sudo zpool status
The above command will list out the state and other information of the newly created pool (Figure C).
You can now associate the newly created pool with your cloud storage solution, giving you plenty of room for expansion.
Removing the pool
If you need to remove the pool, it can be done with the command:
sudo zpool destroy pool1
Remember to substitute pool1 with whatever you named your pool.
And that's all there is to creating either a striped or mirrored ZFS pool on Ubuntu Server. With this tool at the ready, you don't have to worry about your cloud solution running out of storage room.
- How to add a cloud account to the Polo File Manager (TechRepublic)
- How to run ownCloud with OnlyOffice as a virtual machine (TechRepublic)
- How to install CouchDB on CentOS 7 (TechRepublic)
- Hybrid cloud: A cheat sheet (TechRepublic)
- Hybrid cloud: A guide for IT pros (TechRepublic download)
- Top cloud providers 2019: AWS, Microsoft, Azure, Google Cloud; IBM makes hybrid move; Salesforce dominates SaaS (ZDNet)
- Best cloud services for small businesses (CNET)
- Microsoft Office vs Google Docs Suite vs LibreOffice (Download.com)
- Cloud computing: More must-read coverage (TechRepublic on Flipboard)