You are not logged in.

#1 2014-08-17 11:25:10

Nordic89
Member
Registered: 2014-05-07
Posts: 49

BTRFS: Inherent difference between snapshot and default subvolume?

Is there any inherent difference between these two?

I'm asking because I messed up my default subvolume, but managed to boot a snapshot I created beforehand. Can I just delete my old default subvolume now and use the snapshot as my new default or is that a bad idea for some reason?

Does btrfs actually make a difference between a snapshot and a defaul subvolume or are the basically the same thing?

Offline

#2 2014-08-19 08:58:43

mrshannon
Member
Registered: 2014-06-06
Posts: 6

Re: BTRFS: Inherent difference between snapshot and default subvolume?

I think you are confused as to what "default subvolume" means so I will try to explain.  Unlike ZFS, BTRFS does not make a distinction (at least to the user) between subvolumes and snapshots.  When a snapshot is made it is simply another subvolume (but they can be made read only).  The default subvolume is the subvolume that will be mounted if no

subvol=<path to subvolume>

option is given when mounting the BTRFS filesystem.  By default the top level subvolume is the default.  If your old subvolume and your snapshot are both under the top level subvolume then yes you can delete the old subvolume and boot off of the snapshot assuming it is read-write.  If it is read-only simply make a new snapshot of the old snapshot without using the -r flag and use the new snapshot to boot from.  You may actually want to do this anyways in order to preserve your known good subvolume/snapshot.  If you are unsure about the structure of your subvolumes mount the top level subvolume somewhere with:

mount -t btrfs -o subvolid=0 <btrfs device> <path to a mount point>

and then list the subvolumes under that mountpoint.

Hint: You can move/rename snapshots/subvolums just like folders.  But you need

btrfs subvolume delete

to remove one.

Last edited by mrshannon (2014-08-19 09:01:02)

Offline

Board footer

Powered by FluxBB