Results 1 to 4 of 4

Thread: Is it safe to remove these BTRFS snapshots?

  1. #1

    Default Is it safe to remove these BTRFS snapshots?

    Updating my old OpenSUSE 13.1 to Tumbleweed, I made the mistake of setting / as btrfs, as recommended. It quickly filled my partition to the point of not being able to do more updates. I have managed to disable all new snapshots, and remove the newer ones, but I am wondering whether it is safe to remove the following ones, still left:

    Code:
    Type   | # | Pre # | Date                             | User | Cleanup | Description           | Userdata     
    -------+---+-------+----------------------------------+------+---------+-----------------------+--------------
    single | 0 |       |                                  | root |         | current               |              
    single | 1 |       | Mon 07 Aug 2017 04:07:50 PM CEST | root |         | first root filesystem |              
    single | 2 |       | Mon 07 Aug 2017 04:50:55 PM CEST | root | number  | after installation    | important=yes
    
    seafire:~ # du -hs /.snapshots/*
    7.7G    /.snapshots/1
    7.9G    /.snapshots/2
    4.0K    /.snapshots/grub-snapshot.cfg
    
    seafire:~ # df -h /
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        19G   14G  3.9G  79% /
    Otherwise I will need to reinstall with ext4: right now I still don't have enough space left for an update.

    Thank you!
    HP Compaq 6730s Notebook
    * Intel Core2 Duo T9600 2.8GHz 1066MHz 6Mb
    * 4Gb DDR2 800MHz
    * Intel Mobile GM45 Express / ICH9M

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,102
    Blog Entries
    15

    Default Re: Is it safe to remove these BTRFS snapshots?

    Quote Originally Posted by escaner View Post
    Updating my old OpenSUSE 13.1 to Tumbleweed, I made the mistake of setting / as btrfs, as recommended. It quickly filled my partition to the point of not being able to do more updates. I have managed to disable all new snapshots, and remove the newer ones, but I am wondering whether it is safe to remove the following ones, still left:

    Code:
    Type   | # | Pre # | Date                             | User | Cleanup | Description           | Userdata     
    -------+---+-------+----------------------------------+------+---------+-----------------------+--------------
    single | 0 |       |                                  | root |         | current               |              
    single | 1 |       | Mon 07 Aug 2017 04:07:50 PM CEST | root |         | first root filesystem |              
    single | 2 |       | Mon 07 Aug 2017 04:50:55 PM CEST | root | number  | after installation    | important=yes
    
    seafire:~ # du -hs /.snapshots/*
    7.7G    /.snapshots/1
    7.9G    /.snapshots/2
    4.0K    /.snapshots/grub-snapshot.cfg
    
    seafire:~ # df -h /
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        19G   14G  3.9G  79% /
    Otherwise I will need to reinstall with ext4: right now I still don't have enough space left for an update.

    Thank you!
    Hi
    No, leave those, your assumption is incorrect with disk usage for snapshots, what you need to do is balance btrfs;
    Code:
    /etc/cron.weekly/btrfs-balance
    See how that goes...
    Last edited by malcolmlewis; 11-Oct-2017 at 05:28.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Sep 2012
    Posts
    5,197

    Default Re: Is it safe to remove these BTRFS snapshots?

    Quote Originally Posted by escaner View Post
    I am wondering whether it is safe to remove the following ones, still left:
    One of them is your current root filesystem. Check mount options (e.g. /proc/self/mountinfo) for subvol option or use "btrfs sub get-default /" (the latter in case of openSUSE should match your actual root).

  4. #4

    Default Re: Is it safe to remove these BTRFS snapshots?

    Quote Originally Posted by arvidjaar View Post
    One of them is your current root filesystem. Check mount options (e.g. /proc/self/mountinfo) for subvol option or use "btrfs sub get-default /" (the latter in case of openSUSE should match your actual root).
    Thanks a lot!

    Code:
    seafire:~ # df -h /
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        19G   15G  3.3G  82% /
    
    seafire:~ # btrfs sub get-default / 
    ID 259 gen 7968 top level 258 path @/.snapshots/1/snapshot
    
    seafire:~ # snapper delete 2
    
    seafire:~ # snapper list
    Type   | # | Pre # | Date                     | User | Cleanup | Description           | Userdata
    -------+---+-------+--------------------------+------+---------+-----------------------+---------
    single | 0 |       |                          | root |         | current               |         
    single | 1 |       | Mon Aug  7 16:07:50 2017 | root |         | first root filesystem |         
    
    seafire:~ # df -h /
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        19G  9.8G  7.5G  57% /
    
    seafire:~ # /etc/cron.weekly/btrfs-balance
    Before balance of /
    Data, single: total=15.01GiB, used=9.27GiB
    System, DUP: total=32.00MiB, used=16.00KiB
    Metadata, DUP: total=640.00MiB, used=236.41MiB
    GlobalReserve, single: total=27.02MiB, used=0.00B
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        20G   11G  8.0G  57% /
    Done, had to relocate 0 out of 22 chunks
    Dumping filters: flags 0x1, state 0x0, force is off
      DATA (flags 0x2): balancing, usage=1
    Done, had to relocate 0 out of 22 chunks
    Dumping filters: flags 0x1, state 0x0, force is off
      DATA (flags 0x2): balancing, usage=5
    Done, had to relocate 0 out of 22 chunks
    Dumping filters: flags 0x1, state 0x0, force is off
      DATA (flags 0x2): balancing, usage=10
    Done, had to relocate 1 out of 22 chunks
    Dumping filters: flags 0x1, state 0x0, force is off
      DATA (flags 0x2): balancing, usage=20
    Done, had to relocate 1 out of 21 chunks
    Dumping filters: flags 0x1, state 0x0, force is off
      DATA (flags 0x2): balancing, usage=30
    Done, had to relocate 0 out of 20 chunks
    Dumping filters: flags 0x1, state 0x0, force is off
      DATA (flags 0x2): balancing, usage=40
    Done, had to relocate 2 out of 20 chunks
    Dumping filters: flags 0x1, state 0x0, force is off
      DATA (flags 0x2): balancing, usage=50
    Done, had to relocate 0 out of 18 chunks
    Done, had to relocate 0 out of 18 chunks
    Dumping filters: flags 0x6, state 0x0, force is off
      METADATA (flags 0x2): balancing, usage=1
      SYSTEM (flags 0x2): balancing, usage=1
    Done, had to relocate 1 out of 18 chunks
    Dumping filters: flags 0x6, state 0x0, force is off
      METADATA (flags 0x2): balancing, usage=5
      SYSTEM (flags 0x2): balancing, usage=5
    Done, had to relocate 1 out of 18 chunks
    Dumping filters: flags 0x6, state 0x0, force is off
      METADATA (flags 0x2): balancing, usage=10
      SYSTEM (flags 0x2): balancing, usage=10
    Done, had to relocate 1 out of 18 chunks
    Dumping filters: flags 0x6, state 0x0, force is off
      METADATA (flags 0x2): balancing, usage=20
      SYSTEM (flags 0x2): balancing, usage=20
    Done, had to relocate 2 out of 18 chunks
    Dumping filters: flags 0x6, state 0x0, force is off
      METADATA (flags 0x2): balancing, usage=30
      SYSTEM (flags 0x2): balancing, usage=30
    Done, had to relocate 3 out of 17 chunks
    After balance of /
    Data, single: total=11.01GiB, used=9.27GiB
    System, DUP: total=32.00MiB, used=16.00KiB
    Metadata, DUP: total=384.00MiB, used=235.02MiB
    GlobalReserve, single: total=25.62MiB, used=0.00B
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        20G   11G  8.6G  56% /
    HP Compaq 6730s Notebook
    * Intel Core2 Duo T9600 2.8GHz 1066MHz 6Mb
    * 4Gb DDR2 800MHz
    * Intel Mobile GM45 Express / ICH9M

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •