Skip to contentSkip to conversation

Snapper on Ubuntu

DISCUSSION Hendrik Friedel 4 participants 8 messages Mar 15, 2014 – Mar 16, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello,

I am not sure, whether this is the right place to ask this question -if not, please advise.

Ubuntu installs on btrfs, creating subvolumes for the homes (/home), the root home (/root) and the root (/) named @home, @root and @ respectively.

When I install snapper I configure it like this
snapper -c rt create-config /
snapper -c home create-config /home
snapper -c root create-config /root
snapper -c Video create-config /mnt/BTRFS/Video/

After executing snapper create several times, this results in

#btrfs subvolume list /
ID 258 gen 2615 top level 5 path @
ID 259 gen 2611 top level 5 path @root
ID 260 gen 2555 top level 5 path @home
ID 281 gen 2555 top level 5 path @home/.snapshots ID 282 gen 2606 top level 5 path @root/.snapshots ID 283 gen 2562 top level 5 path @root/.snapshots/1/snapshot ID 284 gen 2563 top level 5 path @root/.snapshots/2/snapshot ID 285 gen 2573 top level 5 path @root/.snapshots/3/snapshot ID 286 gen 2577 top level 5 path @root/.snapshots/4/snapshot ID 287 gen 2582 top level 5 path @root/.snapshots/5/snapshot ID 288 gen 2583 top level 5 path @root/.snapshots/6/snapshot ID 290 gen 2605 top level 258 path .snapshots
ID 291 gen 2599 top level 5 path @root/.snapshots/7/snapshot ID 292 gen 2600 top level 5 path @root/.snapshots/8/snapshot ID 293 gen 2605 top level 5 path @root/.snapshots/9/snapshot

#btrfs subvolume list /mnt/BTRFS/Video/
ID 258 gen 4560 top level 5 path Video
ID 259 gen 4557 top level 258 path VDR
ID 275 gen 672 top level 258 path Filme
ID 284 gen 816 top level 258 path Homevideo
ID 288 gen 1048 top level 258 path VideoSchnitt
ID 1874 gen 1288 top level 5 path rsnapshot
ID 1875 gen 4245 top level 5 path backups
ID 2265 gen 4560 top level 258 path .snapshots

So, this all works for @root only, not for the other subvolumes.

Do you have any suggestions, how to find the cause?

Regards,
Hendrik

#1 lore raw
Quoted 26 lines · On Saturday 15 March 2014 15:05:22 Hendrik Friedel wrote:

Hello,

I am not sure, whether this is the right place to ask this question -if not, please advise.

Ubuntu installs on btrfs, creating subvolumes for the homes (/home), the root home (/root) and the root (/) named @home, @root and @ respectively.

When I install snapper I configure it like this
snapper -c rt create-config /
snapper -c home create-config /home
snapper -c root create-config /root
snapper -c Video create-config /mnt/BTRFS/Video/

After executing snapper create several times, this results in

#btrfs subvolume list /
ID 258 gen 2615 top level 5 path @
ID 259 gen 2611 top level 5 path @root
ID 260 gen 2555 top level 5 path @home
ID 281 gen 2555 top level 5 path @home/.snapshots ID 282 gen 2606 top level 5 path @root/.snapshots ID 283 gen 2562 top level 5 path @root/.snapshots/1/snapshot ID 284 gen 2563 top level 5 path @root/.snapshots/2/snapshot ID 285 gen 2573 top level 5 path @root/.snapshots/3/snapshot

[...]

Quoted 3 lines

So, this all works for @root only, not for the other subvolumes.

Do you have any suggestions, how to find the cause?

I think you may have forgotten to specify the config snapper is supposed to use. Try

# snapper -c home create
# snapper -c Video create

Michael

Signature · 3 lines
Michael Schuerig
mailto:[email protected]
http://www.schuerig.de/michael/
#2 lore raw
Quoted 5 lines

I think you may have forgotten to specify the config snapper is supposed to use. Try

# snapper -c home create
# snapper -c Video create

Thanks, that was it. I would have expected an Error-Message though...

Greetings,
Hendrik

#3 lore raw
Quoted 7 lines · On Sat, 15 Mar 2014 18:47:49 +0100 Hendrik Friedel <[email protected]>…
Quoted 5 lines

I think you may have forgotten to specify the config snapper is supposed to use. Try

# snapper -c home create
# snapper -c Video create  

Thanks, that was it. I would have expected an Error-Message though...

Snapper uses the "root" config by default. /root snapshots were created successfully when you ran "snapper create" without specifying an explicit config.

Cheers, David

#4 lore raw

Hello,

ok, thanks for the explaination.
I would find a behaviour in which by default all configurations would be used (i.e. no -c option means that a snapshot of all configurations will be done) more intuitive.

I'll get used to it though :-)

Greetings,
Hendrik

#5 lore raw
In reply to Hendrik Friedel
Quoted 5 lines · Hendrik Friedel

When I install snapper I configure it like this snapper -c rt create-config /
snapper -c home create-config /home snapper -c root create-config /root snapper -c Video create-config /mnt/BTRFS/Video/

Just a recommendation about the config names. At least on openSUSE "root" is used for /. I would suggest to use "home_root" for /root like the pam-snapper module does.

Regards,
Arvin

Signature · 6 lines
Arvin Schnell, <[email protected]>
Senior Software Engineer, Research & Development
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
#6 lore raw

Hello,

Quoted 3 lines

Just a recommendation about the config names. At least on openSUSE "root" is used for /. I would suggest to use "home_root" for /root like the pam-snapper module does.

thanks for the advise.

In fact on a previous try I had -by chance- used exactly this nomenclature. Then I restarted

Now, can I just rename the files in /etc/snapper/configs and the entries in /etc/sysconfig/snapper?

Or do I have to start from scratch (remove all snapshots, all configurations)?

Regards,
Hendrik

#7 lore raw
Quoted 11 lines · Hendrik Friedel
Quoted 3 lines

Just a recommendation about the config names. At least on openSUSE "root" is used for /. I would suggest to use "home_root" for /root like the pam-snapper module does.

thanks for the advise.

In fact on a previous try I had -by chance- used exactly this nomenclature. Then I restarted

Now, can I just rename the files in /etc/snapper/configs and the entries in /etc/sysconfig/snapper?

Yes, that should work. Just make sure to kill snapperd before.

Regards,
Arvin

Signature · 6 lines
Arvin Schnell, <[email protected]>
Senior Software Engineer, Research & Development
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany