All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brown <btrfs@davidb.org>
To: C Anthony Risinger <anthony@extof.me>
Cc: Chris Mason <chris.mason@oracle.com>,
	Sage Weil <sage@newdream.net>,
	linux-btrfs@vger.kernel.org
Subject: Re: Replacing the top-level root
Date: Wed, 27 Oct 2010 05:53:11 +0000	[thread overview]
Message-ID: <20101027055311.GA8550@davidb.org> (raw)
In-Reply-To: <AANLkTiktaR6ipbH-i=kTdRvHqBdTAAcYYsdVamogifm1@mail.gmail.com>

On Mon, Oct 25, 2010 at 03:20:58PM -0500, C Anthony Risinger wrote:

>For example, right now extlinux support booting btrfs, but _only_ from
>the top-level root.  if i just had a way to "swap" the top-level root
>with a different subvol, i could overcome several problems i have with
>users all at once:
>
>) users install their system to the top-level root, which means it is
>no longer manageable by snapshot scripts [currently]
>) if the top-level root could be swapped, extlinux could then boot my
>snapshot? (i'm probably wrong here)

I don't think this is a solution to the extlinux problem, but I've
moved roots into new subvolumes, basically something like this.

Root is mounted as /, I've also mounted the volume on /mounted in this
example.

   # btrfs subvolume snapshot /mounted /mounted/newrootname

Now reboot, adding the subvol option to use the newrootname.  

Go into /mounted and make sure files touced there don't show up in '/'
(we really are mounting the submount).

Then just use rm -rf to remove everything that isn't a subvol.  I
don't know of an easy way to do that, and be careful.

This doesn't really change the default root, but by making a snapshot
of it, can move all of the data elsewhere.

David

  reply	other threads:[~2010-10-27  5:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25 20:20 Replacing the top-level root C Anthony Risinger
2010-10-27  5:53 ` David Brown [this message]
2010-10-27 16:52   ` C Anthony Risinger

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=20101027055311.GA8550@davidb.org \
    --to=btrfs@davidb.org \
    --cc=anthony@extof.me \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sage@newdream.net \
    /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.