SA-200-S10
System Administration for the Oracle Solaris 10 OS Part 1

Menu

Introduction

Introducing the Oracle Solaris 10 OS Directory Hierarchy

Managing Local Disk Devices

Describing Interface Configurations

Managing USF File Systems

ZFS File System

Performing Mounts and Unmounts

Performing Package Administration

Managing Software Patches

Using Boot PROM Commands

Using the Grand Unified Bootloader (GRUB)

Performing Legacy Boot and Shutdown Procedures

Service Management Facility (SMF)

Performing User Administration

Controlling System Processes

Oracle Solaris 10 Operating System Installation Requirements


Backing Up a Mounted File System With a UFS Snapshot

Performing File System Backups

Performing File System Restores

ZFS File System Introduction
 

Oracle Documentation

ZFS Administration Guide.

Installing and Booting a ZFS Root File System.


From OpenSolaris.org:

Opensolaris.org has a number of public mailing lists called 'discussions', covering a variety of subjects. Use this link to sign up to the ZFS discussion.

Opensolaris.org ZFS Community.

A ZFS demonstration Tutorial with step by step demonstation of many ZFS features. :PDF:

The ZFS FAQ.

This is a demo of the basics of using ZFS, it comes from the OpenSolaris ZFS Community and requires Flash. The presentation is by no means complete, so make sure to have a look at the ZFS documentation (Open Solaris) for a complete reference.

The ZFS Boot project, the team is working to provide the ability to boot the Solaris Operating System from a ZFS root file system as well as install the Solaris Operating System to a ZFS file system.


From www.oracle.com:

This White Paper describes the detailed design goals of ZFS and shows examples of using ZFS. You should note that the document was created during ZFS development and while the overall information is correct much of the command syntax has changed.

This Automatic Performance Tuning in the Zettabyte File System White Paper. Authors, Val Henson, Matt Ahrens and Jeff Bonwick.

This Existential QoS for Storage White Paper. Authors, Val Henson, Matt Ahrens and Jeff Bonwick.

Solaris ZFS And Microsoft Server 2003 NTFS, File System Performance .

Solaris ZFS And Veriftas Storage Fondation, File System Performance.

Solaris ZFS And Res Hat Enterprise Linux EXT3, File System Performance .

From Solaris Developers:

The Management of NFS Performance With Solaris ZFS.


Bloggers:

Roch (rhymes with Spock) Bourbonnais : Kernel Performance Engineering Weblog WHEN TO (AND NOT TO) USE RAID-Z.

Roch (rhymes with Spock) Bourbonnais : Kernel Performance Engineering Weblog ZFS to UFS Performance Comparison on Day 1.

Eric Kustarz's Weblog FS perf 201 : Postmark popular benchmark - Netapp's postmark. Let's see how long it takes to do 1,000,000 transactions.

Milek's blog HW RAID vs. ZFS software RAID and HW RAID vs. ZFS software RAID - part II.

Chad Mynhier's Weblog "To timidly go where many have gone before" ZFS benchmarking and ZFS I/O reordering benchmark.

Jeff Bonwick's Weblog RAID-Z is a detailed description of raidz.

Jeff Bonwick's Weblog ZFS Block Allocation describes device selection, metaslab selection and block selection on the zfs filesystem.

Jeff Bonwick's Weblog ZFS End-to-End Data Integrity

Neil Perrin's Weblog ZFS: The Lumberjack describes the ZFS intent log.

Blog O. Matty Using the ZFS RAIDZ2 and hot spare features on old storage arrays.

Eric Schrock's Weblog ZFS Hot Spares.

Bill Moore's Blog Site Flippin' off bits Ditto Blocks - The Amazing Tape Repellent.

Doug Scott's Blog Site, Solaris Things ZFS Root on Solaris Part 2.

Peerapong Kunasirirat's weblog, Solaris ZFS Performance (compared to VxFS, Linux Ext3 and W2K NTFS).

Tim Foster's weblog ZFS backup.

Constantin's Blooog, CSI:Munich - How to save the world with ZFS and 12 USB Sticks

Constantin's Blooog, 7 Easy Tips for ZFS Starters.

Random ramblings of a paranoid git, ZFS the perfect file system for audit trails.

From C0T0D0S0.org, Presentation: End of RAID5 includes the slide presentation.

From Technology for Sun Partners, A Hands on Introduction to ZFS Pools;Part 1: Getting Started (Pool Creation, Export, Import).

From Technology for Sun Partners, A Hands on Introduction to ZFS Pools;Part 2: Mirrors, Disk Failures and Spare Disks.

From Technology for Sun Partners, A Hands on Introduction to ZFS Pools;Part 3: RAIDZ2, scrubbing and resilvering.

Eric Kustarz's Weblog, ZFS - now with history!.

Bob Netherton's Weblog, ZFS and FMA - Two great tastes ......

Using ZFS for Zone Backups or Snapshots.

ZFS Snapshot Auditing. A perl script to compare a live ZFS filesystem against a ZFS snapshot of the same filesystem in order to get an idea of the files that differ between them.


Other

ZFS The Next Word..., a presentation by Bonwick and Moore the creators of ZFS. These features have been integrated into ZFS, some in Oracle Solaris 10 and Oracle Solaris 11.

Front Range User Group (FRUG) Presentation Solaris ZFS Administration Overview (Jeff Ferreira), PDF Slide Presentation

From Wikipedia, the free encyclopedia ZFS.

The ZFS Best Practices Guide, a work in progress.

The ZFS Evil Tuning Guide.

The ZFS Troubleshooting Guide.

From Pinceton University, Unix Systems, ZFS Management.

FreeBSD, ZFS Quick Start Guide.

ZFS on YouTube, a little humor...

From Unixconsult.org, ZFS vs. Linux Raid vs. Linux LVM vs. Linux LVM + Raid.


Command Changes...

zpool history command, starting with the Solaris 10 8/07 release, ZFS automatically logs successful zfs and zpool commands that modify pool state information. This feature enables you or Sun support personnel to identify the exact set of ZFS commands that was executed to troubleshoot an error scenario.

chaos:/> zpool history
History for 'bpool':
2008-09-19.05:59:46 zpool create -f bpool c1t1d0
2008-09-19.06:00:25 zpool attach -f bpool c1t1d0 c1t2d0
2008-09-19.06:00:56 zpool add bpool mirror c1t3d0 c1t4d0
2008-09-19.06:01:23 zpool add bpool spare c1t6d0
2008-09-19.06:03:16 zfs create bpool/users
2008-09-19.06:03:23 zfs create bpool/users/larry
2008-09-19.06:03:30 zfs create bpool/users/curly
2008-09-19.06:03:36 zfs create bpool/users/moe
2008-09-19.06:04:21 zfs create bpool/zonepool
2008-09-19.06:04:46 zfs rename bpool/zonepool bpool/zonep
2008-09-19.06:05:03 zfs create bpool/zonep/dset
2008-09-19.06:05:09 zfs create bpool/zonep/fixed
2008-09-19.06:38:40 zfs set org.timwort:backup=10/15/08 bpool/users
...

Starting with the Solaris 10 8/07 release, you can set properties when you create a file system, in addition to setting properties after the file system is created.

This example creates a file system and changes three properties:

chaos:/> zfs create bpool/home
chaos:/> zfs set mountpoint=/export/zfs bpool/home
chaos:/> zfs set sharenfs=on bpool/home
chaos:/> zfs set compression=on bpool/home

This example creates the files system and sets the properties is a single command:

chaos:/> zfs create -o mountpoint=/export/zfs -o sharenfs=on -o compression=on bpool/home
chaos:/> zfs list -o mountpoint,sharenfs,compression bpool/home
MOUNTPOINT   SHARENFS  COMPRESS
/export/zfs  on              on

Property Changes...

shareiscsi property, starting with the Solaris 10 8/07 release, you can create a ZFS volume as a Solaris iSCSI target device by setting the shareiscsi property on the ZFS volume. This method is a convenient way to quickly set up a Solaris iSCSI target.

chaos:/> zfs create -V 2g tank/volumes/v2
chaos:/> zfs set shareiscsi=on tank/volumes/v2
chaos:/> iscsitadm list target
Target: tank/volumes/v2
     iSCSI Name: iqn.1986-03.com.sun:02:984fe301-c412-ccc1-cc80-cf9a72aa062a
     Connections: 0

ZFS canmount property, starting with the Solaris 10 8/07 release, you use the canmount property to specify whether a dataset can be mounted by using the zfs mount command.

The first example shows a existing directory in /export/home on this system, the canmount property is used to "add" the ZFS home directory file systems to this existing UFS file system.

chaos:/> ls -F /export/home
tim/
chaos:/> df -h /export/home/tim
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0t0d0s0       13G   5.9G   7.3G    45%    /

chaos:/> zfs list
...
bpool/users                             102K  5.00G  28.5K  /bpool/users
bpool/users/curly                      24.5K  5.00G  24.5K  /bpool/users/curly
bpool/users/larry                      24.5K  5.00G  24.5K  /bpool/users/larry
bpool/users/moe                        24.5K  5.00G  24.5K  /bpool/users/moe
...


chaos:/> zfs set canmount=off bpool/users
chaos:/> zfs set mountpoint=/export/home bpool/users

chaos:/> zfs get mounted bpool/users
NAME         PROPERTY  VALUE        SOURCE
bpool/users  mounted   no           -

chaos:/> zfs get mounted bpool/users/larry
NAME               PROPERTY  VALUE              SOURCE
bpool/users/larry  mounted   yes                -

chaos:/>  ls -F /export/home
curly/  larry/  moe/    tim/

chaos:/> zfs list
...
bpool/users                             102K  5.00G  28.5K  /export/home
bpool/users/curly                      24.5K  5.00G  24.5K  /export/home/curly
bpool/users/larry                      24.5K  5.00G  24.5K  /export/home/larry
bpool/users/moe                        24.5K  5.00G  24.5K  /export/home/moe
...

The next example uses the canmount property to configure to sets of directories under the same mountpoint that can have different ZFS properties set.

chaos:/> zfs create -o mountpoint=/development -o canmount=off bpool/development
chaos:/> zfs create -o mountpoint=/development -o canmount=off bpool/admin
chaos:/> zfs create bpool/development/mernest
chaos:/> zfs create bpool/admin/fsayers

chaos:/> ls -F /development
fsayers/  mernest/

chaos:/> zfs set compression=on bpool/development

chaos:/> zfs get compression bpool/development/mernest
NAME                       PROPERTY     VALUE                      SOURCE
bpool/development/mernest  compression  on                         inherited from bpool/development
chaos:/> zfs get compression bpool/admin/fsayers
NAME                 PROPERTY     VALUE                SOURCE
bpool/admin/fsayers  compression  off                  default

chaos:/> zfs list
NAME                                    USED  AVAIL  REFER  MOUNTPOINT
...
bpool/admin                              49K  11.6G  24.5K  /development
bpool/admin/fsayers                    24.5K  11.6G  24.5K  /development/fsayers
...
bpool/development                        49K  11.6G  24.5K  /development
bpool/development/mernest              24.5K  11.6G  24.5K  /development/mernest
...


ZFS user properties, starting with the Solaris 10 8/07 release, ZFS supports user properties, in addition to the standard native properties that can either export internal statistics or control ZFS file system behavior. User properties have no effect on ZFS behavior, but you can use them to annotate data sets with information that is meaningful in your environment. User property names must contain a colon (":") character, to distinguish them from native properties.

chaos:/> zfs set org.timwort:backup=10/15/08 bpool/users

chaos:/> zfs list -o org.timwort:backup bpool/users
ORG.TIMWORT:BACKUP
10/15/08

chaos:/> zfs get  org.timwort:backup bpool/users
NAME         PROPERTY            VALUE               SOURCE
bpool/users  org.timwort:backup  10/15/08            local

chaos:/> zfs get all bpool/users
NAME         PROPERTY            VALUE                  SOURCE
bpool/users  type                filesystem             -
bpool/users  creation            Fri Sep 19  6:03 2008  -
bpool/users  used                102K                   -
bpool/users  available           5.00G                  -
bpool/users  referenced          28.5K                  -
bpool/users  compressratio       1.00x                  -
bpool/users  mounted             no                     -
bpool/users  quota               5G                     local
bpool/users  reservation         none                   default
bpool/users  recordsize          128K                   default
bpool/users  mountpoint          /export/home           local
bpool/users  sharenfs            on                     local
bpool/users  checksum            on                     default
bpool/users  compression         off                    default
bpool/users  atime               on                     default
bpool/users  devices             on                     default
bpool/users  exec                on                     default
bpool/users  setuid              on                     default
bpool/users  readonly            off                    default
bpool/users  zoned               off                    default
bpool/users  snapdir             hidden                 default
bpool/users  aclmode             groupmask              default
bpool/users  aclinherit          secure                 default
bpool/users  canmount            off                    local
bpool/users  shareiscsi          off                    default
bpool/users  xattr               on                     default
bpool/users  org.timwort:backup  10/15/08               local

The following sequence of commands removes the property from this dataset.

chaos:/> zfs inherit org.timwort:backup bpool/users

chaos:/> zfs list -o  org.timwort:backup bpool/users
ORG.TIMWORT:BACKUP
-

chaos:/> zfs get all bpool/users
NAME         PROPERTY       VALUE                  SOURCE
bpool/users  type           filesystem             -
bpool/users  creation       Fri Sep 19  6:03 2008  -
bpool/users  used           102K                   -
bpool/users  available      5.00G                  -
bpool/users  referenced     28.5K                  -
bpool/users  compressratio  1.00x                  -
bpool/users  mounted        no                     -
bpool/users  quota          5G                     local
bpool/users  reservation    none                   default
bpool/users  recordsize     128K                   default
bpool/users  mountpoint     /export/home           local
bpool/users  sharenfs       on                     local
bpool/users  checksum       on                     default
bpool/users  compression    off                    default
bpool/users  atime          on                     default
bpool/users  devices        on                     default
bpool/users  exec           on                     default
bpool/users  setuid         on                     default
bpool/users  readonly       off                    default
bpool/users  zoned          off                    default
bpool/users  snapdir        hidden                 default
bpool/users  aclmode        groupmask              default
bpool/users  aclinherit     secure                 default
bpool/users  canmount       off                    local
bpool/users  shareiscsi     off                    default
bpool/users  xattr          on                     default
chaos:/>

The ZFS Administration console can be accessed via https://(system-name):6789/zfs
(The link from this page will only work if this page is being displayed on a Solaris 10 system)

If the server is not running use:

# /usr/sbin/smcwebserver start

If you want the server to run automatically when the system boots:

# /usr/sbin/smcwebserver enable