Zfs: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
No edit summary
No edit summary
Line 39: Line 39:
</tab>
</tab>
</tabs>
</tabs>
=Using ZFS=
Create a zpool and zfs file system
<source lang="console">
[name@server]$ sudo zpool create -f data /dev/vdb /dev/vdc
</source>
Turn on and choose a compression algorithim
<source lang="console">
[name@server]$ sudo zfs set compression=lz4 data
</source>
Check settings
<source lang="console">
[name@server]$ sudo zfs get all data
</source>
Create a dataset within the <code>data</code> zpool
<source lang="console">
[name@server]$ sudo zfs create -p data/www
</source>
Add a new volume
<source lang="console">
[name@server]$ sudo zpool add data /dev/vde
</source>
Check pool status
<source lang="console">
[name@server]$ sudo zpool status data
</source>
Destroy a zpool
<source lang="console">
[name@server]$ sudo zpool destroy data
</source>
=Notes=
While in theory it should be possible to use ZFS with resizing volumes in OpenStack in practices this has not been straight forward and is better to be avoided if possible.

Revision as of 17:12, 1 March 2019


This article is a draft

This is not a complete article: This is a draft, a work in progress that is intended to be published into an article, which may or may not be ready for inclusion in the main wiki. It should not necessarily be considered factual or authoritative.




ZFS is a combined file system and logical volume manager designed by Sun Microsystems. ZFS can scale to very large file system sizes and supports compression.

Installing ZFS

Starting with the image Ubuntu-18.04-Bionic-x64-2018-09

Ensure your package list is up-to-date and also do upgrades of your installed packages. While it isn't strictly nessacary to upgrade your installed packages it is a good idea.

[name@server]$ sudo apt-get update 
[name@server]$ sudo apt-get dist-upgrade -y

Next install ZFS

[name@server]$ sudo apt-get install zfsutils-linux

Starting with the image CentOS-7-x64-2018-09

[name@server]$ sudo yum install http://download.zfsonlinux.org/epel/zfs-release.el7_5.noarch.rpm
...
Total size: 2.9 k
Installed size: 2.9 k
Is this ok [y/d/N]: y
...

hmm... this is looking strangely more complicated, see for example [1]

Starting with the image Fedora-Cloud-Base-29-1.2

to be written!

Using ZFS

Create a zpool and zfs file system

[name@server]$ sudo zpool create -f data /dev/vdb /dev/vdc

Turn on and choose a compression algorithim

[name@server]$ sudo zfs set compression=lz4 data

Check settings

[name@server]$ sudo zfs get all data

Create a dataset within the data zpool

[name@server]$ sudo zfs create -p data/www

Add a new volume

[name@server]$ sudo zpool add data /dev/vde

Check pool status

[name@server]$ sudo zpool status data

Destroy a zpool

[name@server]$ sudo zpool destroy data

Notes

While in theory it should be possible to use ZFS with resizing volumes in OpenStack in practices this has not been straight forward and is better to be avoided if possible.