All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Klauer <Andreas.Klauer@metamorpher.de>
To: Ram Ramesh <rramesh2400@gmail.com>
Cc: Linux Raid <linux-raid@vger.kernel.org>
Subject: Re: My MD is too big to resize ext4.
Date: Sat, 8 Jul 2017 21:44:27 +0200	[thread overview]
Message-ID: <20170708194427.GA15208@metamorpher.de> (raw)
In-Reply-To: <ae47b321-07d1-2157-c217-844447e51ce2@gmail.com>

On Sat, Jul 08, 2017 at 01:12:11PM -0500, Ram Ramesh wrote:
>     1. My MD uses partitions sd{b,c,d,e,f,g}1 instead of full disks. So 
> I can create partitions on the drive instead of on the MD.
>     2. This means I need to shrink my current md device to smaller size 
> (say 12TB-14TB) - need to check my current
>           active ext4 data size. It is definitely less than 16TB.
>     3. Repartition the disks to create sd{b-g}2 for the reamining unused 
> 6xnTB area.
>     4. Created md1 with sd{b-g]2 to get md1.
>     5. Mount and use md1.

Should work; you have to shrink the filesystem first, (or stick to 
whatever size it has now), then the md, then the partition.

What makes this risky is that you have to pick the correct sizes. 
When growing you can't go wrong. When shrinking, you have to be 
careful not to shrink too much. Filesystems don't like it at all 
if their end is missing, and md doesn't like it if the block device 
is smaller than what it says in the metadata.

So you have to determine the exact filesystem size (tune2fs -l), 
and take mdadm data offsets into account.

Not necessary if you know what you're doing but if in doubt,
you can leave a safety margin with each of these steps.

Regards
Andreas Klauer

  reply	other threads:[~2017-07-08 19:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08  0:41 My MD is too big to resize ext4 Ram Ramesh
2017-07-08  6:50 ` Andreas Klauer
2017-07-08 18:12   ` Ram Ramesh
2017-07-08 19:44     ` Andreas Klauer [this message]
2017-07-08 22:22       ` Ram Ramesh
2017-07-09 23:09       ` Ram Ramesh
2017-07-08  7:34 ` Brad Campbell
2017-07-08  7:40   ` Reindl Harald
2017-07-08  8:12     ` Brad Campbell
2017-07-08 18:19   ` Ram Ramesh
2017-07-08 18:48     ` Ram Ramesh
2017-07-08  8:30 ` Wols Lists
2017-07-08 18:28   ` Ram Ramesh
2017-07-08 11:15 ` Roman Mamedov
2017-07-08 18:37   ` Ram Ramesh

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=20170708194427.GA15208@metamorpher.de \
    --to=andreas.klauer@metamorpher.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=rramesh2400@gmail.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.