From: "David C. Rankin" <drankinatty@suddenlinkmail.com>
To: mdraid <linux-raid@vger.kernel.org>
Subject: Re: GPT corruption on Primary Header, backup OK, fixing primary nuked array -- help?
Date: Tue, 26 Jul 2016 15:12:05 -0500 [thread overview]
Message-ID: <5797C415.8010206@suddenlinkmail.com> (raw)
In-Reply-To: <ff6872cd-98eb-aad2-a71a-7af52050ff30@websitemanagers.com.au>
On 07/26/2016 04:52 AM, Adam Goryachev wrote:
> No, I'm saying that is an excellent idea, and it is exactly what I always do.
> The problem is that you created the single large primary partition, and then
> used the raw drive for the raid array instead of using the partition.
Damn, that is exactly what I did, even though I intended to use sdc1 and sdd1.
Checking bash_history for root, I find:
mdadm --create --verbose --level=1 --metadata=1.2 --raid-devices=2 /dev/md4
/dev/sdc /dev/sdd
then
mkfs.ext4 -v -L data -m 0.005 -b 4096 -E stride=16,stripe-width=32 /dev/md4
So basically I just need to fix the partition table on sdc, that will leave both
sdc and sdd with health partition tables and a primary partition of sdc1 and
sdd1. I'll blow away the current degraded md4 and recreate md4 with
mdadm --create --verbose --level=1 --metadata=1.2 --raid-devices=2 /dev/md4
/dev/sdc1 /dev/sdd1
mkfs.ext4 -v -L data -m 0.005 -b 4096 -E stride=16,stripe-width=32 /dev/md4
Then its just a matter of re-copying the data, uncommenting fstab and updating
mdadm.conf?
This even solved the mystery of where the original corruption came from. That's
a hole in one.
As for either shrinking the filesystem on sdc to fit on sdc1 and sdd1, is that
worth attempting, or is it probably better to just blow away the existing array
and then recreate it all as indicated above? If I can save the filesystem, I
save a few hours of formatting, but I worry about the reliability of shrinking
the filesystem. (there is plenty of room, I have 258G used out of 2.7T) What is
the consensus? Is shrinking reliable, or is it something to consider as a worse
case scenario (as in the hypothetical replacing of a disk that is slightly
smaller than the failed one)?
Thank you again for your help. Glad to see Murphy's law is still well in force
and effect. (an entire PT mystery caused by some dummy that forgot to append the
'1' during the mdadm --create -- who would have imagined :)
--
David C. Rankin, J.D.,P.E.
next prev parent reply other threads:[~2016-07-26 20:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 0:52 GPT corruption on Primary Header, backup OK, fixing primary nuked array -- help? David C. Rankin
2016-07-26 4:18 ` Adam Goryachev
2016-07-26 5:28 ` David C. Rankin
2016-07-26 8:20 ` David C. Rankin
2016-07-26 9:52 ` Adam Goryachev
2016-07-26 17:14 ` Phil Turmel
2016-07-26 20:24 ` David C. Rankin
2016-07-26 20:12 ` David C. Rankin [this message]
2016-07-26 20:47 ` Chris Murphy
2016-07-26 22:47 ` David C. Rankin
2016-07-26 23:18 ` Chris Murphy
2016-07-27 7:13 ` SOLVED [was Re: GPT corruption on Primary Header, backup OK, fixing primary nuked array -- help?] David C. Rankin
2016-07-27 13:04 ` Anthony Youngman
2016-07-27 23:10 ` David C. Rankin
2016-07-28 12:53 ` Anthony Youngman
2016-07-28 20:51 ` Andreas Dröscher
2016-07-28 21:25 ` Phil Turmel
2016-07-27 14:22 ` Phil Turmel
2016-07-27 23:12 ` David C. Rankin
2016-07-27 13:10 ` GPT corruption on Primary Header, backup OK, fixing primary nuked array -- help? Anthony Youngman
2016-07-26 15:19 ` Chris Murphy
2016-07-26 15:55 ` Chris Murphy
2016-07-26 21:12 ` David C. Rankin
2016-07-26 22:10 ` Phil Turmel
2016-07-26 22:59 ` David C. Rankin
2016-07-26 23:23 ` Chris Murphy
2016-07-27 0:19 ` David C. Rankin
2016-07-26 20:34 ` David C. Rankin
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=5797C415.8010206@suddenlinkmail.com \
--to=drankinatty@suddenlinkmail.com \
--cc=linux-raid@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).