• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to find the space consumed by ZFS snapshots

By admin

When a snapshot is created, its space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, space that was previously shared becomes unique to the snapshot, and thus is counted in the snapshot’s used property.

Additionally, deleting snapshots can increase the amount of space that is unique for use by other snapshots.

Note: The value for a snapshot’s space referenced property is the same as that for the file system when the snapshot was created.

Snapshot Space Accounting

You can display the amount of space that is consumed by snapshots and descendant file systems by using the zfs list -o space command (as in the example below).

You can enable or disable the display of snapshot listings in the zfs list output by using the listsnapshots pool property. This property is disabled by default. To enable this property, use zpool set listsnapshots=on, followed by the pool name. For example :

# zpool set listsnapshots=on rpool
# zfs list -o space -r rpool
NAME                             AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
rpool                            10.2G  5.16G         0   4.52M              0      5.15G
rpool/ROOT                       10.2G  3.06G         0     31K              0      3.06G
rpool/ROOT/solaris               10.2G  3.06G     55.0M   2.78G              0       224M
rpool/ROOT/solaris@install           -  55.0M         -       -              -          -
rpool/ROOT/solaris/var           10.2G   224M     2.51M    221M              0          0
rpool/ROOT/solaris/var@install       -  2.51M         -       -              -          -
rpool/VARSHARE                   10.2G  2.52M         0   2.43M              0        94K
rpool/VARSHARE/pkg               10.2G    63K         0     32K              0        31K
rpool/VARSHARE/pkg/repositories  10.2G    31K         0     31K              0          0
rpool/VARSHARE/zones             10.2G    31K         0     31K              0          0
rpool/dump                       10.3G  1.03G         0   1.00G          32.5M          0
rpool/export                     10.2G  30.1M         0     32K              0      30.1M
rpool/export/home                10.2G  30.1M         0     32K              0      30.1M
rpool/export/home@friday             -      0         -       -              -          -
rpool/export/home/geek           10.2G  30.1M       20K   30.0M              0          0
rpool/export/home/geek@2days         -    20K         -       -              -          -
rpool/swap                       10.3G  1.03G         0   1.00G          32.5M          0

From this output, you can see the amount of space that is:

  • Available on each file system
  • Being used
  • Being consumed by snapshots of each data set (USEDSNAP)
  • Being used by the data set itself (USEDDS)
  • Being used by a refreservation set on the data set (USED REFRESERV)
  • Being used by the children of this data set (USEDCHILD)

Filed Under: Solaris, Solaris 11, ZFS

Some more articles you might also be interested in …

  1. How to enable Solaris multipathing (MPxIO or STMS) for EMC Symmetrix LUNs
  2. Solaris 11 : Increasing the size of a vdisk in LDom ( with backend device as ZFS volume )
  3. Solaris ZFS : How to Designate Hot Spares in a Storage Pool
  4. How to configure Probe Based IPMP in Solaris 11
  5. Managing network resources in Solaris 11 using “dlstat” and “flowstat”
  6. How To Determine Approximate Solaris Crash Dump File Size Requirements
  7. Solaris Performance troubleshooting : Disk (I/O) performance issues
  8. Solaris 11 IPS pkg Command Examples
  9. Solaris ZFS : How to Offline / Online / Detach / Replace device in a storage pool
  10. How to log SSH login attempts to a file in Solaris

You May Also Like

Primary Sidebar

Recent Posts

  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • How Realms Work in Oracle Database Vault
  • How to use Privilege Analysis in Oracle Database
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary