From: David Sterba <dsterba@suse.cz>
To: Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: systemd.setenv and a mount.unit
Date: Wed, 10 Dec 2014 15:36:22 +0100 [thread overview]
Message-ID: <20141210143622.GC27601@twin.jikos.cz> (raw)
In-Reply-To: <CAJCQCtT88Ji52W2za++eUiAXYq1O2hpTaHo_FZgrpNvdVEN=Gg@mail.gmail.com>
On Thu, Nov 20, 2014 at 11:39:19AM -0700, Chris Murphy wrote:
> On Thu, Nov 20, 2014 at 4:14 AM, Goffredo Baroncelli <kreijack@inwind.it> wrote:
>
> > Supposing to have the following four subvolumes
> >
> > /root/
> > /root/etc
> > /root/usr
> > /root/var
> >
> > When you need to snapshot, you should:
> >
> > # btrfs subvolume snapshot /root /backup-root-20141120
> > # btrfs subvolume snapshot /root/etc /backup-root-20141120/etc
> > # btrfs subvolume snapshot /root/usr /backup-root-20141120/usr
> > # btrfs subvolume snapshot /root/var /backup-root-20141120/var
> >
> > So in order to remount an "old" filesystem, you need to make only
> > 1 mount.
>
> I like this layout better than either the openSUSE or Fedora layouts.
> It's easier to mount and old filesystem, where on Fedora each
> subvolume must be explicitly mounted. And it ensures old binaries
> aren't in the current mount path – kinda like running in a chroot –
> where on openSUSE the snapshots containing old binaries are in the
> current mount path.
While the old binaries are in the current mount path, they're not
generally accessible due to 0750 on the .snapshots directory.
The 'single mountpoint for whole root' is not perfect in case there are
files that are independent on the system files, like logs or some
application data in wellknown paths.
The other option is to have separate subvolumes for the selected paths
and either mount them in fstab or do more work when the old filesystem
has to be rolled back and transformed to the expected layout.
Both have their pros and cons so this is a matter of user choice. Eg. if
the logs are forwarded and not kept locally, no applications store data
on root partition. Going to an older snapshot is trivial and without
unexpected consequences.
And of course the layouts are both ways convertible.
next prev parent reply other threads:[~2014-12-10 14:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-19 22:48 systemd.setenv and a mount.unit Jakob Schürz
2014-11-20 10:17 ` Goffredo Baroncelli
2014-11-20 10:35 ` Jakob Schürz
2014-11-20 11:14 ` Goffredo Baroncelli
2014-11-20 18:39 ` Chris Murphy
2014-12-10 14:36 ` David Sterba [this message]
2014-11-20 12:04 ` Brendan Hide
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141210143622.GC27601@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox