Among all my snapshots, I'm interested about space consumption of some
of them. Is it possible to calculate how much space would be freed if
I destroy only some of all snapshots?
zfs list -t snapshot
that'll show you their sizes as well as other details
Vennlige hilsener / Best regards
roy
Okay, let's think about this situation:
machine# zfs get used storage
NAME PROPERTY VALUE SOURCE
storage used 1,00G -
It seems my storage consumes one gigabyte in total, and that sounds
logical, since I've had one 512MB and two 256MB files in my pool, in
different snapshots. There has been file removings, etc., but all of
those three files are still there, stored in some snapshots. Now lets
list snapshots:
machine# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
stor...@snapshot_1 18K - 512M -
stor...@snapshot_2 0 - 769M -
stor...@snapshot_3 0 - 769M -
stor...@snapshot_4 0 - 769M -
stor...@snapshot_5 0 - 769M -
This is the important moment. I would like to know how much space
would become free if I destroy snapshots 4 and 5. Normally I cannot
destroy them, but here, in this test I can. So lets find out:
machine# zfs destroy stor...@snapshot_5
machine# zfs destroy stor...@snapshot_4
And then check used space again
machine# zfs get used storage
NAME PROPERTY VALUE SOURCE
storage used 769M -
About 256MB was released, but that number cannot be calculated from
those that were given from "zfs list -t snapshot" (0, 0, 769M and
769M). I also tried "zfs list -o all -t snapshot" but that did not
give any interesting numbers.
I think this is because snapshots 4 and 5 are the only snapshots that
contain one 256MB file. If they are examined one snapshot at a time,
then it looks like the data is not unique, but if there would be
possible to examine them "as a whole", then it would reveal that these
two snapshots are the only ones where the file exist. This would mean
that when destroying both of them, the file would be destroyed and
256MB would be freed.
Henrik Heino
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss