Bug 368704 - mdadm can't hot-add devices larger than 4TB
Summary: mdadm can't hot-add devices larger than 4TB
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: x86-64 openSUSE 10.3
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Michal Marek
QA Contact: E-mail List
URL:
Whiteboard:
Keywords: NTS_Public
Depends on:
Blocks:
 
Reported: 2008-03-10 14:51 UTC by Lars Täuber
Modified: 2008-07-31 16:16 UTC (History)
3 users (show)

See Also:
Found By: Third Party Developer/Partner
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Patch to fix (2.37 KB, patch)
2008-03-27 05:06 UTC, Neil Brown
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Täuber 2008-03-10 14:51:48 UTC
Hallo,

there is a serious bug in mdadm version 2.6.2 that is said to be fixed by the main developper:

http://marc.info/?l=linux-raid&m=120486150404387&w=2

It prevents an exchanged disk to be put in a RAID1 again. (at least in our huge setup 13TB)

Thanks
Lars
Comment 1 Michal Marek 2008-03-11 08:19:58 UTC
openSUSE 10.3 is released, "blocker" makes little sense here.
Comment 2 Michal Marek 2008-03-11 11:14:52 UTC
Neil, could you please point me to the 2.6.3 fix? I found this in the 2.6.3 changelog: http://neil.brown.name/git?p=mdadm;a=commit;h=005debfc11b4cbe653503667423df98b64e5be0e, but it seems to only affect 1.[12] metadata. Or is it the fix you referred to?

thanks!
Comment 3 Neil Brown 2008-03-13 02:35:37 UTC
That was the patch I was thinking of.
As you say, it does not apply in this case.  It seems I mis-diagnosed the problem.

I now think the problem is that in Manage.c, this code

       if (ldsize/512 < array.size) {
                fprintf(stderr, Name ": %s not large enough to join array\n",
                        dv->devname);
                return 1;
       }

is incorrect because "array.size" is an "int", and ldsize/512 is larger than 2^32.

That will need a big of thought to fix up properly.  I'll try to have something
by early next week.

Comment 4 Neil Brown 2008-03-27 05:06:19 UTC
Created attachment 204181 [details]
Patch to fix

Sorry for the delay.

This patch should fix the problem.
Comment 5 Michal Marek 2008-03-28 12:31:32 UTC
Neil: thanks for the patch!

Lars: can you please try patched mdadm from http://download.opensuse.org/repositories/home:/michal-m:/test/openSUSE_10.3/ ? Thanks.
Comment 6 Michal Marek 2008-03-28 13:58:23 UTC
Adjusting the summary a bit, was "bug in mdadm version v2.6.2 already fixed in v2.6.3".
Comment 7 Michal Marek 2008-03-28 14:23:45 UTC
Lars wrote:

Hallo Michal, hallo Neil

at first attempt i got this:
monosan:~ # rpm -i mdadm-2.6.2-5.1.x86_64.rpm 
warning: mdadm-2.6.2-5.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 48514c1d
        package mdadm-2.6.2-16 (which is newer than mdadm-2.6.2-5.1) is already installed
        file /sbin/mdadm from install of mdadm-2.6.2-5.1 conflicts with file from package mdadm-2.6.2-16
        file /sbin/raidautorun from install of mdadm-2.6.2-5.1 conflicts with file from package mdadm-2.6.2-16


Then I forced:
monosan:~ # rpm --force -i mdadm-2.6.2-5.1.x86_64.rpm 
warning: mdadm-2.6.2-5.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 48514c1d
Updating etc/sysconfig/mdadm...


monosan:~ # mdadm -C /dev/md8 -l 1 -n2 /dev/monosan/test0 /dev/duosan/test1 
mdadm: Defaulting to verion 1.0 metadata
mdadm: array /dev/md8 started.
monosan:~ # mdadm /dev/md8 -f /dev/duosan/test1
mdadm: set /dev/duosan/test1 faulty in /dev/md8
monosan:~ # mdadm /dev/md8 -r /dev/duosan/test1
mdadm: hot removed /dev/duosan/test1
monosan:~ # mdadm /dev/md8 -a /dev/duosan/test1
mdadm: re-added /dev/duosan/test1
monosan:~ # blockdev --getsize /dev/md8
17179868912


So I can confirm that the array can be repaired again with it being bigger than 4TB (actually 8TB).
There still is a small typo left: »mdadm: Defaulting to verion 1.0 metadata«
                                                        ^^^^^^

Thank you and Neil
Best regards.
Lars
Comment 10 Michal Marek 2008-04-03 10:25:16 UTC
Neil, is it OK to use the patch as is for an online update? I'm curious because it isn't yet in your mdadm git repo.

Thanks!
Michal
Comment 11 Christoph Thiel 2008-04-25 08:42:29 UTC
Neil, *ping*?
Comment 12 Neil Brown 2008-04-28 06:32:55 UTC
Sorry, I was away on leave.

I've just push that patch (and others) into my git repo.

Yes, it is safe to use immediately.
Comment 13 Michal Marek 2008-05-09 13:05:50 UTC
Submitted fixed packages for 10.3 and SLES10
Comment 14 Ruediger Oertel 2008-05-21 16:32:49 UTC
patchinfo mentions SLES10
package has been submitted to SLES10-SP2

where should this be fixed ? both ?
Comment 16 Marcus Meissner 2008-05-24 16:18:26 UTC
update released for 10.3
Comment 24 Anja Stock 2008-07-31 16:16:49 UTC
released