Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #207435

Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)

From Matthew Crews <mailinglists@mattcrews.com>
Newsgroups linux.debian.user
Subject Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...)
Date 2019-04-14 03:00 +0200
Message-ID <xMBEZ-8mz-1@gated-at.bofh.it> (permalink)
References (1 earlier) <xMc3U-UC-5@gated-at.bofh.it> <xMsV3-2VN-5@gated-at.bofh.it> <xMuk9-3We-1@gated-at.bofh.it> <xMBlD-8fr-1@gated-at.bofh.it> <xMBvj-8jq-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 4/13/19 5:40 PM, Peter Wiersig wrote:
> Peter Wiersig <peter@friesenpeter.de> writes:
>>
>> I would be pissed if my OS removes snapshots I might or might not need
>> in the future.  That's a release critical bug in my eyes.  Yeah, I know
>> Microsoft and Apple do that automatically if your capacity runs out, but
>> that's also why I don't recommend them at all.
> 
> Ok, I checked https://en.opensuse.org/Portal:Snapper and they do support
> LVM and ext4, and they have a bullet of auto-removing old snapshots.  I
> hope they did it right, perhaps I need to make a new test drive with the
> latest release.
> 
> Snapshots on ZFS can't be zero cost, so you need to account for them
> there, too.
> 
> Peter
> 

ZFS Snapshots are nearly zero cost to create the snapshot, since ZFS
(and likewise BTRFS) are copy-on-write file systems. What it does is
records the deltas after the snapshots.

This is a good thinkg as it saves on disk space.

For example:

You create a random 10 MB file, and take a snapshot. You then alter the
5 tail MBs and add five more MBs at the tail. You are left with:

Pre-Snapshot | 5MB chunk #1 | 5MB chunk #2 |  - total 10MBs
Post-Snapshot | 5MB chunk #1 | 5MB chunk #3 | 5MB chunk #4 | - total 15MBs

Actual disk usage will be 20 MBs, since the 5MB chunk #1 is only
recorded on disk once, not twice.

Here is a good talk on the subject by Michael Lucas, one of the premier
experts on ZFS. Its worth noting that a lot of the concepts apply to
BTRFS to varying degrees:

https://www.youtube.com/watch?v=x9A0dX2WqW8

-Matt

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

New laptop: need advice on choice of file system types Tom Browder <tom.browder@gmail.com> - 2019-04-12 17:00 +0200
  Re: New laptop: need advice on choice of file system types Dan Ritter <dsr@randomstring.org> - 2019-04-12 18:50 +0200
    Re: New laptop: need advice on choice of file system types Tom Browder <tom.browder@gmail.com> - 2019-04-12 19:20 +0200
      Re: New laptop: need advice on choice of file system types Brian <ad44@cityscape.co.uk> - 2019-04-12 23:40 +0200
      Re: New laptop: need advice on choice of file system types Dan Ritter <dsr@randomstring.org> - 2019-04-13 00:10 +0200
    Re: New laptop: need advice on choice of file system types Default User <hunguponcontent@gmail.com> - 2019-04-12 20:30 +0200
      Re: New laptop: need advice on choice of file system types Dan Ritter <dsr@randomstring.org> - 2019-04-13 00:10 +0200
        Re: New laptop: need advice on choice of file system types Default User <hunguponcontent@gmail.com> - 2019-04-13 02:30 +0200
    Re: New laptop: need advice on choice of file system types Thomas D Dial <tdial@acm.org> - 2019-04-13 00:10 +0200
      Re: New laptop: need advice on choice of file system types Curt <curty@free.fr> - 2019-04-13 10:10 +0200
        Re: New laptop: need advice on choice of file system types Dan Ritter <dsr@randomstring.org> - 2019-04-13 15:30 +0200
  Re: New laptop: need advice on choice of file system types Felix Miata <mrmazda@earthlink.net> - 2019-04-12 23:40 +0200
    Re: New laptop: need advice on choice of file system types Anders Andersson <pipatron@gmail.com> - 2019-04-13 17:40 +0200
      Re: BTRFS snapshot space consumption (was: New laptop: need advice on  choice...) Felix Miata <mrmazda@earthlink.net> - 2019-04-13 19:10 +0200
        Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...) deloptes <deloptes@gmail.com> - 2019-04-13 23:20 +0200
        Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...) Peter Wiersig <peter@friesenpeter.de> - 2019-04-14 02:40 +0200
          Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...) Peter Wiersig <peter@friesenpeter.de> - 2019-04-14 02:50 +0200
            Re: BTRFS snapshot space consumption (was: New laptop: need advice on  choice...) Matthew Crews <mailinglists@mattcrews.com> - 2019-04-14 03:00 +0200
              Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...) Peter Wiersig <peter@friesenpeter.de> - 2019-04-14 15:10 +0200
                Re: BTRFS snapshot space consumption (was: New laptop: need advice  on choice...) Dan Ritter <dsr@randomstring.org> - 2019-04-15 01:10 +0200
                Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...) Peter Wiersig <peter@friesenpeter.de> - 2019-04-15 05:20 +0200
        Re: BTRFS snapshot space consumption (was: New laptop: need advice on choice...) Anders Andersson <pipatron@gmail.com> - 2019-04-14 10:30 +0200
    Re: New laptop: need advice on choice of file system types Jonathan Dowland <jmtd@debian.org> - 2019-04-15 16:30 +0200
      Re: New laptop: need advice on choice of file system types Felix Miata <mrmazda@earthlink.net> - 2019-04-15 19:40 +0200
        Re: New laptop: need advice on choice of file system types Jonathan Dowland <jmtd@debian.org> - 2019-04-16 10:20 +0200
          Re: New laptop: need advice on choice of file system types Felix Miata <mrmazda@earthlink.net> - 2019-04-16 21:30 +0200
  Re: New laptop: need advice on choice of file system types Anders Andersson <pipatron@gmail.com> - 2019-04-13 17:50 +0200
  Re: New laptop: need advice on choice of file system types Jonathan Dowland <jmtd@debian.org> - 2019-04-15 16:40 +0200
  Re: New laptop: need advice on choice of file system types Tom Browder <tom.browder@gmail.com> - 2019-04-15 16:40 +0200
    Re: New laptop: need advice on choice of file system types Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-04-16 20:40 +0200
      Re: New laptop: need advice on choice of file system types Jonas Smedegaard <jonas@jones.dk> - 2019-04-16 22:00 +0200
      Re: New laptop: need advice on choice of file system types Jonathan Dowland <jmtd@debian.org> - 2019-04-17 12:40 +0200

csiph-web