View Source

h2. How to Monitor ZFS Disk Space
This procedure describes how to monitor disk space in your ZFS storage pool and file systems.

h5. Steps
# {include:root_step}
# *Identify space in your ZFS storage pool.*
For example, this {{rpool}} storage pool, 111 Gbytes in size, has 108 Gbytes of space available to the ZFS file systems in the pool.
{code}
# /usr/sbin/zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
rpool 111G 3.44G 108G 3% ONLINE -
{code}
# *Identify space in your ZFS file systems.*
In the following example, most of the file systems have plenty of disk space.
{code}
# /usr/sbin/zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 3.76G 106G 78.5K /rpool
rpool/ROOT 2.77G 106G 19K legacy
rpool/ROOT/opensolaris 2.77G 106G 2.74G /
rpool/dump 507M 106G 507M -
rpool/export 62K 106G 21K /export
rpool/export/home 41K 106G 22K /export/home
rpool/export/home/otto 19K 106G 19K /export/home/otto
rpool/swap 512M 106G 181M -
{code}
# *Conserve file system space.*
If you create a ZFS file system for storing data, you might consider using quotas to keep disk usage to a minimum. File system properties, such as quotas and compression, can be enabled during the creation of a file system or after the file system is created. Keep in mind that enabling compression on a file system with existing data only compresses new data. Existing data remains uncompressed. For example:
{code}
# zfs create -o compression=on rpool/export/home/data
{code}
Another option is to set a quota on any file system that limits the amount of disk space it can use. For example:
{code}
# zfs set quota=10G rpool/export/home/data
{code}
For more information about using ZFS quotas, see [ZFS Quotas and Reservations | http://docs.sun.com/app/docs/doc/817-2271/gazvb?a=view].
{include:bottom_navigation}

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