zfs administration guide - .zfs administration guide. ... zfs delegated administration ... sharing

Download ZFS Administration Guide - .ZFS Administration Guide. ... ZFS Delegated Administration ... Sharing

Post on 26-Jul-2018

232 views

Category:

Documents

3 download

Embed Size (px)

TRANSCRIPT

  • The illumos

    ZFS Administration Guide

  • Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that isdescribed in this document. In particular, and without limitation, these intellectual property rights may include oneor more U.S. patents or pending patent applications in the U.S. and in other countries.

    U.S. Government Rights Commercial software. Government users are subject to the Sun Microsystems, Inc.standard license agreement and applicable provisions of the FAR and its supplements.

    This distribution may include materials developed by third parties.

    Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIXis a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd.

    Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, Java, and Solarisare trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARCtrademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in theU.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by SunMicrosystems, Inc. Legato NetWorker is a trademark or registered trademark of Legato Systems, Inc.

    The OPEN LOOK and Sun Graphical User Interface was developed by Sun Microsystems, Inc. for its usersand licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept ofvisual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to theXerox Graphical User Interface, which license also covers Suns licensees who implement OPEN LOOK GUIs andotherwise comply with Suns written license agreements.

    Products covered by and information contained in this publication are controlled by U.S. Export Control laws andmay be subject to the export or import laws in other countries. Nuclear, missile, chemical or biological weaponsor nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport tocountries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to,the denied persons and specially designated nationals lists is strictly prohibited.

    DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTA-TIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENTTHAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

    Copyright 2008 Sun Microsystems, Inc.

  • Contents

    Contents i

    List of Tables vi

    1 ZFS File System (Introduction) 11.1 Whats New in ZFS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    Using Cache Devices in Your ZFS Storage Pool . . . . . . . . . . . . . . . . . . . . . . 3Enhancements to the zfs send Command . . . . . . . . . . . . . . . . . . . . . . . . . . 3ZFS Quotas and Reservations for File System Data Only . . . . . . . . . . . . . . . . . 4ZFS File System Properties for the Solaris CIFS Service . . . . . . . . . . . . . . . . . 4ZFS Storage Pool Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5ZFS and File System Mirror Mounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6ZFS Command History Enhancements (zpool history) . . . . . . . . . . . . . . . . . . 6Upgrading ZFS File Systems (zfs upgrade) . . . . . . . . . . . . . . . . . . . . . . . . 7ZFS Delegated Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Setting Up Separate ZFS Logging Devices . . . . . . . . . . . . . . . . . . . . . . . . . 8Creating Intermediate ZFS Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9ZFS Hotplugging Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Recursively Renaming ZFS Snapshots (zfs rename -r) . . . . . . . . . . . . . . . . . . 10GZIP Compression is Available for ZFS . . . . . . . . . . . . . . . . . . . . . . . . . . 11Storing Multiple Copies of ZFS User Data . . . . . . . . . . . . . . . . . . . . . . . . . 11Improved zpool status Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12ZFS and Solaris iSCSI Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Sharing ZFS File System Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . 12ZFS Command History (zpool history) . . . . . . . . . . . . . . . . . . . . . . . . . . 13ZFS Property Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    ZFS xattr Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14ZFS canmount Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14ZFS User Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Setting Properties When Creating ZFS File Systems . . . . . . . . . . . . . . . 14

    Displaying All ZFS File System Information . . . . . . . . . . . . . . . . . . . . . . . . 15New zfs receive -F Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Recursive ZFS Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Double Parity RAID-Z (raidz2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Hot Spares for ZFS Storage Pool Devices . . . . . . . . . . . . . . . . . . . . . . . . . 15Replacing a ZFS File System With a ZFS Clone (zfs promote) . . . . . . . . . . . . . . 16Upgrading ZFS Storage Pools (zpool upgrade) . . . . . . . . . . . . . . . . . . . . . . 16Using ZFS to Clone Non-Global Zones and Other Enhancements . . . . . . . . . . . . . 16

    i

  • CONTENTS

    ZFS Backup and Restore Commands are Renamed . . . . . . . . . . . . . . . . . . . . 17Recovering Destroyed Storage Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17ZFS is Integrated With Fault Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 17New zpool clear Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Compact NFSv4 ACL Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17File System Monitoring Tool (fsstat) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18ZFS Web-Based Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    1.2 What Is ZFS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19ZFS Pooled Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Transactional Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Checksums and Self-Healing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Unparalleled Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20ZFS Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Simplified Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    1.3 ZFS Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211.4 ZFS Component Naming Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    2 Getting Started With ZFS 232.1 ZFS Hardware and Software Requirements and Recommendations . . . . . . . . . . . . 232.2 Creating a Basic ZFS File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.3 Creating a ZFS Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.4 Creating a ZFS File System Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    3 ZFS and Traditional File System Differences 293.1 ZFS File System Granularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.2 ZFS Space Accounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    Out of Space Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.3 Mounting ZFS File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303.4 Traditional Volume Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.5 The NFSv4 ACL Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    4 Managing ZFS Storage Pools 334.1 Components of a ZFS Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    Using Disks in a ZFS Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Using Files in a ZFS Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Identifying Virtual Devices in a Storage Pool . . . . . . . . . . . . . . . . . . . . . . . 35

    4.2 Replication Features of a ZFS Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . 35Mirrored Storage Pool Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36RAID-Z Storage Pool Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Self-Healing Data in a Redundant Configuration . . . . . . . . . . . . . . . . . . . . . . 37Dynamic Striping in a Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    4.3 Creating and Destroying ZFS Storage Pools . . . . . . . . . . . . . . . . . . . . . . . . 37Creating a ZFS Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    Creating a Basic Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Creating a Mirrored Storage Pool . . . . . . . . . . . . . . . . . . . . . . . . . 38Creating RAID-Z Storage Pools . . . . . . . . . . . . . . . . . . . . . . . . . . 38Creating a ZFS Storage Pool with Log Devices . . . . . . . . . . . . . . . . . . 39Creating a ZFS Storage Pool with Cache Dev

Recommended

View more >