* Shrinking raid array
@ 2013-02-12 15:52 Phillip Susi
2013-02-12 16:39 ` Phillip Susi
0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2013-02-12 15:52 UTC (permalink / raw)
To: Linux RAID
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm working on shrinking a raid array and need some clarification on
where the metadata goes and how large it is. I have used -G with -Z
and -z to reduce the used size of each disk, but the man page says you
need some extra space at the end of the disk for the metadata ( format
1.0 ), but doesn't specify exactly how much. I need to know what the
exact size of the reduced partition should be.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRGmVUAAoJEJrBOlT6nu7591gIAIxoEWfN0L84UhaEwbKjzaOi
MXeCEdMjiGi5a4DCkl8FkKsrAHDHrmFKJ5hBr8u6DfS8rHyX7CmdUz5aVW1VhK/e
/bo44Vsrl/Tj7nqBYX4rxm3yhPzN17tTGKcf0lunWXFg9Ykv4Gc4EefzSsjTPbZf
oHepjklaik2tff3JCuxP7nv3I97BULmVvKJFKgeooK9QB6F5pRY1LnjRNhM91CKN
zkvoi3mitmK6fGZ+N7PUiogv2TczvX6m+yeNFb7Qw7opsrdErh7TH752efeKQ4bU
Iwomx1kYZT2k2swo+SahkZr58bfBkTzG5KZXUojEXO/pTX1vJFg+FOoVZ5m0bLY=
=k41W
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Shrinking raid array
2013-02-12 15:52 Shrinking raid array Phillip Susi
@ 2013-02-12 16:39 ` Phillip Susi
2013-02-12 17:53 ` Mikael Abrahamsson
0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2013-02-12 16:39 UTC (permalink / raw)
To: Linux RAID
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/12/2013 10:52 AM, Phillip Susi wrote:
> I'm working on shrinking a raid array and need some clarification
> on where the metadata goes and how large it is. I have used -G
> with -Z and -z to reduce the used size of each disk, but the man
> page says you need some extra space at the end of the disk for the
> metadata ( format 1.0 ), but doesn't specify exactly how much. I
> need to know what the exact size of the reduced partition should
> be.
I just noticed that reducing the used dev size has not moved the
metadata, so it is looking like it just isn't possible to shrink the
md partition with metadata format 1.0?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRGnBSAAoJEJrBOlT6nu75u0AIAJybUCaf02hyvAbDUD3JmjIA
MXW8yapXks4Xta5YX7MQlPJu0yLniw++0W1Y76vJ1gEjqN+JNUMN2k4CVeGLSwz+
UznaLejNkGiZ9+n3e1Fq1LKu/6J4Z16AC+If+1kmVpm5hDPkbJ3cPp6ZcfgSZhIp
/diiJrm7cdGMxtMXTqYPPhVwn9QmxNyoLNdN3OdPpKaNadkNksYi/AnbUmGEhuzx
q9TNIJwW4v0WZTZ8AevHvFlgFcgk41pdh8nN6ta/EKRzcfj32ro1HrA1P8zdp6gr
QYTzf+UHa27kZGNKrgD7dgFWFlsZf7zQ6WTV3iKoy/HQIARFzdmonVBTTfg6D8A=
=UCSK
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Shrinking raid array
2013-02-12 16:39 ` Phillip Susi
@ 2013-02-12 17:53 ` Mikael Abrahamsson
2013-02-12 18:11 ` Phillip Susi
0 siblings, 1 reply; 8+ messages in thread
From: Mikael Abrahamsson @ 2013-02-12 17:53 UTC (permalink / raw)
To: Phillip Susi; +Cc: Linux RAID
On Tue, 12 Feb 2013, Phillip Susi wrote:
> I just noticed that reducing the used dev size has not moved the
> metadata, so it is looking like it just isn't possible to shrink the md
> partition with metadata format 1.0?
From "man mdadm"
"The different sub-versions store the superblock at different locations on
the device, either at the end (for 1.0), at the start (for 1.1) or 4K from
the start (for 1.2)"
I don't really see how it could be shrunk with a superblock at the end,
then you wouldn't be able to find it next time...
--
Mikael Abrahamsson email: swmike@swm.pp.se
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Shrinking raid array
2013-02-12 17:53 ` Mikael Abrahamsson
@ 2013-02-12 18:11 ` Phillip Susi
2013-02-12 18:43 ` Mikael Abrahamsson
0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2013-02-12 18:11 UTC (permalink / raw)
To: Mikael Abrahamsson; +Cc: Linux RAID
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/12/2013 12:53 PM, Mikael Abrahamsson wrote:
> On Tue, 12 Feb 2013, Phillip Susi wrote:
>
>> I just noticed that reducing the used dev size has not moved the
>> metadata, so it is looking like it just isn't possible to shrink
>> the md partition with metadata format 1.0?
>
> From "man mdadm"
>
> "The different sub-versions store the superblock at different
> locations on the device, either at the end (for 1.0), at the start
> (for 1.1) or 4K from the start (for 1.2)"
>
> I don't really see how it could be shrunk with a superblock at the
> end, then you wouldn't be able to find it next time...
You move the superblock, then shrink the partition...
But it looks like mdadm doesn't move the superblock even though it no
longer is using the full partition.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRGoXXAAoJEJrBOlT6nu75N+YH/R/om3wi5yJ/DidGWJFxd5J2
WuLV0oUqggDZxjM32/usuZwzVCnPnvXDmd9HKavf9Ko8gVnMUsJeVtv6fQDmr4uy
IpPyrHcYa80am3hX5maGt+orJgk4kP4sc2x4Ya/OYBHfiTYn704+bUmP8znrJ5CG
rBzqWaRsdQy4v+ps/7l3VQuyJhDxEoNjz4NDAZC8wWqxoclJVtAE9uxPbdpYRLSV
+SlY76LIoea3YHXYLLu6vXJpQsaDalyVAzuDbEspJQ/fvjUTncCGicBvG/obbGsW
9hrftYoNnhEc7PmRPvbPFW7f6EkpPMbTo/FLhB0r8Fw0AS0AYG12UACH+zO2Rjg=
=hvFb
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Shrinking raid array
2013-02-12 18:11 ` Phillip Susi
@ 2013-02-12 18:43 ` Mikael Abrahamsson
2013-02-12 19:13 ` Phillip Susi
0 siblings, 1 reply; 8+ messages in thread
From: Mikael Abrahamsson @ 2013-02-12 18:43 UTC (permalink / raw)
To: Phillip Susi; +Cc: Linux RAID
On Tue, 12 Feb 2013, Phillip Susi wrote:
> You move the superblock, then shrink the partition...
As far as I know, mdadm has no code to shrink partitions?
> But it looks like mdadm doesn't move the superblock even though it no
> longer is using the full partition.
I think that is perfectly reasonable. Otherwise the superblock wouldn't be
found next time if the partition wasn't resized.
--
Mikael Abrahamsson email: swmike@swm.pp.se
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Shrinking raid array
2013-02-12 18:43 ` Mikael Abrahamsson
@ 2013-02-12 19:13 ` Phillip Susi
2013-02-13 5:12 ` Mikael Abrahamsson
0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2013-02-12 19:13 UTC (permalink / raw)
To: Mikael Abrahamsson; +Cc: Linux RAID
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/12/2013 1:43 PM, Mikael Abrahamsson wrote:
> On Tue, 12 Feb 2013, Phillip Susi wrote:
>
>> You move the superblock, then shrink the partition...
>
> As far as I know, mdadm has no code to shrink partitions?
Of course not, you would use fdisk or parted or whatever else to do that.
>> But it looks like mdadm doesn't move the superblock even though
>> it no longer is using the full partition.
>
> I think that is perfectly reasonable. Otherwise the superblock
> wouldn't be found next time if the partition wasn't resized.
Yes, but the way it is now the superblock won't be found if the
partition *is* resized. What is the use of reducing the amount of the
partition mdadm is using if you can't then shrink the partition itself?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRGpRxAAoJEJrBOlT6nu750k8IAMwCbeO6rhWP+6pg0nPmgeyI
HM5E1X9bJTqV9MfmvSKYjL8QBp6flYqd0bm++lbeOxFiujxKQ5QVSHIF8no6psVe
wLLeGy3ltFJ41QnuQAIf2YwR0jhUAd2Wxoeqwq7pnGnSVb8er3Y2ACuj7SNN7SwL
pe8DbrUQGpDydnLSH/Rzj/ioQ8BtWt6Uq/xZ8+3j5t3pqAJGmdnQroRJJ6W+0oKN
IwK7IK0SVP8fExSjDM2Lo3YfFXfgpan81GADNwYo5ZwEtPTfxvcuXrGVLbjXyN4o
Ae6DAMpNihSDKzTXvpPqnzimqpMDtue01zQQdDgkYfcheoQ1DsHnfO8aCnS/mIg=
=i9j8
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Shrinking raid array
2013-02-12 19:13 ` Phillip Susi
@ 2013-02-13 5:12 ` Mikael Abrahamsson
2013-02-13 5:17 ` Mikael Abrahamsson
0 siblings, 1 reply; 8+ messages in thread
From: Mikael Abrahamsson @ 2013-02-13 5:12 UTC (permalink / raw)
To: Phillip Susi; +Cc: Linux RAID
On Tue, 12 Feb 2013, Phillip Susi wrote:
> Yes, but the way it is now the superblock won't be found if the
> partition *is* resized. What is the use of reducing the amount of the
> partition mdadm is using if you can't then shrink the partition itself?
It makes sense if you for some reason want to use a smaller component
drive (thinking mostly of older drives where 36 or 73GB didn't mean an
exact size between manufacturers and you happened to create the array on a
larger drive than you now have available.
Anyhow, I can see that what you're looking for is useful as well but I
also believe it should be done through a special option and I imagine it
should also output information regarding where the partition should now
end (to use in fdisk) so mdadm can find the superblock next time.
--
Mikael Abrahamsson email: swmike@swm.pp.se
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Shrinking raid array
2013-02-13 5:12 ` Mikael Abrahamsson
@ 2013-02-13 5:17 ` Mikael Abrahamsson
0 siblings, 0 replies; 8+ messages in thread
From: Mikael Abrahamsson @ 2013-02-13 5:17 UTC (permalink / raw)
To: Phillip Susi; +Cc: Linux RAID
On Wed, 13 Feb 2013, Mikael Abrahamsson wrote:
> Anyhow, I can see that what you're looking for is useful as well but I
> also believe it should be done through a special option and I imagine it
> should also output information regarding where the partition should now
> end (to use in fdisk) so mdadm can find the superblock next time.
Actually, in addition to this, I also believe that there should be some
kind of superblock at the end of the current partition that points to the
location of the "new" moved superblock, so that things work even if you do
not change the partition size.
--
Mikael Abrahamsson email: swmike@swm.pp.se
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-02-13 5:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 15:52 Shrinking raid array Phillip Susi
2013-02-12 16:39 ` Phillip Susi
2013-02-12 17:53 ` Mikael Abrahamsson
2013-02-12 18:11 ` Phillip Susi
2013-02-12 18:43 ` Mikael Abrahamsson
2013-02-12 19:13 ` Phillip Susi
2013-02-13 5:12 ` Mikael Abrahamsson
2013-02-13 5:17 ` Mikael Abrahamsson
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).