0 évaluation0% ont trouvé ce document utile (0 vote)
19 vues24 pages
This document provides an introduction to the Solaris ZFS file system. It describes key ZFS concepts like snapshots, pools, datasets and properties. It outlines how to create and manage ZFS pools, file systems and snapshots. It explains ZFS terminology and covers commands for listing, mounting, renaming and destroying ZFS datasets.
This document provides an introduction to the Solaris ZFS file system. It describes key ZFS concepts like snapshots, pools, datasets and properties. It outlines how to create and manage ZFS pools, file systems and snapshots. It explains ZFS terminology and covers commands for listing, mounting, renaming and destroying ZFS datasets.
This document provides an introduction to the Solaris ZFS file system. It describes key ZFS concepts like snapshots, pools, datasets and properties. It outlines how to create and manage ZFS pools, file systems and snapshots. It explains ZFS terminology and covers commands for listing, mounting, renaming and destroying ZFS datasets.
Enterprise Services ZFS Introduction to the ZFS File System Objectives Describe the Solaris ZFS file system Create new ZFS pools and file systems Modify ZFS file system properties Mount and unmount ZFS file systems Destroy ZFS pools and file systems
What Is ZFS? ZFS Snapshots ZFS snapshots are read-only copies of file systems that initially consume no additional space in apool.
Simplified Administration ZFS uses a simplified command set, uses an hierarchical file system layout, supports file system property inheritance and automatic mount points. ZFS Terminology
dataset - A generic name for the following ZFS entities: clones, file systems, snapshots, or volumes. mirror - A virtual device that stores identical copies of data on two or more disks. pool - A logical group of devices describing the layout and physical characteristics of the available storage.
RAID-Z - A virtual device that stores data and parity on multiple disks, similar to RAID-5.
resilvering -The process of transferring data from one device to another device is known as resilvering.
snapshot - A read-only image of a file system or volume at a given point in time.
virtual device - A logical device in a pool, which can be a physical device, a file, or a collection of devices.
volume - A dataset used to emulate a physical device. ZFS Component Naming Requirements Empty components are not allowed. Each component can only contain alphanumeric characters in addition to the following four special characters: Underscore (_) Hyphen (-) Colon (:) Period (.) Pool names must begin with a letter, except that the beginning sequence c[0-9] is not allowed. In addition, pool names that begin with mirror, raidz, or spare are not allowed as these name are reserved. Dataset names must begin with an alphanumeric character. The minimum disk size is 128 Mbytes. For good ZFS performance, at least one Gbyte or more of memory is recommended. Creating ZFS File Systems One goal of the ZFS design is to reduce the number of commands needed to create a usable file system. When you create a new pool, a new ZFS file system is created and mounted automatically. Within a pool, you will probably want to create additional file systems. In most cases, you will probably want to create and organize a hierarchy of file systems that matches your organizationalneeds. A storage device can be a whole disk (c1t0d0) or an individual slice (c0t0d0s7). The recommended mode of operation is to use an entire disk. ZFS applies an EFI label when you create a storage pool with whole disks mirror c1t0d0 c2t0d0
Creating a Basic Storage Pool The following command creates a new pool named tank that consists of the disk c1t0d0 # zpool create tank c1t0d0 You can request specific statistics by using the -o option. For example, to list only the name and size of each pool, you use the following syntax: # zpool list -o name,size NAME SIZE tank 80.0G dozer 1.2T The simplest way to request a quick overview of pool health status is to use the zpool status command: # zpool status -x all pools are healthy ONLINE The device is in normal working order.
DEGRADED The virtual device has experienced failure but is still able to function.
FAULTED The virtual device is completely inaccessible. This status typically indicates total failure of the device, such that ZFS is incapable of sending or receiving data from it. If a top-level virtual device is in this state, then the pool is completely inaccessible.
OFFLINE The virtual device has been explicitly taken offline by the administrator.
UNAVAILABLE The device or virtual device cannot be opened. In some cases, pools with UNAVAILABLE devices appear in DEGRADED mode. If a top-level virtual device is unavailable, then nothing in the pool can be accessed. zfs create tank/home/bonwick ZFS automatically mounts the newly created file system if it is created successfully. Renaming a ZFS File System (cont.) The following example uses the rename subcommand to simply rename a file system: # zfs rename tank/home/kustarz tank/home/kustarz_old The following example shows how to use zfs rename to relocate a file system. # zfs rename tank/home/maybee tank/ws/maybee # zfs set mountpoint=legacy tank/home/eschrock # mount -F zfs tank/home/eschrock /mnt The zfs mount command with no argument shows all currently mounted file systems that are managed by ZFS. # zfs mount tank /tank tank/home /tank/home tank/home/bonwick /tank/home/bonwick You can use the -a option to mount all ZFS managed file systems. For example: # zfs mount -a This command does not mount legacy managed file systems. ZFS Snapshots A snapshot is a read-only copy of a file system or volume. Snapshots are created almost instantly, and initially consume no additional disk space within the pool.
ZFS snapshots include the following features: Snapshots persist across system reboots. The theoretical maximum number of snapshots is 264. Snapshots use no separate backing store. Snapshots consume disk space directly from the same storage pool as the file system from which they were created. Creating and Destroying ZFS Snapshots You use the zfs snapshot command to create ZFS snapshots. The zfs snapshot command takes the name of the snapshot to create as its only argument. Snapshot names use the following format: filesystem@snapname volume@snapname The following example creates a snapshot of tank/home/ ahrens that is named friday. # zfs snapshot tank/home/ahrens@friday You use the zfs destroy command to destroy a ZFS snapshot. For example: # zfs destroy tank/home/ahrens@friday Adataset cannot be destroyed if snapshots of the dataset exist.