Skip to contentSkip to conversation

add another disk to existing raid 0, ie grow raid 0 possible?

DISCUSSION Nikolay Kichukov 3 participants 13 messages Jan 26, 2012 – Feb 20, 2012 MD RAID

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I tried to expand md block device raid level 0 ( /dev/md2 ) by adding another partition to it.

Here are the steps:

mdadm --assemble /dev/md2
mdadm: /dev/md2 has been started with 2 drives.

hanna64:~# mdadm --grow /dev/md2 --raid-devices=3 --add /dev/sdc2
mdadm: level of /dev/md2 changed to raid4
mdadm: added /dev/sdc2
mdadm: Need to backup 3072K of critical section..

Now fdisk -l cannot complete, just goes to D state.

Disks layout before the grow attempt:

ARRAY /dev/md2 metadata=1.2 name=hanna64:2 UUID=4840f7f0:71b5f4a0:c4d8a42c:0b43b5fb

/dev/sda2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="cf97412f-269a-f3e8-fde2-8ca3bf42a349"
/dev/sdb2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="9aee2d4c-6deb-911a-d790-cbd12f6c671c"

md2 : active raid0 sda2[0] sdb2[1]

      15628288 blocks super 1.2 512k chunks

Disk /dev/md2: 16.0 GB, 16003366912 bytes
2 heads, 4 sectors/track, 3907072 cylinders, total 31256576 sectors Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 524288 bytes / 1048576 bytes Disk identifier: 0x7b88c100

Disk /dev/md2 doesn't contain a valid partition table

This array was used as swap, so no valuable information is stored there anyways. Let me know what has gone wrong and what I typed wrong assuming the grow command will just add /dev/sdc2 to the existing array and make it larger with the size of /dev/sdc2.

Thank you,
- -Nikolay Kichukov

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPISpZAAoJEDFLYVOGGjgXS4IIAIDdhB1lInCO9jpb9eQRyj8x QQYl7B+t0pud/mBuML5T2eTou/qtLhp4Mdv0ZoiwJ7NIuouXuR1wOAbe7/LDkKwB ku1iLjLpnqLtQZnctYV598cjH3q2mzb8zi7bOoD3FTGRN/DmyNik0WflsLA04TBc 0ohR4KoQIA/j95CvhNrMhZ2tyUis8VmhN+aBzdCnm90gNE8fLJKpUsB1hKahocit wSUg9ab/C2wDHTBp5mq1AJModgClCKMCUgf7Z4A1f2zP6NPy1xmoP88emGLUSo/b NEMwNTqKjzKcxo67kl0xUGnp8kxVfCLGfjDQHUUFwMT1F9g/PWkgBD0CXmfBSbk= =g/v/
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 53 lines · Nikolay Kichukov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I tried to expand md block device raid level 0 ( /dev/md2 ) by adding another partition to it.

Here are the steps:

mdadm --assemble /dev/md2
mdadm: /dev/md2 has been started with 2 drives.

hanna64:~# mdadm --grow /dev/md2 --raid-devices=3 --add /dev/sdc2
mdadm: level of /dev/md2 changed to raid4
mdadm: added /dev/sdc2
mdadm: Need to backup 3072K of critical section..

Now fdisk -l cannot complete, just goes to D state.

Disks layout before the grow attempt:

ARRAY /dev/md2 metadata=1.2 name=hanna64:2 UUID=4840f7f0:71b5f4a0:c4d8a42c:0b43b5fb

/dev/sda2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="cf97412f-269a-f3e8-fde2-8ca3bf42a349"
/dev/sdb2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="9aee2d4c-6deb-911a-d790-cbd12f6c671c"

md2 : active raid0 sda2[0] sdb2[1]
     15628288 blocks super 1.2 512k chunks

Disk /dev/md2: 16.0 GB, 16003366912 bytes
2 heads, 4 sectors/track, 3907072 cylinders, total 31256576 sectors Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 524288 bytes / 1048576 bytes Disk identifier: 0x7b88c100

Disk /dev/md2 doesn't contain a valid partition table

This array was used as swap, so no valuable information is stored there anyways. Let me know what has gone wrong and what I typed wrong assuming the grow command will just add /dev/sdc2 to the existing array and make it larger with the size of /dev/sdc2.

Thank you,
- -Nikolay Kichukov

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

Quoted 12 lines

iQEcBAEBAgAGBQJPISpZAAoJEDFLYVOGGjgXS4IIAIDdhB1lInCO9jpb9eQRyj8x QQYl7B+t0pud/mBuML5T2eTou/qtLhp4Mdv0ZoiwJ7NIuouXuR1wOAbe7/LDkKwB ku1iLjLpnqLtQZnctYV598cjH3q2mzb8zi7bOoD3FTGRN/DmyNik0WflsLA04TBc 0ohR4KoQIA/j95CvhNrMhZ2tyUis8VmhN+aBzdCnm90gNE8fLJKpUsB1hKahocit wSUg9ab/C2wDHTBp5mq1AJModgClCKMCUgf7Z4A1f2zP6NPy1xmoP88emGLUSo/b NEMwNTqKjzKcxo67kl0xUGnp8kxVfCLGfjDQHUUFwMT1F9g/PWkgBD0CXmfBSbk= =g/v/
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

AFAIK growing raid0 is not possible.

/M
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 68 lines · On Thu, 26 Jan 2012 10:47:14 +0000 Mathias Burén <[email protected]>…
Quoted 53 lines · Nikolay Kichukov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I tried to expand md block device raid level 0 ( /dev/md2 ) by adding another partition to it.

Here are the steps:

mdadm --assemble /dev/md2
mdadm: /dev/md2 has been started with 2 drives.

hanna64:~# mdadm --grow /dev/md2 --raid-devices=3 --add /dev/sdc2
mdadm: level of /dev/md2 changed to raid4
mdadm: added /dev/sdc2
mdadm: Need to backup 3072K of critical section..

Now fdisk -l cannot complete, just goes to D state.

Disks layout before the grow attempt:

ARRAY /dev/md2 metadata=1.2 name=hanna64:2 UUID=4840f7f0:71b5f4a0:c4d8a42c:0b43b5fb

/dev/sda2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="cf97412f-269a-f3e8-fde2-8ca3bf42a349"
/dev/sdb2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="9aee2d4c-6deb-911a-d790-cbd12f6c671c"

md2 : active raid0 sda2[0] sdb2[1]
     15628288 blocks super 1.2 512k chunks

Disk /dev/md2: 16.0 GB, 16003366912 bytes
2 heads, 4 sectors/track, 3907072 cylinders, total 31256576 sectors Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 524288 bytes / 1048576 bytes Disk identifier: 0x7b88c100

Disk /dev/md2 doesn't contain a valid partition table

This array was used as swap, so no valuable information is stored there anyways. Let me know what has gone wrong and what I typed wrong assuming the grow command will just add /dev/sdc2 to the existing array and make it larger with the size of /dev/sdc2.

Thank you,
- -Nikolay Kichukov

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

Quoted 12 lines

iQEcBAEBAgAGBQJPISpZAAoJEDFLYVOGGjgXS4IIAIDdhB1lInCO9jpb9eQRyj8x QQYl7B+t0pud/mBuML5T2eTou/qtLhp4Mdv0ZoiwJ7NIuouXuR1wOAbe7/LDkKwB ku1iLjLpnqLtQZnctYV598cjH3q2mzb8zi7bOoD3FTGRN/DmyNik0WflsLA04TBc 0ohR4KoQIA/j95CvhNrMhZ2tyUis8VmhN+aBzdCnm90gNE8fLJKpUsB1hKahocit wSUg9ab/C2wDHTBp5mq1AJModgClCKMCUgf7Z4A1f2zP6NPy1xmoP88emGLUSo/b NEMwNTqKjzKcxo67kl0xUGnp8kxVfCLGfjDQHUUFwMT1F9g/PWkgBD0CXmfBSbk= =g/v/
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 1 line

AFAIK growing raid0 is not possible.

Seems an odd thing to say, given that when OP demonstrated that mdadm didn't complain, but went as far as converting the array to RAID4 so it could perform a reshape.....

It wasn't possible once, but times change.

To know what went wrong I would need lots more details. Start with the output of 'dmesg' - or equivalent from logs (e.g. /var/log/kern.log or /var/log/messages).

Then "mdadm -E" output of each device in the array.

NeilBrown

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,

Here goes the details. Once again, no valuable data, just curious what has gone wrong in that case:

dmesg output, first I stopped md2, then assembled it again to perform the grow.
http://pastebin.com/HkPVEKad

mdadm -E output:
http://pastebin.com/pJCjvrJE

The system runs GNU/Debian testing with latest updates from security-testing applied.

Kernel: 3.1.0-1-amd64
mdadm:  3.2.2-1

Let me know should you need any further information.

Cheers,
- -Nik

Quoted 43 lines · NeilBrown
Quoted 1 line · On Thu, 26 Jan 2012 10:47:14 +0000 Mathias Burén <[email protected]>…

On 26 January 2012 10:26, Nikolay Kichukov <[email protected]> wrote:

Hi all,

I tried to expand md block device raid level 0 ( /dev/md2 ) by adding another partition to it.

Here are the steps:

mdadm --assemble /dev/md2
mdadm: /dev/md2 has been started with 2 drives.

hanna64:~# mdadm --grow /dev/md2 --raid-devices=3 --add /dev/sdc2
mdadm: level of /dev/md2 changed to raid4
mdadm: added /dev/sdc2
mdadm: Need to backup 3072K of critical section..

Now fdisk -l cannot complete, just goes to D state.

Disks layout before the grow attempt:

ARRAY /dev/md2 metadata=1.2 name=hanna64:2 UUID=4840f7f0:71b5f4a0:c4d8a42c:0b43b5fb

/dev/sda2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="cf97412f-269a-f3e8-fde2-8ca3bf42a349"
/dev/sdb2: UUID="4840f7f0-71b5-f4a0-c4d8-a42c0b43b5fb" TYPE="linux_raid_member" LABEL="hanna64:2" UUID_SUB="9aee2d4c-6deb-911a-d790-cbd12f6c671c"

md2 : active raid0 sda2[0] sdb2[1]

     15628288 blocks super 1.2 512k chunks

Disk /dev/md2: 16.0 GB, 16003366912 bytes
2 heads, 4 sectors/track, 3907072 cylinders, total 31256576 sectors Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 524288 bytes / 1048576 bytes Disk identifier: 0x7b88c100

Disk /dev/md2 doesn't contain a valid partition table

Quoted 7 lines

This array was used as swap, so no valuable information is stored there anyways. Let me know what has gone wrong and what I typed wrong assuming the grow command will just add /dev/sdc2 to the existing array and make it larger with the size of /dev/sdc2.

Thank you,
-Nikolay Kichukov

- --
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 10 lines
Quoted 3 lines

AFAIK growing raid0 is not possible.

Seems an odd thing to say, given that when OP demonstrated that mdadm didn't complain, but went as far as converting the array to RAID4 so it could perform a reshape.....

It wasn't possible once, but times change.

Quoted 7 lines

To know what went wrong I would need lots more details. Start with the output of 'dmesg' - or equivalent from logs (e.g. /var/log/kern.log or /var/log/messages).

Then "mdadm -E" output of each device in the array.

NeilBrown

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPITltAAoJEDFLYVOGGjgXfQ0IAIEDBtmBNZHirPSc2UBsQi6a LK3NQf0R7afVFyRqbcb6sizGy9i89vTUwfXKeq/lite2wafrxJUyjmql/9TBv5by aaYS7Z9aq0qU2fE6JW2RF1Owi/jLABQn3RJc+9oI+NJL9OYK/lkeyWaNhF7t96FY itb7TCL38vc0JIlNNUom1IqCUna6kNo4Bunz6FepyXQEjzHhgXwFynrbdTicO4rN LK/bPt47QEU/GkRigALjZBgpVoMFdVPgxc+jphRiOH+gmqSOI/Co3jeCbwvDBzk6 ZVzTyehWZgPKfYqNCpiDfWEJyArqx0/maXpnu4lMT4Qnkp7mnVdTSQ7uE+wJafY= =rqI+
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · On Thu, 26 Jan 2012 13:30:53 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,

Here goes the details. Once again, no valuable data, just curious what has gone wrong in that case:

dmesg output, first I stopped md2, then assembled it again to perform the grow.
http://pastebin.com/HkPVEKad

Hmmm... definitely looks sick.

Quoted 7 lines

mdadm -E output:
http://pastebin.com/pJCjvrJE

The system runs GNU/Debian testing with latest updates from security-testing applied.

Kernel: 3.1.0-1-amd64
mdadm:  3.2.2-1

Those should be recent enough ... I guess I must have broken something. This will need more than a couple of minutes - I'll try to have a proper look next week.

Thanks for the report,

NeilBrown

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIVAwUBTyE+gjnsnt1WYoG5AQJyiRAAhRRhs08IZbjWYZUsGo4Wx0hw8Y4kTXg/ +vYrgBpbKXA/uk8DdjBFw2/+25km9S556dVf5wXmdtJ6T2+okpnLc2dHvRIsiNYm ev0kbpen+W5zpv++5pLgrmlF2uJn6k9wVBgRKENoD+kGq8kifEPn496ay2fi6Rvl 6GCpMfm1pKRorDFAmjgwtUuAQz8+FDPkh2EygeU04wWFc2YQmva1S3xHMyKlFzIM 5VknDZmIxJKAD6tfiLRbSK/dzo9mV0r/HoUWFb20OJyi2lI6WqFj/Cw/3fdmXZge eivSOmxNRHYP+dpoQNDa3r35yqEnzQ2FMYaICp3T/SydrQcCZPVmNKPWP8OofwS9 gKRHSmXuqxdqprg0RttAUN/O+e2MllPyOqAeLrH/4ls15LFGWHk8bzk2KqG8DrjH WzWxjAkIdfM7j6V88vRqHLKbxSMiV7srkc9D1eAE3F9lFsGtc/OU3OAC4dkwbFOQ WlpnLBSDv+leMODLd7WqvD+8hZI2CWmcduElvSnSKfXhMwkKPEmb+gTJAs4Tu3Rm U8Fo5kUTKJE6ZdQJO3doZVNd4J7K0JCW+VOtGK0NGstpWito0a0uREnRQ4Ii/h6p FjBJCL/hgOeJnnxiN4Z1HpxmyXmi+uBiJUONjhDhTtgn714jfA8YjEx2+JkR9/FZ 115JOECYLeE=
=2j3b
-----END PGP SIGNATURE-----

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
sure, take your time. I am rebooting this kernel now and will setup the raid 0 from scratch with 3 disks/partitions.

Best,
- -Nik

Quoted 23 lines · NeilBrown
Quoted 9 lines · On Thu, 26 Jan 2012 13:30:53 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,

Here goes the details. Once again, no valuable data, just curious what has gone wrong in that case:

dmesg output, first I stopped md2, then assembled it again to perform the grow.
http://pastebin.com/HkPVEKad

Hmmm... definitely looks sick.

Quoted 6 lines

mdadm -E output:
http://pastebin.com/pJCjvrJE

The system runs GNU/Debian testing with latest updates from security-testing applied.

Kernel: 3.1.0-1-amd64
mdadm:  3.2.2-1
Quoted 10 lines

Those should be recent enough ... I guess I must have broken something. This will need more than a couple of minutes - I'll try to have a proper look next week.

Thanks for the report,

NeilBrown

N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±­¨Š{ayºʇڙë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝ¢j"ú!tml= -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPIUNEAAoJEDFLYVOGGjgX1FcIAMfIYdnO9NjL2+OlqG/Lw+Cz fRwRKSYKkr2EavY0RAP9Wh5APgi3znhL5HAwA8haZznaMziI6XHSWoOef8UYKG2Y HMf2H3HR4ICttmJvjlqRfIoLeI431kJ3wP6n/+Y+uFODeGdYFi28qwKaNhwg0ycR woGO/6UJbOSasOOI2KS3yXcIK8Ag2y1NoGo/Js1TFOjsgN85vYEnwMluuX3Z8EaY qJAPgvLV5dGzonFbFMpAvf2KZ2eaZBXlzlClbzVn0W7mnuNjM/SeUfUIkH/liq/o jx+mS+DnFh/7ZqAbe6lNs/HTSSkdOsVm1jMq6ygc0bGjJftwY4z/NHjXGpnGIZQ= =UL7k
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to Nikolay Kichukov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · On Thu, 26 Jan 2012 13:30:53 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,

Here goes the details. Once again, no valuable data, just curious what has gone wrong in that case:

dmesg output, first I stopped md2, then assembled it again to perform the grow.
http://pastebin.com/HkPVEKad

Quoted 8 lines

mdadm -E output:
http://pastebin.com/pJCjvrJE

The system runs GNU/Debian testing with latest updates from security-testing applied.

Kernel: 3.1.0-1-amd64
mdadm:  3.2.2-1

Let me know should you need any further information.

I've finally had a look at this and unfortunately cannot find the problem. The main reason being that I cannot reproduce it.
I built the same kernel and mdadm and created a very similar array and tried to grow it and it all went smoothly.

In your case it didn't start the reshape at all (reshape position was zero) so something went wrong very early.

If you feel like trying to reproduce it again that might be helpful. Then I would ask you to run the "mdadm --grow" command under

    strace -o /tmp/foo -f mdadm --grow ....

and send me the /tmp/foo. But I won't be surprised if you cannot reproduce. Sad really.

Thanks anyway,
NeilBrown
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIVAwUBTzNCnjnsnt1WYoG5AQKYmQ/7BpQMjqjgceyMgbl5xFE3rNf0Raia5Og0 5UrxQtNDD+rKnQgHUN3WJizXZ+T+qN0FAFxUs4XArRdZCNN3QHeMxdSv1h3DPVta roKxjeRNgLKf11GGm6Vw4z8wJlfhvF0pDW7SVysIO/0IXBy1OK7ll3j45Hjp0Tz4 L46//YsrRqijGz8eoOh7QXMF2YVEaD6Q5xbqM4TL4Bsovsl2ii9aTWlETpWuh/GB c/p2uU4I6G3H/7fpd3kF2/UIwoR5kwUacRICmn4kwq4wTMjzPFc/rHynFF/AZMHR PrdS/BG5pwr75IMnInFuKeLK5LvlwWzcnDwWx5GRhJi0LlYlws2JJrMbAnn/zbrM mzNQUZK8y+j0Bo5xArpl9D715fGxajmPyHInHR3vOH5xOkIW8Irkue3TxVyq/oUD HEljE6tBdOp9meiECTAP4LBLeQmyohIPw722F/qsc54nG3dYztRV0vFJftubw1X0 LAzQrxzqy6lSWnGyJjE/kXEqcIFPqUw4q7JmXEKe5QDoPNRo9KPVO0sLUB+7O3Of IXMTxf8Gz/m5tfsx3DmSRVnZkwpwwlr2GUHusFTQdrnQYfKhGjrFw27ygdvmvqtV zuEVf2tr2G/eGBt2A9Vv+hthZzYpesv1JT04gA9dnyQyIfFhA15JAXPJOqAXv8D3 8f70+yvjlBg=
=l9xR
-----END PGP SIGNATURE-----

#7 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Neil,
Do you think it will make sense to try to replicate using loop devices?

Cheers,
- -Nik

Quoted 32 lines · NeilBrown
Quoted 10 lines · On Thu, 26 Jan 2012 13:30:53 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,

Here goes the details. Once again, no valuable data, just curious what has gone wrong in that case:

dmesg output, first I stopped md2, then assembled it again to perform the grow.
http://pastebin.com/HkPVEKad

Quoted 8 lines

mdadm -E output:
http://pastebin.com/pJCjvrJE

The system runs GNU/Debian testing with latest updates from security-testing applied.

Kernel: 3.1.0-1-amd64
mdadm:  3.2.2-1

Let me know should you need any further information.

I've finally had a look at this and unfortunately cannot find the problem. The main reason being that I cannot reproduce it.
I built the same kernel and mdadm and created a very similar array and tried to grow it and it all went smoothly.

In your case it didn't start the reshape at all (reshape position was zero) so something went wrong very early.

If you feel like trying to reproduce it again that might be helpful. Then I would ask you to run the "mdadm --grow" command under

Quoted 7 lines
    strace -o /tmp/foo -f mdadm --grow ....

and send me the /tmp/foo. But I won't be surprised if you cannot reproduce. Sad really.

Thanks anyway,
NeilBrown

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPNSVBAAoJEDFLYVOGGjgX6b8H/28J1Ju3ccFq5awOnErcrqMP eaIwiZx6MNLObHliPdycISqjQdvEy5TcGPr5bL+WbLqkPEhe4OVkQm6mOwHoup/1 p0YuhOpsxMihkLwuZWL2bYKhd4Jg29fT4sXgjdDSYyqyuxvSowr+CI/EhuYzuuHr fiw4YDM8mCNRjhd6Z10IwbpdUujoL5hNTrmXSqHZGaCfvyxK5Bjwl9DNyXc7k9Pt seryw/hJwTIsCBnmjFZ4XlgLpKNTCIK7TPNsrAJ50UOkXRVBBeEGuUg+rIQe+07T 0bja5MAHA9YgDofvSY4HFl3EYpo6hQy69QrO0bY6gwJ9VPkYxmRwZCELiV2fQsM= =Sebf
-----END PGP SIGNATURE-----

#8 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · On Fri, 10 Feb 2012 16:10:09 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Neil,
Do you think it will make sense to try to replicate using loop devices?

It certainly won't hurt. It might not achieve anything though. Give it a try ... it you manage to reproduce, let me know.

Thanks,
NeilBrown
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIVAwUBTzg4Hznsnt1WYoG5AQL7MxAAsEdQAyZXIVb8KbvD2RWrbiLIZ7n5zhI4 mUtmMl1OUgVhgWBt6QLBKDDC9RXoQY35607w6sU0GuN4i2FJ7KHhdElxOLziQZAN G906w7LLAWU4r6Q+OS3MC4hkFwM8NK4Gp0xEPzpTnH8Nlr30TzRzreZQT1MplTkb 0ak5OD+8iXzGZhNT61sJyGhRU7K3aTp688+CKdd5EHsc22Nl+6eGonYjBZ6TYzVX 9XeBAxqP55kvgNPwahHWYZUo3dCjuXZMg5SvohT32tyn0YOxXoMLIRLwup8lXLFP vLw1v/B/zgvE0dkikt661OP0d5ACnKpMN31sRVPB3yebM1wAO572MqN4KsbCUI8U dIbCrK2sjhNCY0aDCp+kMqBqWeW9cijmPuOiaqHyOWjfBoq2fHwZPbtv5EwUiA4c AmeXFgXwlex+tZlzNWP+BXfgnk+STxEnQMsYhHpfzb5pf+ld0j6BtGiFJKjBONJ1 Ejy834ZA6y0uRi2rdtGmGOk54KGXru04U4/PKEhL1hV6sBz25/QcpfmonvQ2/y9L SJjMC9Tjuoqgg0wkfcMAYxA+WV4nU1GRNdYYP1gy8cXtMS71CzxrKV+ZY4ZKEtbJ sbQRbZCJ60qC/p+99GsmTUlCTKBOZE1PMvyEFHMUeQEYtOK2/M4B1oNASb49hEiS UikqPpCscOg=
=p/dp
-----END PGP SIGNATURE-----

#9 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,
Here is the result, I think I managed to reproduce it as it has converted the raid0 to raid4.

so commands in sequence:

mdadm --verbose --create /dev/md/mdtest --level=0 --raid-devices=2 --metadata=1.2 /dev/loop0 /dev/loop1
mdadm: chunk size defaults to 512K
mdadm: array /dev/md/mdtest started.

strace -o /tmp/foo -f mdadm --grow /dev/md/mdtest --raid-devices=3 --add /dev/loop2
mdadm: level of /dev/md/mdtest changed to raid4
mdadm: /dev/loop2 not large enough to join array
mdadm: Need to backup 3072K of critical section..
mdadm: /dev/md/mdtest: Cannot grow - need a spare or backup-file to backup critical section
mdadm: aborting level change

The 3 devices are equal sizes, all 200MB in size:

- -rw-r--r--  1 root     root     209715200 Feb 14 11:28 raid_device1.loopback
- -rw-r--r--  1 root     root     209715200 Feb 14 11:28 raid_device2.loopback
- -rw-r--r--  1 root     root     209715200 Feb 14 11:17 raid_device3.loopback

Output of mdadm -E :

http://pastebin.com/WBhgP4L5

Contents of /tmp/foo:

http://pastebin.com/jcietEaa

Let me know if you need any more information to debug this.

Thanks,
- -Nik

Quoted 6 lines · NeilBrown
Quoted 2 lines · On Fri, 10 Feb 2012 16:10:09 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines
Quoted 2 lines

Hi Neil,
Do you think it will make sense to try to replicate using loop devices?

It certainly won't hurt. It might not achieve anything though. Give it a try ... it you manage to reproduce, let me know.

Thanks,
NeilBrown

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPOizCAAoJEDFLYVOGGjgXylEIAK0JwigUO+E+L0GqdlYoU/N8 5zdEBZ+0yu0VjsyKPAhOTz5g9348lNRPFyuQkOlGoDm3T06WxAbgo/Hh1kS2Q4IT sWjw2w9NQI6qE0sRJPZS7Xie57M/dLVvNGUcLGvYCYTqXZQlAZbMf0tr8BCg8A6F ddkvagi+QPyQg9NQultRhHwt10Ed6D2J1NFbnpoytoJy+27lwGfom1hmGKdtLVZG 2ZRoGtzk2yhomF8qgY4xujClZSaF7HaZc1eJ0FDDoUvQfEHEtjImSd/BbwAiUpsH zv8aNn2Gik5v1RAHq8eOCg148J/XY/4RVD05zKj7fQqnphiwZGdirSKWv9YQCN0= =VwH2
-----END PGP SIGNATURE-----

#10 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 13 lines · On Tue, 14 Feb 2012 11:43:30 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,
Here is the result, I think I managed to reproduce it as it has converted the raid0 to raid4.

so commands in sequence:

mdadm --verbose --create /dev/md/mdtest --level=0 --raid-devices=2 --metadata=1.2 /dev/loop0 /dev/loop1
mdadm: chunk size defaults to 512K
mdadm: array /dev/md/mdtest started.

Quoted 7 lines

strace -o /tmp/foo -f mdadm --grow /dev/md/mdtest --raid-devices=3 --add /dev/loop2
mdadm: level of /dev/md/mdtest changed to raid4
mdadm: /dev/loop2 not large enough to join array
mdadm: Need to backup 3072K of critical section..
mdadm: /dev/md/mdtest: Cannot grow - need a spare or backup-file to backup critical section
mdadm: aborting level change

I tried exactly that and it worked perfectly.
Maybe the bug has been fixed.
Please remind me exactly which versions of mdadm and linux you are using.

Thanks,
NeilBrown

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIVAwUBTzyoeTnsnt1WYoG5AQIHRA//f5pof7kxIEqOU32X0G0ngzWraHoVDFrY kVYptqvXsiQi2gUzkOoSIvd3jp/oFDnl4VEIAXiq1MmxVHw4URZWFUmkuFlNezmm NVwfW194Cjn0lfBVWg5+tp6zMjtZKhgpv2B8eLlzcd0/EQ+tBXTeMMS/aLufWIl/ oZI60t6Thhgki+ZViWoU+R3/X2qqvlfS4+1NtbHLOf0YhQdH16w3M2F5V5tIwbgI 3YKtt/5gUl652TBd5Jt6tVwF8Prn2DFrRbTdBfNOSLUd9vALezf3TswCtKnjsL1T uTS7v6ANhVlitdLg5jbkt69qZIHxI+kCkafNkTSmeZVi3BiePHIwfnF5RVg6tml3 W8jF1+S5yzw28htS1nr9kKt9aShaZj7A/tkE/BjpXRKySKdFk6jI1jYp0E+hsjUb 39D72wEXAVsjOvleAfip97CKktFH4cqtm5xWsnHWjggwVvjDw4pbYardq+8znwun MCOAPxuQDAmI5HVl3ZXoEue6w6UZDBpvt9s09Vuh6x+jWK8xgZOWIe+afovbSvP5 3yL6tFOCrb6VROwCEOtD2MTTd52KWGCwrH8lbMD7q3C1c4ou61EOUkRLpe68+hjF pSQb0yti8iqjR6LHWsRpeuOnXp2uDQ5z0b6sj7HlWnyCHVBdP4Hr4smAxXqL6ups IHQJ0QqjZqQ=
=MAea
-----END PGP SIGNATURE-----

#11 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
It really might be fixed in recent code, just for consistency:

dpkg -l | grep mdadm
ii mdadm 3.2.3-2 tool to administer Linux MD arrays
(software RAID)

uname -a
Linux hanna64 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux

Cheers,
- -Nik

Quoted 24 lines · NeilBrown
Quoted 13 lines · On Tue, 14 Feb 2012 11:43:30 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Neil,
Here is the result, I think I managed to reproduce it as it has converted the raid0 to raid4.

so commands in sequence:

mdadm --verbose --create /dev/md/mdtest --level=0 --raid-devices=2 --metadata=1.2 /dev/loop0 /dev/loop1
mdadm: chunk size defaults to 512K
mdadm: array /dev/md/mdtest started.

Quoted 6 lines

strace -o /tmp/foo -f mdadm --grow /dev/md/mdtest --raid-devices=3 --add /dev/loop2
mdadm: level of /dev/md/mdtest changed to raid4
mdadm: /dev/loop2 not large enough to join array
mdadm: Need to backup 3072K of critical section..
mdadm: /dev/md/mdtest: Cannot grow - need a spare or backup-file to backup critical section
mdadm: aborting level change

Quoted 8 lines

I tried exactly that and it worked perfectly.
Maybe the bug has been fixed.
Please remind me exactly which versions of mdadm and linux you are using.

Thanks,
NeilBrown

N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±­¨Š{ayºʇڙë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝ¢j"ú!tml= -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPPSMMAAoJEDFLYVOGGjgXKWgH/3W4VqM65Dq4j0XIpyDUYi2B ATFvVtzmBfiXvNnVBDdP953OK5bBrdcfXUbqYcRUOnzIPEcnxycWxtAe4qO/+OT5 ZJVajCD5JT8dD/xpSbW+bqi9CHo1kRzCfQmI9GydIYykfN6qjS7jfJqH4Jp6Au/w 2UFE0ZyZvB9pVrORdUCCZ7r0Zj2ctofqhxAG1Rip1ZZXtpuSHayIib5gUBx2S/JB FQPElqbaEureoDzG5fSg3IMBB7Sc37AjxzxbWkvYd1mBe2e9v4GHnsjv+wEukR95 e5VMr1NZ31AUzeQJR9YQW0NEjE/x/dar9+3jTXwZ1J2Z/1j08lsx9yL4kum3KDQ= =gOyk
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · On Thu, 16 Feb 2012 17:38:52 +0200 Nikolay Kichukov <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
It really might be fixed in recent code, just for consistency:

Quoted 7 lines

dpkg -l | grep mdadm
ii mdadm 3.2.3-2 tool to administer Linux MD arrays
(software RAID)

uname -a
Linux hanna64 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux

Odd.. I cannot find any changes since then that would fix the problem.

The main problem is that mdadm decides that /dev/loop2 is too small. The size that it wants it to be that it extracts from the array looks correct. I cannot see from the trace what size it thinks /dev/loop2 is, but presumably it is the same as raid_device3.loopback, which is definitely big enough.

As I said .. odd.

NeilBrown
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIVAwUBT0HZdjnsnt1WYoG5AQIZuxAAr2J8b7g3L2V/mBbqxAURqS+fQ5vmNEyC /5aVajff4nsbufHHbizhoWUP9RZ3zXpAvIJnpnwhT9Lj3ebnSIRVximJqKIhm7ki WsmZdzIyK9w438LjzQaX6+ChwWTR2O+YvvxILmC5i34KoqSGqsI7ID1g1eNL2Nyk eEPxYoN3vQxWGMRYM3bu8U0aDJBcDvYVIY+cdARS1lYi8j3ZW+NoWkj5itxq9cHx HVx/5q7QNG8vQ/E6QepcehKChD6K+46iTeAlqFs3bTTy18teffRvsy7KGNQKHEOu J+52iTi5FcPkD5iHFmYTZCaXVtJI02zh/qfNWhHfdygZ9Kfy3be/Gh92dohAw50s FJseCAoaqAZa02fMqRf0NUBd6daCKTMNkW6fNOTe+z9+hhj6dXc13eYZUl4xCdvu DYCKIf6lxcatu/19Pmf5YcMN8LxSZnPEoAV7J3JSqKxaVRRXY3OauN89fjtcKZqE xR6SsoNnFclDYL44+X0wWmbqVHn8t+cZUTxeGfB4Nuy9nEA8pN6RuwcUicwCN3V4 HUgoWZjV1J09q7Jn0Wk34Mf1LBQYEeR0b69P6RNsY21xuxRp2HhjA/k+NxyWfpBb j2R5SWEXj+ClMjkrgZHy/iyoqgecbEdFPAr7C/sflul+rTtPhUiJjFkmWIYqKNDm FH7y2vB5AKE=
=hlIm
-----END PGP SIGNATURE-----