From: Sander <sander@humilis.net>
To: Jim Salter <jim@jrs-s.net>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: correct way to rollback a root filesystem?
Date: Tue, 7 Jan 2014 12:55:06 +0100 [thread overview]
Message-ID: <20140107115506.GA1919@panda> (raw)
In-Reply-To: <52CB0484.8030806@jrs-s.net>
Jim Salter wrote (ao):
> I tried a kernel upgrade with moderately disastrous
> (non-btrfs-related) results this morning; after the kernel upgrade
> Xorg was completely borked beyond my ability to get it working
> properly again through any normal means. I do have hourly snapshots
> being taken by cron, though, so I'm successfully X'ing again on the
> machine in question right now.
>
> It was quite a fight getting back to where I started even so, though
> - I'm embarassed to admit I finally ended up just doing a cp
> --reflink=all /mnt/@/.snapshots/snapshotname /mnt/@/ from the
> initramfs BusyBox prompt. Which WORKED well enough, but obviously
> isn't ideal.
>
> I tried the btrfs sub set-default command - again from BusyBox - and
> it didn't seem to want to work for me; I got an inappropriate ioctl
> error (which may be because I tried to use / instead of /mnt, where
> the root volume was CURRENTLY mounted, as an argument?). Before
> that, I'd tried setting subvol=@root (which is the writeable
> snapshot I created from the original read-only hourly snapshot I
> had) in GRUB and in fstab... but that's what landed me in BusyBox to
> begin with.
>
> When I DID mount the filesystem in BusyBox on /mnt, I saw that @ and
> @home were listed under /mnt, but no other "directories" were -
> which explains why mounting -o subvol=@root didn't work. I guess the
> question is, WHY couldn't I see @root in there, since I had a
> working, readable, writeable snapshot which showed its own name as
> "root" when doing a btrfs sub show /.snapshots/root ?
I don't quite get how your setup is.
In my setup, all subvolumes and snapshots are under /.root/
# cat /etc/fstab
LABEL=panda / btrfs subvol=rootvolume,space_cache,inode_cache,compress=lzo,ssd 0 0
LABEL=panda /home btrfs subvol=home 0 0
LABEL=panda /root btrfs subvol=root 0 0
LABEL=panda /var btrfs subvol=var 0 0
LABEL=panda /holding btrfs subvol=.holding 0 0
LABEL=panda /.root btrfs subvolid=0 0 0
/Varlib /var/lib none bind 0 0
In case of an OS upgrade gone wrong, I would mount subvolid=0, move
subvolume 'rootvolume' out of the way, and move (rename) the last known
good snapshot to 'rootvolume'.
Not sure if that works though. Never tried.
Sander
prev parent reply other threads:[~2014-01-07 11:55 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 22:28 btrfs raid1 and btrfs raid10 arrays NOT REDUNDANT Jim Salter
2014-01-03 22:42 ` Emil Karlson
2014-01-03 22:43 ` Joshua Schüler
2014-01-03 22:56 ` Jim Salter
2014-01-03 23:04 ` Hugo Mills
2014-01-03 23:04 ` Joshua Schüler
2014-01-03 23:13 ` Jim Salter
2014-01-03 23:18 ` Hugo Mills
2014-01-03 23:25 ` Jim Salter
2014-01-03 23:32 ` Chris Murphy
2014-01-03 23:22 ` Chris Murphy
2014-01-04 6:10 ` Duncan
2014-01-04 11:20 ` Chris Samuel
2014-01-04 13:03 ` Duncan
2014-01-04 14:51 ` Chris Mason
2014-01-04 15:23 ` Goffredo Baroncelli
2014-01-04 20:08 ` Duncan
2014-01-04 21:22 ` Jim Salter
2014-01-05 11:01 ` Duncan
2014-01-03 23:19 ` Chris Murphy
[not found] ` <CAOjFWZ7zC3=4oH6=SBZA+PhZMrSK1KjxoRN6L2vqd=GTBKKTQA@mail.gmail.com>
2014-01-03 23:42 ` Jim Salter
2014-01-03 23:45 ` Jim Salter
2014-01-04 0:27 ` Chris Murphy
2014-01-04 2:59 ` Jim Salter
2014-01-04 5:57 ` Dave
2014-01-04 11:28 ` Chris Samuel
2014-01-04 14:56 ` Chris Mason
2014-01-05 9:20 ` Chris Samuel
2014-01-05 11:16 ` Duncan
2014-01-04 19:18 ` Chris Murphy
2014-01-04 21:16 ` Jim Salter
2014-01-05 20:25 ` Chris Murphy
2014-01-06 10:20 ` Chris Samuel
2014-01-06 18:30 ` Chris Murphy
2014-01-06 19:25 ` Jim Salter
2014-01-06 22:05 ` Chris Murphy
2014-01-06 22:24 ` Jim Salter
2014-01-07 5:43 ` Chris Samuel
2014-01-06 19:31 ` correct way to rollback a root filesystem? Jim Salter
2014-01-07 11:55 ` Sander [this message]
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=20140107115506.GA1919@panda \
--to=sander@humilis.net \
--cc=jim@jrs-s.net \
--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