View Source

!http://www.sun.com/bigadmin/home/images/bigadminHeaderWikiThumb.jpg!
{section:border=false}
{column:width=20%}
{include:TOC for Tech Tips}
{column}
{column:width=55%}
by Henry Pepper

h2. Introduction


h3. Purpose

This topic is ZFS for newbies.

The basic stuff you need to get started, and using it to play around with.

h3. Scope


h3. References

* [http://wiki.freebsd.org/ZFSQuickStartGuide] \- For FreeBSD, but very inspiring.
* [http://www.opensolaris.org/os/community/zfs/]

h2. About ZFS


h2. Creation


h3. Creating a pool, in a slice


h4. Instructions

{noformat}
# zpool create taz /dev/dsk/c0t0d0s4
{noformat}

h4. Discussion

'_taz_' is the name of the pool being created.
'_/dev/dsk/c0t0d0s4_' is the name of the slice.

h3. Creating a file system

By default, when you create a pool, it is mounted as a file system under root. In this example, the file system will be mounted as '_/taz_'. For many cases, this is sufficient.

In some cases, you may wish to change the policies for a file system under the pool. For example, you might want to set a quota or make the file system read-only. In that case, you can create additional file systems and change their policies.
{noformat}
# zfs create taz/image_storage
# zfs set quota=15g taz/image_storage
# zfs set readonly=on taz/image_storage
{noformat}
The policies are set via properties.  The list of available properties depends on the version of ZFS in use. You can see the available policies by using the \_zfs get\_ subcommand.  For convenience, policies are inherited from the parent file system.
{noformat}
# zfs get all taz/image_storage
{noformat}

h2. Administration


h3. Listing the ZFS file systems

{noformat}
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
taz 98.5K 42.6G 18K /taz
taz/image_storage 18K 15.0G 18K /taz/image_storage
{noformat}

h3. zpool status

{noformat}
# zpool status taz
pool: taz
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
taz ONLINE 0 0 0
c1t0d0s7 ONLINE 0 0 0

errors: No known data errors
{noformat}

h3. Mounting a zfs file system.


h2. Troubleshooting

{column}
{section}

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact