From: "Bernhard Kühnel" <bkue@allchangeplease.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: how do I know a subvolume is a snapshot?
Date: Wed, 17 Jul 2019 09:45:47 +0200 [thread overview]
Message-ID: <1858db2d-8683-0ba9-cc13-9e654a1fa810@allchangeplease.de> (raw)
In-Reply-To: <20190716232456.GA26411@tik.uni-stuttgart.de>
Am 17.07.2019 um 01:24 schrieb Ulli Horlacher:
> How do I know that /mnt/tmp/ss is a snapshot?
> I cannot see a snapshot identifier.
From the btrfs-subvolume man page:
> A snapshot is a subvolume like any other, with given initial
content. By default, snapshots are created
> read-write. File modifications in a snapshot do not affect the
files in the original subvolume.
I believe the usual practice is to create snapshots with the -r flag and
follow some naming convention (e.g. place them in a common .snapshots
folder named by date), but you're free to switch between read-only and
read-write mode for a snapshot at any time using the btrfs property command.
That allows for some intereresting feats: e.g. there's no guarantee that
a (now) read-only snapshot actually reflects the source's state at
creation time (if someone modified it and re-applied the ro flag). On
the other hand, reverting to a snapshotted state may be as easy as
making the snapshot rw and changing the mount options to use it's
subvolid - no need to copy any files back and forth.
If there is a specific reason why you want to discern snapshots from
other subvolumes (verification/auditing/forensics?), maybe you can get
help here by elaborating further on that.
Bernhard Kühnel
next prev parent reply other threads:[~2019-07-17 7:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 23:24 how do I know a subvolume is a snapshot? Ulli Horlacher
2019-07-17 7:45 ` Bernhard Kühnel [this message]
2019-07-17 8:05 ` Ulli Horlacher
2019-07-17 10:33 ` Remi Gauvin
2019-07-17 8:23 ` Hans van Kranenburg
2019-07-17 8:57 ` misono.tomohiro
2019-07-17 9:06 ` Ulli Horlacher
2019-07-17 9:24 ` misono.tomohiro
2019-07-17 8:24 ` Nikolay Borisov
2019-07-17 9:11 ` Ulli Horlacher
2019-07-17 10:11 ` Nikolay Borisov
2019-07-17 10:29 ` Andrei Borzenkov
2019-07-17 11:19 ` Nikolay Borisov
2019-07-17 17:39 ` Andrei Borzenkov
2019-07-17 18:16 ` Nikolay Borisov
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=1858db2d-8683-0ba9-cc13-9e654a1fa810@allchangeplease.de \
--to=bkue@allchangeplease.de \
--cc=linux-btrfs@vger.kernel.org \
/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