You are not logged in.

#1 2021-11-13 19:13:57

860lacov
Member
Registered: 2020-05-02
Posts: 497

system crash after manipulating btrfs subvolumes

I have @ sybvolume
I wanted to do check some things in system so I did a snapshot @bak

After modification of the system I wanted to roll it back

I used arch installation to mount my partition with my @ and @bak subvolumes

Then I did
Btrfs subvolume delete @
And
Btrfs subvolume snapshot @bak @

After this operation system didn't boot.
I thought that I can do something like this but it seems that I can't.

How I shoukd do this ?

Offline

#2 2021-11-14 06:34:46

willemw
Member
Registered: 2013-02-19
Posts: 116

Re: system crash after manipulating btrfs subvolumes

Probably the new snapshot is not selected during boot. Is the root subvolume selected by name or by ID (https://wiki.archlinux.org/title/Btrfs# … me_as_root)? Is the selection configured in the bootloader or in fstab? If it is selected by ID and not set in a configuration file, then you may need to run 'btrfs subvolume set-default ...' to select the new snapshot. You can do this from a live USB.

Also, you could have temporarily moved the old snapshot and delete it after successfully booting into the new snapshot.

Last edited by willemw (2021-11-14 07:29:31)

Offline

#3 2021-11-14 09:46:16

860lacov
Member
Registered: 2020-05-02
Posts: 497

Re: system crash after manipulating btrfs subvolumes

In fstab and bootloader entry I have subvol=@

options cryptdevice=UUID=0873c55d-c7ec-43b6-9cc7-c8411f7605b6:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=@ rw
UUID=d5fb18bc-1d89-4a2d-bcf9-c6766c3a8a0f	/var/cache	btrfs     	rw,noatime,compress=zstd:3,ssd,space_cache,commit=120,subvol=@cache	0 0

Next time, I'll move subvolumes instead of deleting them.

Last edited by 860lacov (2021-11-14 09:47:22)

Offline

Board footer

Powered by FluxBB