Results 1 to 4 of 4

Thread: btrfs: a mysterious snapshot consuming my space

  1. #1
    Join Date
    Feb 2016
    Location
    Berlin
    Posts
    357

    Default btrfs: a mysterious snapshot consuming my space

    so, have been desperately watching my disk space reduce for no obvious reason. After a little investigation i notice there is a snapshot (844) not listed by snapper

    output of snapper:
    Code:
    sudo snapper list
    Type   | #   | Pre # | Date                          | User | Cleanup | Description           | Userdata      
    -------+-----+-------+-------------------------------+------+---------+-----------------------+--------------
    single | 0   |       |                               | root |         | current               |               
    single | 1   |       | Thu 23 Jun 2016 10:07:00 CEST | root |         | first root filesystem |               
    pre    | 893 |       | Fri 12 Jan 2018 19:43:21 CET  | root | number  | zypp(zypper)          | important=yes
    post   | 894 | 893   | Fri 12 Jan 2018 20:00:26 CET  | root | number  |                       | important=yes
    pre    | 895 |       | Sun 14 Jan 2018 14:45:32 CET  | root | number  | zypp(zypper)          | important=no  
    post   | 896 | 895   | Sun 14 Jan 2018 14:45:44 CET  | root | number  |                       | important=no 
    
    output (trimmed) of btrfs:
    Code:
    sudo btrfs subvolume list /
    ..snip..
    ID 2270 gen 490343 top level 258 path @/.snapshots/844/snapshot
    ID 2335 gen 495322 top level 258 path @/.snapshots/893/snapshot
    ID 2337 gen 495359 top level 258 path @/.snapshots/894/snapshot
    ID 2352 gen 496131 top level 258 path @/.snapshots/895/snapshot
    ID 2353 gen 496132 top level 258 path @/.snapshots/896/snapshot
    
    qgroup scan shows its quite large
    Code:
    2270 gen 490343 top level 258 path @/.snapshots/844/snapshot       2270  10.06GB  6.52GB    
    2335 gen 495322 top level 258 path @/.snapshots/893/snapshot       2335  10.31GB  1.58GB    
    2337 gen 495359 top level 258 path @/.snapshots/894/snapshot       2337  10.73GB  138.55MB  
    2352 gen 496131 top level 258 path @/.snapshots/895/snapshot       2352  10.30GB  1.90MB    
    2353 gen 496132 top level 258 path @/.snapshots/896/snapshot       2353  10.37GB  2.62MB 
    
    other info
    Code:
    sudo btrfs subvolume get-default /
    ID 259 gen 497548 top level 258 path @/.snapshots/1/snapshot
    
    am i reading this correct that this is a 'lost' snapshot? if so should i just nuke it (using btrfs)? are there any checks i should do first or a more cautious approach e.g. rename. advice welcome.

  2. #2
    Join Date
    Sep 2012
    Posts
    7,101

    Default Re: btrfs: a mysterious snapshot consuming my space

    I'd say if snapper does not see it removing it should not do any harm. You will need to remove both snapshot (/.snapshots/844/snapshot) and directory itself (/.snapshots/844).

  3. #3
    Join Date
    Feb 2016
    Location
    Berlin
    Posts
    357

    Default Re: btrfs: a mysterious snapshot consuming my space

    so i assume this would be sudo btrfs subvolume delete /.snapshots/844/snapshot and sudo btrfs subvolume delete /.snapshots/844. In that order? If things dont go well can anyone comment on how to backup (rsync?) and then recreate the FS before restoring? would all subvolumes have to be manually recreated?

  4. #4
    Join Date
    Feb 2016
    Location
    Berlin
    Posts
    357

    Default Re: btrfs: a mysterious snapshot consuming my space

    so.. happy ending, a simple
    Code:
    sudo btrfs sub delete /.snapshots/844/snapshot
    the snapshot has gone and have recovered 6.5GB of space

    i dont know how this 'rouge' snapshot could have occurred, but perhaps something to check for if your root starts to inexplicably fill up.

Posting Permissions

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