Skip Navigation Links | |
Exit Print View | |
Oracle Solaris ZFS Administration Guide Oracle Solaris 10 1/13 Information Library |
1. Oracle Solaris ZFS File System (Introduction)
ZFS Command Usage Enhancements
Oracle Solaris ZFS Installation Features
ZFS Snapshot Differences (zfs diff)
ZFS Storage Pool Recovery and Performance Enhancements
Tuning ZFS Synchronous Behavior
ZFS ACL Interoperability Enhancements
Splitting a Mirrored ZFS Storage Pool (zpool split)
ZFS Device Replacement Enhancements
ZFS and Flash Installation Support
Zone Migration in a ZFS Environment
Checksums and Self-Healing Data
ZFS Component Naming Requirements
Oracle Solaris ZFS and Traditional File System Differences
Solaris ACL Model Based on NFSv4
2. Getting Started With Oracle Solaris ZFS
3. Managing Oracle Solaris ZFS Storage Pools
4. Installing and Booting an Oracle Solaris ZFS Root File System
5. Managing Oracle Solaris ZFS File Systems
6. Working With Oracle Solaris ZFS Snapshots and Clones
7. Using ACLs and Attributes to Protect Oracle Solaris ZFS Files
8. Oracle Solaris ZFS Delegated Administration
9. Oracle Solaris ZFS Advanced Topics
10. Oracle Solaris ZFS Troubleshooting and Pool Recovery
11. Recommended Oracle Solaris ZFS Practices
This section summarizes new features in the ZFS file system.
Oracle Solaris 10 1/13: The zfs and zpool command have a help subcommand that you can use to provide more information about the zfs and zpool subcommands and their supported options. For example:
# zfs help The following commands are supported: allow clone create destroy diff get groupspace help hold holds inherit list mount promote receive release rename rollback send set share snapshot unallow unmount unshare upgrade userspace For more info, run: zfs help <command> # zfs help create usage: create [-p] [-o property=value] ... <filesystem> create [-ps] [-b blocksize] [-o property=value] ... -V <size> <volume>
# zpool help The following commands are supported: add attach clear create destroy detach export get help history import iostat list offline online remove replace scrub set split status upgrade For more info, run: zpool help <command> # zpool help attach usage: attach [-f] <pool> <device> <new-device>
For more information, see zfs(1M) and zpool(1M).
Oracle Solaris 10 1/13: This release includes the following ZFS snapshot enhancements:
The zfs snapshot command has a snap alias that provides abbreviated syntax for this command. For example:
# zfs snap -r users/home@snap1
The zfs diff command provides an enumeration option, -e, to identify all the files that were added or modified between the two snapshots. The generated output identifies all files added, but does not provide possible deletions. For example:
# zfs diff -e tank/cindy@yesterday tank/cindy@now + /tank/cindy/ + /tank/cindy/file.1
You can also use the -o option to identify selected fields to be displayed. For example:
# zfs diff -e -o size -o name tank/cindy@yesterday tank/cindy@now + 7 /tank/cindy/ + 206695 /tank/cindy/file.1
For more information about creating ZFS snapshots, see Chapter 6, Working With Oracle Solaris ZFS Snapshots and Clones.
Oracle Solaris 10 1/13: The aclmode property modifies Access Control List (ACL) behavior whenever ACL permissions on a file are modified during a chmod operation. The aclmode property has been reintroduced with the following property values:
discard – A file system with an aclmode property of discard deletes all ACL entries that do not represent the mode of the file. This is the default value.
mask – A file system with an aclmode property of mask reduces user or group permissions. The permissions are reduced, such that they are no greater than the group permission bits, unless it is a user entry that has the same UID as the owner of the file or directory. In this case, the ACL permissions are reduced so that they are no greater than owner permission bits. The mask value also preserves the ACL across mode changes, provided an explicit ACL set operation has not been performed.
passthrough – A file system with an aclmode property of passthrough indicates that no changes are made to the ACL other than generating the necessary ACL entries to represent the new mode of the file or directory.
For more information, see Example 7-13.
Oracle Solaris 10 8/11: In this release, the following new installation features are available:
You can use the text mode installation method to install a system with a ZFS flash archive. For more information, see Example 4-3.
You can use the Oracle Solaris Live Upgrade luupgrade command to install a ZFS root flash archive. For more information, see Example 4-8.
You can use the Oracle Solaris Live Upgrade lucreate command to specify a separate /var file system. For more information, see Example 4-5.
Oracle Solaris 10 8/11: In this release, you can set file system properties that are sent and received in a snapshot stream. These enhancements provide flexibility in applying file system properties in a send stream to the receiving file system or in determining whether the local file system properties, such as the mountpoint property value, should be ignored when received.
For more information, see Applying Different Property Values to a ZFS Snapshot Stream.
Oracle Solaris 10 8/11: In this release, you can determine ZFS snapshot differences by using the zfs diff command.
For example, assume that the following two snapshots are created:
$ ls /tank/cindy fileA $ zfs snapshot tank/cindy@0913 $ ls /tank/cindy fileA fileB $ zfs snapshot tank/cindy@0914
For example, to identify the differences between two snapshots, use syntax similar to the following:
$ zfs diff tank/cindy@0913 tank/cindy@0914 M /tank/cindy/ + /tank/cindy/fileB
In the output, the M indicates that the directory has been modified. The + indicates that fileB exists in the later snapshot.
For more information, see Identifying ZFS Snapshot Differences (zfs diff).
Oracle Solaris 10 8/11: In this release, the following new ZFS storage pool features are provided:
You can import a pool with a missing log by using the zpool import -m command. For more information, see Importing a Pool With a Missing Log Device.
You can import a pool in read-only mode. This feature is primarily for pool recovery. If a damaged pool cannot be accessed because the underlying devices are damaged, you can import the pool read-only to recover the data. For more information, see Importing a Pool in Read-Only Mode.
A RAID-Z (raidz1, raidz2, or raidz3) storage pool that is created in this release will have some latency-sensitive metadata automatically mirrored to improve read I/O throughput performance. For existing RAID-Z pools that are upgraded to at least pool version 29, some metadata will be mirrored for all newly written data.
Mirrored metadata in a RAID-Z pool does not provide additional protection against hardware failures, similar to what a mirrored storage pool provides. Additional space is consumed by mirrored metadata, but the RAID-Z protection remains the same as in previous releases. This enhancement is for performance purposes only.
Solaris 10 8/11: In this release, you can determine a ZFS file system's synchronous behavior by using the sync property.
The default synchronous behavior is to write all synchronous file system transactions to the intent log and to flush all devices to ensure that the data is stable. Disabling the default synchronous behavior is not recommended. Applications that depend on synchronous support might be affected, and data loss could occur.
The sync property can be set before or after the file system is created. In either case, the property value takes effect immediately. For example:
# zfs set sync=always tank/neil
The zil_disable parameter is no longer available in Oracle Solaris releases that include the sync property.
For more information, see Table 5-1.
Oracle Solaris 10 8/11: In this release, you can use the -T option to provide an interval and count value for the zpool list and zpool status commands to display additional information.
In addition, more pool scrub and resilver information is provided by the zpool status command as follows:
Resilver in-progress report. For example:
scan: resilver in progress since Thu Jun 7 14:41:11 2012 3.83G scanned out of 73.3G at 106M/s, 0h11m to go 3.80G resilvered, 5.22% done
Scrub in-progress report. For example:
scan: scrub in progress since Thu Jun 7 14:59:25 2012 1.95G scanned out of 73.3G at 118M/s, 0h10m to go 0 repaired, 2.66% done
Resilver completion message. For example:
resilvered 73.3G in 0h13m with 0 errors on Thu Jun 7 14:54:16 2012
Scrub completion message. For example:
scan: scrub repaired 512B in 1h2m with 0 errors on Thu Jun 7 15:10:32 2012
Ongoing scrub cancellation message. For example:
scan: scrub canceled on Thu Jun 7 15:19:20 MDT 2012
Scrub and resilver completion messages persist across system reboots
The following syntax uses the interval and count option to display ongoing pool resilvering information. You can use the -T d value to display the information in standard date format or -T u to display the information in an internal format.
# zpool status -T d tank 3 2 Wed Nov 14 15:44:34 MST 2012 pool: tank state: DEGRADED status: One or more devices is currently being resilvered. The pool will continue to function in a degraded state. action: Wait for the resilver to complete. scan: resilver in progress since Wed Nov 14 15:44:34 2012 2.96G scanned out of 4.19G at 189M/s, 0h0m to go 1.48G resilvered, 70.60% done config: NAME STATE READ WRITE CKSUM tank DEGRADED 0 0 0 mirror-0 ONLINE 0 0 0 c0t5000C500335F95E3d0 ONLINE 0 0 0 c0t5000C500335F907Fd0 ONLINE 0 0 0 mirror-1 DEGRADED 0 0 0 c0t5000C500335BD117d0 ONLINE 0 0 0 c0t5000C500335DC60Fd0 DEGRADED 0 0 0 (resilvering) errors: No known data errors
Oracle Solaris 10 8/11: In this release, the following ACL enhancements are provided:
Trivial ACLs do not require deny Access control entries (ACEs) except for unusual permissions. For example, a mode of 0644, 0755, or 0664 does not require deny ACEs, but a mode, such as 0705, 0060, and so on, does require deny ACEs.
The old behavior includes deny ACEs in a trivial ACL like 644. For example:
# ls -v file.1 -rw-r--r-- 1 root root 206663 Jun 14 11:52 file.1 0:owner@:execute:deny 1:owner@:read_data/write_data/append_data/write_xattr/write_attributes /write_acl/write_owner:allow 2:group@:write_data/append_data/execute:deny 3:group@:read_data:allow 4:everyone@:write_data/append_data/write_xattr/execute/write_attributes /write_acl/write_owner:deny 5:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize :allow
The new behavior for a trivial ACL like 644 does not include the deny ACEs. For example:
# ls -v file.1 -rw-r--r-- 1 root root 206663 Jun 22 14:30 file.1 0:owner@:read_data/write_data/append_data/read_xattr/write_xattr /read_attributes/write_attributes/read_acl/write_acl/write_owner /synchronize:allow 1:group@:read_data/read_xattr/read_attributes/read_acl/synchronize:allow 2:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize :allow
ACLs are no longer split into multiple ACEs during inheritance to try to preserve the original unmodified permission. Instead, the permissions are modified as necessary to enforce the file creation mode.
The aclinherit property behavior includes a reduction in permissions when the property is set to restricted, which means that ACLs are no longer split into multiple ACEs during inheritance.
A new permission mode calculation rule specifies that if an ACL has a user ACE that is also the file owner, then those permissions are included in the permission mode computation. The same rule applies if a group ACE is the group owner of the file.
For more information, see Chapter 7, Using ACLs and Attributes to Protect Oracle Solaris ZFS Files.
Oracle Solaris 10 9/10: In this release, you can use the zpool split command to split a mirrored storage pool, which detaches a disk or disks in the original mirrored pool to create another identical pool.
For more information, see Creating a New Pool By Splitting a Mirrored ZFS Storage Pool.
Oracle Solaris 10 9/10: In this release, each ZFS storage pool has an associated process, zpool-poolname. The threads in this process are the pool's I/O processing threads to handle I/O tasks, such as compression and checksum validation, that are associated with the pool. The purpose of this process is to provide visibility into each storage pool's CPU utilization.
Information about these running processes can be reviewed by using the ps and prstat commands. These processes are only available in the global zone. For more information, see SDC(7).
Oracle Solaris 10 9/10: In this release, a system event or sysevent is provided when the disks in a pool are replaced with larger disks. ZFS has been enhanced to recognize these events and adjusts the pool based on the new size of the disk, depending on the setting of the autoexpand property. You can use the autoexpand pool property to enable or disable automatic pool expansion when a larger disk replaces a smaller disk.
These enhancements enable you to increase the pool size without having to export and import pool or reboot the system.
For example, automatic LUN expansion is enabled on the tank pool.
# zpool set autoexpand=on tank
Or, you can create the pool with the autoexpand property enabled.
# zpool create -o autoexpand=on tank c1t13d0
The autoexpand property is disabled by default so you can decide whether you want the pool size expanded when a larger disk replaces a smaller disk.
The pool size can also be expanded by using the zpool online -e command. For example:
# zpool online -e tank c1t6d0
Or, you can reset the autoexpand property after a larger disk is attached or made available by using the zpool replace command. For example, the following pool is created with one 8-GB disk (c0t0d0). The 8-GB disk is replaced with a 16-GB disk (c1t13d0), but the pool size is not expanded until the autoexpand property is enabled.
# zpool create pool c0t0d0 # zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT pool 8.44G 76.5K 8.44G 0% ONLINE - # zpool replace pool c0t0d0 c1t13d0 # zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT pool 8.44G 91.5K 8.44G 0% ONLINE - # zpool set autoexpand=on pool # zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT pool 16.8G 91.5K 16.8G 0% ONLINE -
Another way to expand the disk without enabling the autoexpand property, is to use the zpool online -e command even though the device is already online. For example:
# zpool create tank c0t0d0 # zpool list tank NAME SIZE ALLOC FREE CAP HEALTH ALTROOT tank 8.44G 76.5K 8.44G 0% ONLINE - # zpool replace tank c0t0d0 c1t13d0 # zpool list tank NAME SIZE ALLOC FREE CAP HEALTH ALTROOT tank 8.44G 91.5K 8.44G 0% ONLINE - # zpool online -e tank c1t13d0 # zpool list tank NAME SIZE ALLOC FREE CAP HEALTH ALTROOT tank 16.8G 90K 16.8G 0% ONLINE -
Additional device replacement enhancements in this release include the following:
In previous releases, ZFS was unable to replace an existing disk with another disk or attach a disk if the replacement disk was a slightly different size. In this release, you can replace an existing disk with another disk or attach a new disk that is almost the same size provided that the pool is not already full.
In this release, you do not need to reboot the system or export and import a pool to expand the pool size. As described previously, you can enable the autoexpand property or use the zpool online -e command to expand the pool size.
For more information about replacing devices, see Replacing Devices in a Storage Pool.
Solaris 10 10/09: In this release, you can set up a JumpStart profile to identify a flash archive of a ZFS root pool. For more information, see Installing a ZFS Root File System (Oracle Solaris Flash Archive Installation).
Solaris 10 5/09: This release extends support for migrating zones in a ZFS environment with Oracle Solaris Live Upgrade. For more information, see Using Oracle Solaris Live Upgrade to Migrate or Upgrade a System With Zones (at Least Solaris 10 5/09).
For a list of known issues with this release, see the Solaris 10 5/09 release notes.
Solaris 10 10/08: This release enables you to install and boot a ZFS root file system. You can use the initial installation option or the JumpStart feature to install a ZFS root file system. Or, you can use Oracle Solaris Live Upgrade to migrate a UFS root file system to a ZFS root file system. ZFS support for swap and dump devices is also provided. For more information, see Chapter 4, Installing and Booting an Oracle Solaris ZFS Root File System.
For a list of known issues with this release, see the Solaris 10 10/08 release notes.
Solaris 10 6/06 Release: A web-based ZFS management tool, the ZFS Administration console, enables you to perform the following administrative tasks:
Create a new storage pool.
Add capacity to an existing pool.
Move (export) a storage pool to another system.
Import a previously exported storage pool to make it available on another system.
View information about storage pools.
Create a file system.
Create a volume.
Create a snapshot of a file system or a volume.
Roll back a file system to a previous snapshot.
You can access the ZFS Administration console through a secure web browser at:
https://system-name:6789/zfs
If you type the appropriate URL and are unable to reach the ZFS Administration console, the server might not be started. To start the server, run the following command:
# /usr/sbin/smcwebserver start
If you want the server to run automatically when the system boots, run the following command:
# /usr/sbin/smcwebserver enable
Note - You cannot use the Solaris Management Console (smc) to manage ZFS storage pools or file systems.