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.
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.
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.
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.
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.
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: