From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: How to erase a RAID1 (+++)?
Date: Fri, 31 Aug 2018 16:38:03 +0000 (UTC) [thread overview]
Message-ID: <pan$6fa76$8810056e$68edfd30$12da364b@cox.net> (raw)
In-Reply-To: VI1PR08MB0862F346E3B20945F73133CE920F0@VI1PR08MB0862.eurprd08.prod.outlook.com
Alberto Bursi posted on Fri, 31 Aug 2018 14:54:46 +0000 as excerpted:
> I just keep around a USB drive with a full Linux system on it, to act as
> "recovery". If the btrfs raid fails I boot into that and I can do
> maintenance with a full graphical interface and internet access so I can
> google things.
I do very similar, except my "recovery boot" is my backup (with normally
including for root two levels of backup/recovery available, three for
some things).
I've actually gone so far as to have /etc/fstab be a symlink to one of
several files, depending on what version of root vs. the off-root
filesystems I'm booting, with a set of modular files that get assembled
by scripts to build the fstabs as appropriate. So updating fstab is a
process of updating the modules, then running the scripts to create the
actual fstabs, and after I update a root backup the last step is changing
the symlink to point to the appropriate fstab for that backup, so it's
correct if I end up booting from it.
Meanwhile, each root, working and two backups, is its own set of two
device partitions in btrfs raid1 mode. (One set of backups is on
separate physical devices, covering the device death scenario, the other
is on different partitions on the same, newer and larger pair of physical
devices as the working set, so it won't cover device death but still
covers fat-fingering, filesystem fubaring, bad upgrades, etc.)
/boot is separate and there's four of those (working and three backups),
one each on each device of the two physical pairs, with the bios able to
point to any of the four. I run grub2, so once the bios loads that, I
can interactively load kernels from any of the other three /boots and
choose to boot any of the three roots.
And I build my own kernels, with an initrd attached as an initramfs to
each, and test that they boot. So selecting a kernel by definition
selects its attached initramfs as well, meaning the initr*s are backed up
and selected with the kernels.
(As I said earlier it'd sure be nice to be able to do away with the
initr*s again. I was actually thinking about testing that today, which
was supposed to be a day off, but got called in to work, so the test will
have to wait once again...)
What's nice about all that is that just as you said, each recovery/backup
is a snapshot of the working system at the time I took the backup, so
it's not a limited recovery boot at all, it has the same access to tools,
manpages, net, X/plasma, browsers, etc, that my normal system does,
because it /is/ my normal system from whenever I took the backup.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2018-08-31 20:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 12:49 How to erase a RAID1 ? Pierre Couderc
2018-08-29 12:52 ` Qu Wenruo
2018-08-29 14:07 ` Pierre Couderc
2018-08-30 1:24 ` Qu Wenruo
2018-08-30 9:13 ` How to erase a RAID1 (+++)? Pierre Couderc
2018-08-30 9:35 ` Qu Wenruo
2018-08-30 10:01 ` Pierre Couderc
2018-08-30 10:09 ` Qu Wenruo
2018-08-30 11:45 ` Kai Stian Olstad
2018-08-30 15:21 ` Alberto Bursi
2018-08-30 17:33 ` Chris Murphy
2018-08-30 17:44 ` Chris Murphy
2018-08-30 17:08 ` Chris Murphy
2018-08-31 2:29 ` Duncan
2018-08-31 6:53 ` Pierre Couderc
2018-08-31 14:54 ` Alberto Bursi
2018-08-31 15:58 ` Pierre Couderc
2018-08-31 16:38 ` Duncan [this message]
2018-08-31 6:41 ` Pierre Couderc
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='pan$6fa76$8810056e$68edfd30$12da364b@cox.net' \
--to=1i5t5.duncan@cox.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 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.