I deleted a large file (many gigs) from a Solaris system and it didn't seem to recover the amount of space on the zpool equal to the size of the file. Is there any reason that I wouldn't see this space immediately? What steps are involved in the deletion of files in a ZFS?

1 Answer 1


There are several possibilities for the space freed not equaling the size of the file.

  • Compression - you might have compression turned on on the filesystem, and the file may have been compressed.
  • Sparse files - if the file created was a sparse file, then any contiguous blank areas of the file will take up almost no space on the drive, and so deleting the file won't recover the amount of space you might think.
  • Snapshots - I suspect this is the reason for what you're seeing. If you have a snapshot that references that file, then the data is still in use and won't be recovered. You need to remove any snapshots to completely recover the space. If the file changed since you made the snapshot, then you will recover part of the space (the amount changed since the snapshot), but the unchanged parts of the file are still referenced by the snapshot itself.
  • Dedup - This is a newer feature that you probably don't have enabled, but I'm including it as a possibility. Dedup finds blocks that are identical and only stores them once. If you delete a file that references one of these blocks, then you won't recover the space as it is being referenced by another file.
  • Be very careful when using the dedup option. Distributions like FreeNAS typically have FAQs on why ZFS is terribly slow when running dedup: it takes about 5MB of memory 1GB of space to dedup, so if you have 5TB of space, you might need 25GB ram to use it efficiently. See this writeup: constantin.glez.de/blog/2011/07/zfs-dedupe-or-not-dedupe Nov 7, 2013 at 5:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .