From: Paul Clements <paul.clements@steeleye.com>
To: "Marlier, Ian" <marlieri@studentuniverse.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Shrinking a RAID1 device mounted as root?
Date: Wed, 14 Jul 2004 12:42:21 -0400 [thread overview]
Message-ID: <40F5626D.9000406@steeleye.com> (raw)
In-Reply-To: <66EEBBD3485BB84C90CFA900A0A96E55013BEC82@sumail03.studentuniverse.com>
Marlier, Ian wrote:
> Because /dev/hd[ab]1 is larger than /dev/md0, and the starting block of
> the partitions is the same, the filesystem should remain intact.
So you are saying that the filesystem was less than 16GB in size to
start with?
> However, upon rebooting, I ran into a problem. /dev/md0 cannot be
> mounted because of a problem with the superblocks.
Right, the superblocks would have been between 64KB and 128KB from the
end of the original md device, which presumably was ~33GB in size. Now
that the partitions are smaller, the superblocks are no longer located
inside of the partitions, so the new partitions effectively have no
superblocks.
> I figure that something needs to be done with mdadm to get it to
> recognize the "new" /dev/hda1 and /dev/hdb1 as /dev/md0 -- but I don't
> want to do a mdadm --create because that will overwrite the filesystem
> already on the disks (I think?).
Create will write new superblocks to /dev/hda1 and /dev/hdb1. Without
these, the array cannot be started. The superblocks are what tell the md
driver that /dev/md0 is composed of /dev/hda1 and /dev/hdb1.
If the filesystem is at least 128KB smaller than the partitions, then
you'll have room for the superblocks at the end. Otherwise, go back with
fdisk and make the partitions just a little bit larger and then do your
mdadm --create.
> Is this something that mdadm --assemble can do? If so, what switches
> need to be fed to the command?
Assemble requires that the superblocks already be present, so until they
are re-created, you cannot assemble the array.
--
Paul
next prev parent reply other threads:[~2004-07-14 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-14 15:47 Shrinking a RAID1 device mounted as root? Marlier, Ian
2004-07-14 16:29 ` Mike Tran
2004-07-14 16:42 ` Paul Clements [this message]
2004-07-14 16:44 ` Guy
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=40F5626D.9000406@steeleye.com \
--to=paul.clements@steeleye.com \
--cc=linux-raid@vger.kernel.org \
--cc=marlieri@studentuniverse.com \
/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.