Robert Milkowski
2006-Sep-09 17:52 UTC
[zfs-discuss] Used space accounting - problem with snapshots
Hi. bash-3.00# zfs get quota f3-1/d611 NAME PROPERTY VALUE SOURCE f3-1/d611 quota 400G local bash-3.00# bash-3.00# zfs list | egrep "^f3-1 |f3-1/d611|AVA" NAME USED AVAIL REFER MOUNTPOINT f3-1 454G 751G 17.2G //f3-1 f3-1/d611 360G 39.8G 265G //f3-1/d611 f3-1/d611 at auto-2006-09-05 28.1G - 193G - f3-1/d611 at auto-2006-09-06 19.9G - 223G - f3-1/d611 at auto-2006-09-08 16.1G - 245G - f3-1/d611 at auto-2006-09-09 8.22G - 259G - bash-3.00# bash-3.00# bc 28+20+16+8 72 265+72 337 bash-3.00# But 360GB supposed to be used by f3-1/d611. Something is wrong with accounting here (or I''m really tired). bash-3.00# zpool status f3-1 pool: f3-1 state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM f3-1 ONLINE 0 0 0 c5t600C0FF000000000098FD516E4403200d0 ONLINE 0 0 0 c5t600C0FF000000000098FD55DBA4EA000d0 ONLINE 0 0 0 c5t600C0FF000000000098FD57F9DA83C00d0 ONLINE 0 0 0 errors: No known data errors bash-3.00# This message posted from opensolaris.org
Matthew Ahrens
2006-Sep-09 19:09 UTC
[zfs-discuss] Used space accounting - problem with snapshots
Robert Milkowski wrote:> Hi. > > bash-3.00# zfs get quota f3-1/d611 > NAME PROPERTY VALUE SOURCE > f3-1/d611 quota 400G local > bash-3.00# > > bash-3.00# zfs list | egrep "^f3-1 |f3-1/d611|AVA" > NAME USED AVAIL REFER MOUNTPOINT > f3-1 454G 751G 17.2G //f3-1 > f3-1/d611 360G 39.8G 265G //f3-1/d611 > f3-1/d611 at auto-2006-09-05 28.1G - 193G - > f3-1/d611 at auto-2006-09-06 19.9G - 223G - > f3-1/d611 at auto-2006-09-08 16.1G - 245G - > f3-1/d611 at auto-2006-09-09 8.22G - 259G - > bash-3.00# > > bash-3.00# bc > 28+20+16+8 > 72 > 265+72 > 337 > bash-3.00# > > But 360GB supposed to be used by f3-1/d611. > Something is wrong with accounting here (or I''m really tired).So here you have a filesystem (f3-1/d11) using 265GB, plus some snapshots that are using 360-265=95GB. Of that 95GB, 28+20+16+8=72GB is unique to one of the 4 snapshots, and 95-72=23GB is shared between at least 2 of the snapshots. See zfs(1m) section DESCRIPTION - Properties - used: used ... When snapshots (see the "Snapshots" section) are created, their space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, space that was previously shared becomes unique to the snapshot, and counted in the snapshot''s space used. Additionally, deleting snapshots can increase the amount of space unique to (and used by) other snapshots. --matt
Wee Yeh Tan
2006-Sep-10 03:36 UTC
[zfs-discuss] Used space accounting - problem with snapshots
On 9/10/06, Matthew Ahrens <Matthew.Ahrens at sun.com> wrote:> Robert Milkowski wrote: > > Hi. > > > > bash-3.00# zfs get quota f3-1/d611 > > NAME PROPERTY VALUE SOURCE > > f3-1/d611 quota 400G local > > bash-3.00# > > > > bash-3.00# zfs list | egrep "^f3-1 |f3-1/d611|AVA" > > NAME USED AVAIL REFER MOUNTPOINT > > f3-1 454G 751G 17.2G //f3-1 > > f3-1/d611 360G 39.8G 265G //f3-1/d611 > > f3-1/d611 at auto-2006-09-05 28.1G - 193G - > > f3-1/d611 at auto-2006-09-06 19.9G - 223G - > > f3-1/d611 at auto-2006-09-08 16.1G - 245G - > > f3-1/d611 at auto-2006-09-09 8.22G - 259G - > > bash-3.00# > > > > bash-3.00# bc > > 28+20+16+8 > > 72 > > 265+72 > > 337 > > bash-3.00# > > > > But 360GB supposed to be used by f3-1/d611. > > Something is wrong with accounting here (or I''m really tired). > > So here you have a filesystem (f3-1/d11) using 265GB, plus some > snapshots that are using 360-265=95GB. Of that 95GB, 28+20+16+8=72GB is > unique to one of the 4 snapshots, and 95-72=23GB is shared between at > least 2 of the snapshots. > > See zfs(1m) section DESCRIPTION - Properties - used: > > used > ... > > When snapshots (see the "Snapshots" section) are > created, their space is initially shared between the > snapshot and the file system, and possibly with previous > snapshots. As the file system changes, space that was > previously shared becomes unique to the snapshot, and > counted in the snapshot''s space used. Additionally, > deleting snapshots can increase the amount of space > unique to (and used by) other snapshots. > > --mattCan we have this in the ZFS FAQ? The man-page should say "...space that was previously shared may become unique to ..." and perhaps add a note saying" "If the space continues to be shared by multiple snapshots, it continues to be counted towards the parent file system." -- Just me, Wire ...
Robert Milkowski
2006-Sep-12 11:47 UTC
[zfs-discuss] Used space accounting - problem with snapshots
Hello Matthew, Saturday, September 9, 2006, 9:09:07 PM, you wrote: MA> Robert Milkowski wrote:>> Hi. >> >> bash-3.00# zfs get quota f3-1/d611 >> NAME PROPERTY VALUE SOURCE >> f3-1/d611 quota 400G local >> bash-3.00# >> >> bash-3.00# zfs list | egrep "^f3-1 |f3-1/d611|AVA" >> NAME USED AVAIL REFER MOUNTPOINT >> f3-1 454G 751G 17.2G //f3-1 >> f3-1/d611 360G 39.8G 265G //f3-1/d611 >> f3-1/d611 at auto-2006-09-05 28.1G - 193G - >> f3-1/d611 at auto-2006-09-06 19.9G - 223G - >> f3-1/d611 at auto-2006-09-08 16.1G - 245G - >> f3-1/d611 at auto-2006-09-09 8.22G - 259G - >> bash-3.00# >> >> bash-3.00# bc >> 28+20+16+8 >> 72 >> 265+72 >> 337 >> bash-3.00# >> >> But 360GB supposed to be used by f3-1/d611. >> Something is wrong with accounting here (or I''m really tired).MA> So here you have a filesystem (f3-1/d11) using 265GB, plus some MA> snapshots that are using 360-265=95GB. Of that 95GB, 28+20+16+8=72GB is MA> unique to one of the 4 snapshots, and 95-72=23GB is shared between at MA> least 2 of the snapshots. MA> See zfs(1m) section DESCRIPTION - Properties - used: MA> used MA> ... MA> When snapshots (see the "Snapshots" section) are MA> created, their space is initially shared between the MA> snapshot and the file system, and possibly with previous MA> snapshots. As the file system changes, space that was MA> previously shared becomes unique to the snapshot, and MA> counted in the snapshot''s space used. Additionally, MA> deleting snapshots can increase the amount of space MA> unique to (and used by) other snapshots. Ok, thanks - I overlooked it. -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com