All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Goryachev <mailinglists@websitemanagers.com.au>
To: linux-raid@vger.kernel.org
Subject: Re: Can't expand linear RAID on top of 2 x RAID1
Date: Fri, 29 Jun 2012 17:53:54 +1000	[thread overview]
Message-ID: <4FED5F12.2020100@websitemanagers.com.au> (raw)
In-Reply-To: <20120625125224.6e33b342@notabene.brown>

On 25/06/12 12:52, NeilBrown wrote:
> The is no '--assume-clean' for linear.  Linear arrays cannot be
> clean or dirty as md stores no redundant information.
> 
> Just re-creating the array would probably work, but there is an
> easier way.
> 
> md doesn't record the size of the array for Linear and RAID0.  It
> just adds together the sizes of the devices that it finds.
> 
> With 1.x metadata, md does record the effective size of each
> devices, so adds those together. You can update this effective size
> by assembling with --update=devicesize
> 
> I just checked this will loop devices and it works as expected
> (assuming you have 1.1 or 1.2 metadata). So: mdadm -S /dev/md2 
> mdadm -A --update=devicesize /dev/md0 /dev/md1
> 
> (order doesn't matter with assemble).

Hi,

Just a followup email on this to say Thank You very much for your
expert assistance, it was greatly appreciated.

> mdadm -S /dev/md2

I had some issues with this command, df showed that it was unmounted,
lsof showed nothing looking at the device nor filesystem where it was
mounted, etc... Eventually, I ran "mount" and realised I had bind
mounted a sub-directory elsewhere... Once I umounted that I could stop
the array... (Duh moment :)

> mdadm -A --update=devicesize /dev/md0 /dev/md1
I got an error that the device was in use, thankfully mdadm has the
smarts to stop me from idly shooting myself in the foot when doing
something as silly as copy & paste instructions from others without
stopping and thinking first.

I adjusted the command to the correct:
mdadm -A --update=devicesize /dev/md2 /dev/md0 /dev/md1

and got:
Size was 3907019634
Size is 3907019634
Size was 1465142752
Size is 1953515906

I then checked the array, was told the filesystem was clean, and then
resized that, and now I have the extra 250G space (just in time, I
only had 6% free space there).

So, again, thank you for your assistance, and thanks for all the work
you put into the drivers etc.

Regards,
Adam


      reply	other threads:[~2012-06-29  7:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 10:41 Can't expand linear RAID on top of 2 x RAID1 Adam Goryachev
2012-06-22 23:05 ` Stan Hoeppner
2012-06-23  2:53   ` Adam Goryachev
2012-06-23 12:18     ` Stan Hoeppner
2012-06-24 14:17       ` Stan Hoeppner
2012-06-25  2:52     ` NeilBrown
2012-06-29  7:53       ` Adam Goryachev [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=4FED5F12.2020100@websitemanagers.com.au \
    --to=mailinglists@websitemanagers.com.au \
    --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 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.