I think I''m seeing an error in the output from zfs list with regards to snapshot space utilization. In the first list, there are 818M used by snapshots, but the snaps listed aren''t using anything close to that amount. If I destroy the first snapshot, then the second one suddenly jumps in space used to 813M, which seems about right and the USEDSNAP column makes sense. Is this a bug in snapshot accounting or reporting, or is there something I missed? root at basestar:/export/vmware# zfs list -t all -r -o space tank/export/volumes/caliban NAME AVAIL?? USED? USEDSNAP? USEDDS? USEDREFRESERV? USEDCHILD tank/export/volumes/caliban 3.09T? 1.59G????? 818M??? 813M????????????? 0????????? 0 tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-10:00 ???? -? 2.88M???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-11:00 ???? -? 2.80M???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-12:00 ???? -?? 200K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:15 ???? -?? 174K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:30 ???? -?? 252K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:45 ???? -?? 340K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-13:00 ???? -????? 0???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-13:00 ???? -????? 0???????? -?????? -????????????? -????????? - root at basestar:/export/vmware# zfs destroy tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-10:00 root at basestar:/export/vmware# zfs list -t all -r -o space tank/export/volumes/caliban NAME AVAIL?? USED? USEDSNAP? USEDDS? USEDREFRESERV? USEDCHILD tank/export/volumes 3.09T? 39.3G???????? 0?? 47.1K????????????? 0????? 39.3G tank/export/volumes/caliban 3.09T? 1.59G????? 815M??? 813M????????????? 0????????? 0 tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-11:00 ???? -?? 813M???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-12:00 ???? -?? 200K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:15 ???? -?? 174K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:30 ???? -?? 252K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:45 ???? -?? 340K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-13:00 ???? -????? 0???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-13:00 ???? -????? 0???????? -?????? -????????????? -????????? - root at basestar:/export/vmware# zfs destroy tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-11:00 root at basestar:/export/vmware# zfs list -t all -r -o space tank/export/volumes/caliban NAME AVAIL?? USED? USEDSNAP? USEDDS? USEDREFRESERV? USEDCHILD tank/export/volumes/caliban 3.09T?? 815M???? 2.04M??? 813M????????????? 0????????? 0 tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-12:00 ???? -?? 200K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:15 ???? -?? 174K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:30 ???? -?? 252K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-12:45 ???? -?? 340K???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:hourly-2010-03-19-13:00 ???? -????? 0???????? -?????? -????????????? -????????? - tank/export/volumes/caliban at zfs-auto-snap:frequent-2010-03-19-13:00 ???? -????? 0???????? -?????? -????????????? -????????? - -- Brandon High : bhigh at freaks.com
>>>>> "bh" == Brandon High <bhigh at freaks.com> writes:bh> I think I''m seeing an error in the output from zfs list with bh> regards to snapshot space utilization. no bug. You just need to think harder about it: the space used cannot be neatly put into buckets next to each snapshot that add to the total, just because of...math. To help understand, suppose you decide, just to fuck things up, that from now on every time you take a snapshot you take two snapshots, with exactly zero filesystem writing happening between the two. What do you want ''zfs list'' to say now? What does happen if you do that, is it says all snapshots use zero space. the space shown in zfs list is the amount you''d get back if you deleted this one snapshot. Yes, every time you delete a snapshot, all the numbers reshuffle. Yes, there is a whole cat''s cradle of space accounting information hidden in there that does not come out through ''zfs list''. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 304 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100319/4dd8854e/attachment.bin>