"usedsnap" is the amount of space consumed by all snapshots. Ie, the amount of space that would be recovered if all snapshots were to be deleted.
The space "used" by any one snapshot is the space that would be recovered if that snapshot was deleted. Ie, the amount of space that is unique to that snapshot. Any space "usedbysnap" that is shared by multiple snapshots will not show up in any snapshot's "used". Therefore, deleting a snapshot can increase the adjacent snapshots' "used" space. So in general, "usedbysnaps" >= sum("used" by each snapshot). You can read more about the "used" property in the zfs(1m) manpage. The bug mentioned below (6792701) is not related to this phenomenon, it manifests as a discrepancy between the filesystem's (or a snapshot's) "referenced" space and the amount of space accessible through posix interfaces (eg, du(1)). --matt On Mon, Dec 6, 2010 at 4:09 AM, Joost Mulders <joost...@gmail.com> wrote: > Hi, > > I've output of space allocation which I can't explain. I hope someone can > point me at the right direction. > > The allocation of my "home" filesystem looks like this: > > jo...@onix$ zfs list -o space p0/home > NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD > p0/home 31.0G 156G 86.7G 69.7G 0 0 > > This tells me that *86,7G* is used by *snapshots* of this filesystem. > However, when I look at the space allocation of the snapshots, I don't see > the 86,7G back! > > jo...@onix$ zfs list -t snapshot -o space | egrep 'NAME|^p0\/home' > NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD > p0/h...@s1 - 62.7M - - - - > p0/h...@s2 - 53.1M - - - - > p0/h...@s3 - 34.1M - - - - > p0/h...@s4 - 277M - - - - > p0/h...@s5 - 2.21G - - - - > p0/h...@s6 - 175M - - - - > p0/h...@s7 - 46.1M - - - - > p0/h...@s8 - 47.6M - - - - > p0/h...@s9 - 43.0M - - - - > p0/h...@s10 - 64.1M - - - - > p0/h...@s11 - 563M - - - - > p0/h...@s12 - 76.6M - - - - > > The sum of the USED column is only some 3,6G, so the question is "to what is > the 86,7G of USEDSNAP allocated?" Ghost snapshots? > > This is with zpool version 22. This zpool was used a year or so in onnv-129. > I upgraded the host recently to build 151a but I didn't upgrade the pool > yet. > > Any pointers are appreciated! > > Joost > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss