public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* Replacing or merging last snapshot
@ 2020-08-22 11:48 George Shuklin
  2020-08-22 12:18 ` Hugo Mills
  0 siblings, 1 reply; 2+ messages in thread
From: George Shuklin @ 2020-08-22 11:48 UTC (permalink / raw)
  To: linux-btrfs

I wonder if there is a way to free space if there is only one snapshot 
available. The problem is that there is a hidden top-level (id=5) 
subvolume, and there was ever switch from top-level to another subvolume 
as 'default'. If top-level subvolume have some data (not present in 
'default' snapshot), this space is wasted.

Are there way to 'merge' snapshot into top-level subvolume, or a way to 
completely remove subvolume 5 (without breaking fs)?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Replacing or merging last snapshot
  2020-08-22 11:48 Replacing or merging last snapshot George Shuklin
@ 2020-08-22 12:18 ` Hugo Mills
  0 siblings, 0 replies; 2+ messages in thread
From: Hugo Mills @ 2020-08-22 12:18 UTC (permalink / raw)
  To: George Shuklin; +Cc: linux-btrfs

On Sat, Aug 22, 2020 at 02:48:18PM +0300, George Shuklin wrote:
> I wonder if there is a way to free space if there is only one snapshot
> available. The problem is that there is a hidden top-level (id=5) subvolume,
> and there was ever switch from top-level to another subvolume as 'default'.
> If top-level subvolume have some data (not present in 'default' snapshot),
> this space is wasted.
> 
> Are there way to 'merge' snapshot into top-level subvolume, or a way to
> completely remove subvolume 5 (without breaking fs)?

   You can't remove the top-level subvolume (id 5). All you can do is
mount it (with -o subvolid=5 or =0) and (carefully) delete the parts
that you don't need. Remember that all the other subvolumes are
visible in this view, so don't just rm -rf *, because you'll delete
everything in the FS including your currently active subvols.

   Hugo.

-- 
Hugo Mills             | emacs: Emacs Makes A Computer Slow.
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-22 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-22 11:48 Replacing or merging last snapshot George Shuklin
2020-08-22 12:18 ` Hugo Mills

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox