From: "erpo41@gmail.com" <erpo41@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: RAID1 storage server won't boot with one disk missing
Date: Wed, 16 Sep 2015 17:56:42 -0600 [thread overview]
Message-ID: <CAPQXdDQzkQsJrRJH3+c0x93ogDPge_hjHyW1CZ-FQRAdoMaGoA@mail.gmail.com> (raw)
Good afternoon,
Earlier today, I tried to set up a storage server using btrfs but ran
into some problems. The goal was to use two disks (4.0TB each) in a
raid1 configuration.
What I did:
1. Attached a single disk to a regular PC configured to boot with UEFI.
2. Booted from a thumb drive that had been made from an Ubuntu 14.04
Server x64 installation DVD.
3. Ran the installation procedure. When it came time to partition the
disk, I chose the guided partitioning option. The partitioning scheme
it suggested was:
* A 500MB EFI System Partition.
* An ext4 root partition of nearly 4 TB in size.
* A 4GB swap partition.
4. Changed the type of the middle partition from ext4 to btrfs, but
left everything else the same.
5. Finalized the partitioning scheme, allowing changes to be written to disk.
6. Continued the installation procedure until it finished. I was able
to boot into a working server from the single disk.
7. Attached the second disk.
8. Used parted to create a GPT label on the second disk and a btrfs
partition that was the same size as the btrfs partition on the first
disk.
# parted /dev/sdb
(parted) mklabel gpt
(parted) mkpart primary btrfs #####s ##########s
(parted) quit
9. Ran "btrfs device add /dev/sdb1 /" to add the second device to the
filesystem.
10. Ran "btrfs balance start -dconvert=raid1 -mconvert=raid1 /" and
waited for it to finish. It reported that it finished successfully.
11. Rebooted the system. At this point, everything appeared to be working.
12. Shut down the system, temporarily disconnected the second disk
(/dev/sdb) from the motherboard, and powered it back up.
What I expected to happen:
I expected that the system would either start as if nothing were
wrong, or would warn me that one half of the mirror was missing and
ask if I really wanted to start the system with the root array in a
degraded state.
What actually happened:
During the boot process, a kernel message appeared indicating that the
"system array" could not be found for the root filesystem (as
identified by a UUID). It then dumped me to an initramfs prompt.
Powering down the system, reattaching the second disk, and powering it
on allowed me to boot successfully. Running "btrfs fi df /" showed
that all System data was stored as RAID1.
If I want to have a storage server where one of two drives can fail at
any time without causing much down time, am I on the right track? If
so, what should I try next to get the behavior I'm looking for?
Thanks,
Eric
next reply other threads:[~2015-09-16 23:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 23:56 erpo41 [this message]
2015-09-17 15:18 ` RAID1 storage server won't boot with one disk missing Anand Jain
2015-09-17 15:42 ` Chris Murphy
2015-09-17 17:00 ` Goffredo Baroncelli
2015-09-17 19:02 ` Roman Mamedov
2015-09-17 20:18 ` Chris Murphy
2015-09-18 13:29 ` Austin S Hemmelgarn
2015-09-21 20:00 ` Erkki Seppala
2015-09-18 1:36 ` Duncan
2015-09-18 3:02 ` Gareth Pye
2015-09-21 20:35 ` Erkki Seppala
2015-09-22 5:12 ` Duncan
2015-09-22 11:32 ` Austin S Hemmelgarn
2015-09-22 12:51 ` Qu Wenruo
2015-09-22 13:21 ` Austin S Hemmelgarn
2015-09-22 18:35 ` Chris Murphy
2015-09-22 19:45 ` Austin S Hemmelgarn
2015-09-17 15:26 ` Chris Murphy
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=CAPQXdDQzkQsJrRJH3+c0x93ogDPge_hjHyW1CZ-FQRAdoMaGoA@mail.gmail.com \
--to=erpo41@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).