How to Monitor ZFS Disk Space
This procedure describes how to monitor disk space in your ZFS storage pool and file systems.
Steps
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.
- 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 -
- 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 -
- 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:


Comments (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..."?