All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Niels de Carpentier" <niels@decarpentier.com>
To: "Hugo Mills" <hugo@carfax.org.uk>,
	btrfs@spiritvideo.com, linux-btrfs@vger.kernel.org
Subject: Re: revert to static snapshot on reboot
Date: Thu, 12 Jan 2012 23:01:09 +0100	[thread overview]
Message-ID: <caac4792c203d54bce7dca9a10903263.squirrel@webmail.decarpentier.com> (raw)
In-Reply-To: <20120112213813.GA21769@carfax.org.uk>

> On Mon, Jan 09, 2012 at 04:21:31PM +0100, Niels de Carpentier wrote:
>> > The plan that occurs to me is to make a snapshot of the system in the
>> > state that I want to always boot.  Then, I would rewrite the init
>> > script in the initrd to (a) delete any old tmp copy of the snapshot;
>> > (b) copy the static snapshot to a tmp copy; (c) mount the tmp copy.
>> >
>> > That's a little harder than I was hoping to work -- is there an easier
>> > way to get this functionality?
>>
>> I would just create a filesystem with the static content, and on boot
>> do:
>>
>> mount fs
>> delete snapshots
>> create snapshot
>> unmount fs and mount snapshot.
>>
>> I'm not sure if you can snapshot a snapshot, otherwise you could start
>> with a snapshot as well. (Just be sure not to delete it)
>
>    Yes, you can make snapshots of snapshots. A btrfs snapshot is a
> first-class citizen -- there's no real distinction between the
> original subvolume and a snapshot of it.

Good! That makes the op's case real simple. No need to copy any data, just
snapshot and mount.

Niels


  reply	other threads:[~2012-01-12 22:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09  6:43 revert to static snapshot on reboot btrfs
2012-01-09  9:51 ` Hugo Mills
2012-01-09 15:21 ` Niels de Carpentier
2012-01-12 21:38   ` Hugo Mills
2012-01-12 22:01     ` Niels de Carpentier [this message]
2012-01-09 18:43 ` Kai Krakow
2012-01-11  3:42 ` Anand Jain

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=caac4792c203d54bce7dca9a10903263.squirrel@webmail.decarpentier.com \
    --to=niels@decarpentier.com \
    --cc=btrfs@spiritvideo.com \
    --cc=hugo@carfax.org.uk \
    --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 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.