You are not logged in.

#1 2024-02-05 08:59:13

iskander9908
Member
Registered: 2022-10-30
Posts: 29

[SOLVED] How to restore home subvolume

I tried to restore snapshot of home subvolume, but when I'm trying to rename broken subvolume, it returns this message:

$ mv @home @broken                                                                  
mv: cannot stat '@home': No such file or directory

. Do I need to rename home directory or anything else?

Last edited by iskander9908 (2024-02-14 06:48:57)

Offline

#2 2024-02-05 09:58:28

dogknowsnx
Member
Registered: 2021-04-12
Posts: 652

Re: [SOLVED] How to restore home subvolume

Are we talking 'btrfs' (not using it myself but), what's the output of

# btrfs subvolume list -p /home

?

Last edited by dogknowsnx (2024-02-05 09:59:56)


RI - Rest your Eyes and Self

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#3 2024-02-05 10:02:41

iskander9908
Member
Registered: 2022-10-30
Posts: 29

Re: [SOLVED] How to restore home subvolume

sudo btrfs subvolume list /                                                                                                                                                           1 ↵
[sudo] password for iskander: 
ID 256 gen 1529 top level 5 path @
ID 257 gen 1529 top level 5 path @home
ID 258 gen 1383 top level 5 path @snapshots
ID 259 gen 1526 top level 5 path @var_log
ID 260 gen 13 top level 256 path var/lib/portables
ID 261 gen 13 top level 256 path var/lib/machines
ID 262 gen 1174 top level 256 path swap
ID 264 gen 1316 top level 257 path @home/.snapshots
ID 265 gen 123 top level 258 path @snapshots/1/snapshot
ID 266 gen 295 top level 258 path @snapshots/2/snapshot
ID 267 gen 297 top level 258 path @snapshots/3/snapshot
ID 268 gen 299 top level 258 path @snapshots/4/snapshot
ID 269 gen 300 top level 258 path @snapshots/5/snapshot
ID 270 gen 914 top level 258 path @snapshots/6/snapshot
ID 271 gen 916 top level 258 path @snapshots/7/snapshot
ID 272 gen 1207 top level 258 path @snapshots/8/snapshot
ID 273 gen 1208 top level 258 path @snapshots/9/snapshot
ID 274 gen 1226 top level 258 path @snapshots/10/snapshot
ID 275 gen 1228 top level 258 path @snapshots/11/snapshot
ID 276 gen 1316 top level 264 path @home/.snapshots/1/snapshot
ID 277 gen 1381 top level 258 path @snapshots/12/snapshot
ID 278 gen 1382 top level 258 path @snapshots/13/snapshot

Offline

#4 2024-02-05 10:09:17

dogknowsnx
Member
Registered: 2021-04-12
Posts: 652

Re: [SOLVED] How to restore home subvolume

$ mv @home @broken

suggests you're not issuing that command as root (from '/') - which you shouldn't, anyway - and there is no '@broken' subvolume listed above... EDIT: sorry, that's bs...

But please wait for a response of from a more qualified user that's actually using 'btrfs' before taking any further action.

Reason for last edit: grammar

Last edited by dogknowsnx (2024-02-05 12:24:19)


RI - Rest your Eyes and Self

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#5 2024-02-05 10:56:17

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

Re: [SOLVED] How to restore home subvolume

@home can be replaced but not while it is mounted.

To manually restore @home:

Boot into a live USB, for example. Mount the partition containing the Btrfs pool. Move the corrupt subvolume with "mv ..." or with a file manager to somewhere on the same partition. Create a writable snapshot (@home) from a good snapshot with "btrfs subvolume snapshot ...". If necessary, update the subvolid in the etc/fstab file located in the root (@) subvolume. After everything is successful, delete the corrupt subvolume.

Last edited by willemw (2024-02-05 11:47:48)

Offline

Board footer

Powered by FluxBB