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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. Solaris ZFS : How to Designate Hot Spares in a Storage Pool
  2. How to log SSH login attempts to a file in Solaris
  3. How to configure Solaris 10 Probe based IPMP
  4. 7 Useful Find Command Examples to Locate files to remove when a filesystem is full
  5. Solaris : How to find number of open files by a process
  6. Solaris : How to create processor set (pset) and associate it with a pool
  7. How to add Additional Storage Space Created from Dynamic LUN Expansion in ZFS online
  8. How to measure NIC Performance/Throughput in Solaris 11 using iftop
  9. Solaris : How to increase the Inodes on UFS file system with newfs command
  10. Troubleshooting Solaris IPMP

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright