The calculation isn't terribly smart - it simply sums up the size of all the snapshots, which might not be accurate as multiple snapshots may point to the same SSTable as they are hardlinks. It really shouldn't be called TrueDiskSpaceUsed, but for some reason no one is considering it a bug.
https://issues.apache.org/jira/browse/CASSANDRA-14587 The excess disk usage you have used by snapshots may be dropped tables/keyspaces though? I'd suspect that potentially if you dropped a table/keyspace and it was snapshotted then listsnapshots may not necessarily count those snapshots in its calculation (as it no longer knows about the keyspace/table, even if you recreated it with the same name). >From your output it looks like you've dropped the doc keyspace and recreated it, and all that's left in the old keyspace is the snapshots directory (with all the old data). On Wed, Feb 17, 2021 at 2:01 PM Joe Obernberger < joseph.obernber...@gmail.com> wrote: > No problem. I'll use another node: > nodetool listsnapshots > Snapshot Details: > Snapshot name Keyspace name Column family name > True size Size on disk > truncated-1613059667093-extractedmetadata doc extractedmetadata > 4.95 GiB 7.28 GiB > truncated-1602601547738-events system_traces events > 0 bytes 13 bytes > truncated-1604519912224-extractedmetadata doc extractedmetadata > 0 bytes 1.37 KiB > truncated-1609811730310-ftametrics doc ftametrics > 1.82 MiB 1.82 MiB > truncated-1609796926725-ftametrics doc ftametrics > 950.44 KiB 951.91 KiB > truncated-1602601534667-events system_traces events > 295.21 KiB 295.29 KiB > truncated-1613399357065-seq doc seq > 4.92 KiB 5.76 KiB > truncated-1605902571860-binary_data doc binary_data > 927.67 MiB 927.67 MiB > truncated-1613059547373-binary_docs doc binary_docs > 1.84 MiB 1.84 MiB > truncated-1605902572782-binary_docs doc binary_docs > 58.99 KiB 59.97 KiB > truncated-1613171349472-seq doc seq > 0 bytes 842 bytes > truncated-1613399333362-datasources doc datasources > 5.32 KiB 6.32 KiB > truncated-1613059536535-binary_data doc binary_data > 5.58 GiB 5.58 GiB > truncated-1607634105573-ftametrics doc ftametrics > 188.26 KiB 189.64 KiB > truncated-1613171359585-datasources doc datasources > 0 bytes 998 bytes > truncated-1602697810806-events system_traces events > 0 bytes 13 bytes > truncated-1602601654389-events system_traces events > 0 bytes 13 bytes > > Total TrueDiskSpaceUsed: 11.44 GiB > > I just picked one directory: > pwd > /mysqlData2/cassandra/doc/doc-f4845f60fd2311eab6e21593630dfb58 > du -s -h ./* > 12K ./backups > 142G ./snapshots > > I've not cleared the snapshots from this node - let me know if you want > other information. > > -Joe > > On 2/16/2021 7:32 PM, Erick Ramirez wrote: > > That said, the "Total TrueDiskSpaceUsed: 16.09 GiB" seems to be way off? >> Or is that value something else? >> > It's a bit late now since you've cleared them but it would have been good > to check the size of each snapshot directory with du and validate it > against the listsnapshots output. > > FWIW snapshots are hardlinks to the same inodes as the original files. > I've explained how it works in this post -- > https://community.datastax.com/questions/5967/. Cheers! > > > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free. > www.avg.com > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_9075256727678417635_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > >