How to Monitor ZFS Disk Space

How to Monitor ZFS Disk Space

This procedure describes how to monitor disk space in your ZFS storage pool and file systems.

Steps
  1. Start a privileged shell.

    user@opensolaris:-$ pfexec bash
    #
    

    In this example, the bash shell is selected. You can choose to use any shell with the pfexec command. If you support multiple versions of the SolarisTM OS, use the standard su – root command. The su command works on all Solaris versions.

  2. 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.
    # /usr/sbin/zpool list
    NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
    rpool   111G  3.44G   108G     3%  ONLINE  -
    
  3. Identify space in your ZFS file systems.
    In the following example, most of the file systems have plenty of disk space.
    # /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  -
    
  4. 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:
    # zfs create -o compression=on rpool/export/home/data
    

    Another option is to set a quota on any file system that limits the amount of disk space it can use. For example:

    # zfs set quota=10G rpool/export/home/data
    

    For more information about using ZFS quotas, see ZFS Quotas and Reservations .


    For more information:

Labels

osoladmin osoladmin Delete
task task Delete
filesystem filesystem Delete
zfs zfs Delete
monitoring monitoring Delete
diskspace diskspace Delete
admin admin Delete
sundoc sundoc Delete
singleadmin singleadmin Delete
smallsiteadmin smallsiteadmin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Dec 24, 2008

    Alysson_Troffer says:

    In steps 2 and 3, the wording "Identify space..." sounds a bit awkward to my ear...

    In steps 2 and 3, the wording "Identify space..." sounds a bit awkward to my ear. Could you instead say something like: "Identify the used and available disk space..."?

Sign up or Log in to add a comment or watch this page.


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