From: Robert White <rwhite@pobox.com>
To: Shriramana Sharma <samjnaa@gmail.com>,
dsterba@suse.cz, Chris Murphy <lists@colorremedies.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Moving an entire subvol?
Date: Tue, 02 Dec 2014 12:30:37 -0800 [thread overview]
Message-ID: <547E216D.6000405@pobox.com> (raw)
In-Reply-To: <CAH-HCWVubkp+viAEVqGoJFxJ_t1chTVC08xm6A15ucosqbWqxQ@mail.gmail.com>
On 12/02/2014 07:11 AM, Shriramana Sharma wrote:
> On Tue, Dec 2, 2014 at 6:58 PM, David Sterba <dsterba@suse.cz> wrote:
>>
>> A subvolume is also a snapshotting barrier, so it's convenient to create
>> subvolumes in well-known paths that contain data that should not be
>> rolled back (/var/log, /srv, bootloader).
> That makes sense. Is there anywhere that the "official" SuSE
> recommended subvol layout is mentioned that I can refer to without
> having to start up an installer? (I currently chose ext4 for / for
> other reasons so I can't refer to my layout.)
There are lots of ways to arrange your system
My preference is to create the snapshots in a super-volume outside of
the normally mounted hierarchy. This simplifies the normal operation of
tools like "locate" which don't understand that the duplicate files from
the snapshot are not interesting. It also means that live operations
(e.g. anything using "find") naturally will not traverse the snapshots
unless the supervolume is mounted explicitly.
I typically call the active root of the system /__System and set it as
the default subvolume to make booting easier.
As in...
mkfs.btrfs /dev/whatever
mount /dev/whatever /mnt
btrfs sub create /mnt/__System
btrfs sub create /mnt/__System/home
btrfs sub set-default (number) /mnt
umount /mnt
mount /mnt
(create OS layout in /mnt)
Then when the snapshotting goes on...
mount -o subvol=/ /dev/whatever /maintenance
SUFFIX=$(date "+_BACKUP_%Y-%M-%d")
cd /maintenance
btrfs sub snap -r __System __System${SUFFIX}
btrfs sub snap -r __System/home __System_home${SIFFIX}
# etc
cd /
umount /maintenance
---
The Real Way™ to think about your active subvolume layouts is to think
about what you really need to preserve and how often.
/home is an obvious candidate for frequent snapshots as it is the place
individual users are most likely to mess up, and it has the most
"irreplaceable" data.
/ (e.g. the semantic system root) [in my example /__System] [not
counting its various subvolumes really only needs backing up before
system software modifications via apt/yumm/portage/wahtever your distro
uses. Or right before you start doing aything "tricky" in /etc
/etc might rate its own subvolume if you are a tinker or your
system-wide configuration needs a lot of motility.
/var tends to have per system configuration stuff
But the real question is "how much complexity of maintenance does the
system _really_ need, and how much of it are you _really_ going to maintain.
The desire to use a feature "just 'cause it's there" should be resisted.
If you are not going to be using the snapshots feature. If you are just
dropping the box in and you are going to ignore it, then don't subvolume
it at all.
You are looking for a balance between the theoretical ideal and the
practical outcome. If you don't know exactly why you are putting the
subvolume in place then it will likely just end up annoying you without
giving any value.
Same for taking and positioning the snapshots.
This is a corollary of the rule that states "A backup script that you've
never done a restore from, should be assumed to be an _unsafe_ or
complete backup, or no backup at all."
next prev parent reply other threads:[~2014-12-02 20:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-30 3:31 Moving an entire subvol? Shriramana Sharma
2014-11-30 4:21 ` Marc MERLIN
2014-11-30 10:27 ` Shriramana Sharma
2014-12-01 0:10 ` Marc MERLIN
2014-12-01 0:54 ` Chris Murphy
2014-12-02 3:21 ` Shriramana Sharma
2014-12-02 8:34 ` Hugo Mills
2014-12-03 2:32 ` Shriramana Sharma
2014-12-03 8:37 ` Hugo Mills
2014-12-02 8:50 ` Duncan
2014-12-02 13:28 ` David Sterba
2014-12-02 15:11 ` Shriramana Sharma
2014-12-02 20:30 ` Robert White [this message]
2014-12-02 21:13 ` Austin S Hemmelgarn
2014-12-03 2:33 ` Shriramana Sharma
2014-12-05 17:34 ` David Sterba
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=547E216D.6000405@pobox.com \
--to=rwhite@pobox.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
--cc=samjnaa@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.