how to replay a snapshot (btrfs) ?

Lentes, Bernd bernd.lentes at helmholtz-muenchen.de
Tue Jul 26 12:55:44 UTC 2016


Hi,

sorry for asking this simple question. But i'm new to btrfs. And all the guides i found in the internet are different and none of them succeeded.
I made a snapshot form my / , did some changes in the configurtaion (which weren't successfull), now i want to get back to the snapshot.

This is my system:

root at PC65472:~# btrfs sub list -ap /
ID 257 gen 38915 parent 5 top level 5 path <FS_TREE>/@
ID 258 gen 38903 parent 5 top level 5 path <FS_TREE>/@home
ID 285 gen 38828 parent 257 top level 257 path @/snapshots/root_190720162124

ID 285 is my snapshot.

root at PC65472:~# btrfs sub get-default /
ID 285 gen 38828 top level 257 path snapshots/root_190720162124

I changed the snapshot to the default but i still have the configuration changes i'd like to loose.
Also after a restart still no replay of the snapshot.

root at PC65472:~# mount|grep -iE 'btrfs|subvol'
/dev/mapper/vg1-lv_root on / type btrfs (rw,relatime,ssd,space_cache,subvolid=257,subvol=/@)
/dev/mapper/vg1-lv_root on /home type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/@home)
/dev/mapper/vg1-lv_root on /mnt/snap type btrfs (rw,relatime,ssd,space_cache,subvolid=285,subvol=/@/snapshots/root_190720162124)

I can mount my snapshot, which is fine and logical, but where is the benefit ?
How can i set the snapshot to be my new live-system ?

System is Ubuntu 16.04 64 bit kernel 4.4.0-31.
In the btrfs wiki i read: 
mount -o subvolid=0 <filesystem> <mount-point>

But that does not succeed:

root at PC65472:~# mount -o subvolid=0 /dev/mapper/vg1-lv_root /
mount: /dev/mapper/vg1-lv_root is already mounted or / busy
       /dev/mapper/vg1-lv_root is already mounted on /
       /dev/mapper/vg1-lv_root is already mounted on /home
       /dev/mapper/vg1-lv_root is already mounted on /mnt/snap

And umounting / of course also does not succeed.

Thanks for any help.


Bernd

-- 
Bernd Lentes 

Systemadministration 
institute of developmental genetics 
Gebäude 35.34 - Raum 208 
HelmholtzZentrum München 
bernd.lentes at helmholtz-muenchen.de 
phone: +49 (0)89 3187 1241 
fax: +49 (0)89 3187 2294 

Wer glaubt das Projektleiter Projekte leiten 
der glaubt auch das Zitronenfalter 
Zitronen falten
 

Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Alfons Enhsen, Renate Schlusen (komm.)
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671




More information about the ubuntu-users mailing list