ZFS Administration 1
With a rapid paradigm-shift towards digital content and large datasets, managing large amounts of data can be a challenging task. Before implementing a storage solution, there are various open questions that need addressing. Will this system be scalable? Stable? Will it be flexible to my present and future needs? It is crucial to address the issues of availability and cost effectiveness as well. UnitedLayer has long been a leader in providing NAS and SAN solutions for enterprise-level clients. Through the course of this three-part article, UnitedLayer will help you implement and maintain your very own cost-effective, enterprise-ready storage solution. This document will introduce the powerful ZFS filesystem* and show how ZFS can be utilized as an excellent platform for network storage and disaster recovery backups. *This document is intended as a ZFS specification and technical user manual. 2
Table of Contents Introduction... 3 Advantages of ZFS... 3 Disk Administration... 5 Listing Disks... 5 Disk Naming Convention... 6 Monitoring Disk Health... 6 Replacing Disks... 7 Zpool Administration... 9 Creating Zpools... 9 Creating a striped pool... 9 Creating a mirrored pool... 9 Creating a Raid-z1 pool... 9 Creating a Raid-z2 pool... 10 Creating a Raid-z3 pool... 10 Managing Zpools... 10 Listing Zpools... 10 Checking Zpool and Disk Health... 10 Checking the I/O statistics of zpools... 11 Maintaining Zpools:... 11 Renaming Zpools... 11 Scrubbing Zpools... 12 Deleting Zpools... 12 3
Introduction ZFS is an integrated filesystem and logical volume manager (LVM). The filesystem-lvm duo features support for high storage capacities, continous integrity checksums, snapshots, and data deduplication. As a result of these features, ZFS provides an excellent platform for disaster recovery backups and robust SAN capabilities. ZFS was introduced and actively developed as open source software by Sun Microsystems until their acquisition by Oracle in 2010. Since then, the original ZFS source has been made proprietary and further developed in Solaris 11; an open source, community-driven version of ZFS is implemented in open source distributions based on OpenSolaris 10. Advantages of ZFS 1. Volume Management ZFS features an integrated volume manager which supports data redundancy similar to RAID. This means that third-party volume managers are not required. 2. Consistency Checking ZFS uses metadata and checksums to silently detect data corruption. To accomplish this, ZFS performs a checksum of the data stored in a block each time that block is accessed, and compares that checksum to a known-good value. 3. Compression ZFS is capable of compression to save storage space and increase write speed. Note: Compression will require additional CPU cycles. 4. Deduplication ZFS is capable of file-level deduplication to further save storage space, as well as block-level deduplication, meaning that files and blocks that are referenced twice are optimally stored only once in the actual media. Note: De-duplication will require additional RAM overhead. 5. Scalability ZFS uses 128-bit addressing, meaning it will never hit a limitation by today s or tomorrow s standards! For example, a single volume can support up to 256 quadrillion zettabytes of data; this translates to 256 quadrillion-trillion terabytes! 6. File and Block Protocols ZFS has heavy integration with CIFS, NFS, iscsi, and Fibre Channel. As a result, it is an excellent backend for a SAN or NAS. 7. Thin Provisioning Thin provisioning is a method of optimizing the efficiency with which the available space is utilized. ZFS filesystems are provisioned by allocating disk storage space in a flexible manner, based on the minimum space required at any point in time. In short, this means that filesystem sizes can be easily increased. 8. Copy-on-Write Transactional Model Blocks containing archival data are never overwritten in place; instead, new blocks are allocated for any changed data. Any 4
metadata blocks referencing it are similarly allocated in new blocks and updated. 9. Snapshots An emergent property following from the copy-on-write capabilities of ZFS is access to filesystems in their previous states, since old blocks are kept and updates to files are stored in new blocks. These are known as snapshots in ZFS. Snapshots are space-efficient, since unchanged data is shared among the filesystem and its snapshots. 10. Clones Writeable snapshots ( clones ) can also be created, resulting in two independent file systems that share a set of blocks. As changes are made to any of the clone file systems, new data blocks are created to reflect those changes, but any unchanged blocks continue to be shared, no matter how many clones exist. 5