Skip to contentSkip to conversation

Followup: Adding a device to an active RAID1 array

DISCUSSION Bill Cizek 2 participants 2 messages Jan 20, 2006 – Jan 24, 2006 MD RAID

lore
Share & tools
lore

Bill Cizek

author
#0 lore raw
Quoted 20 lines · Neil Brown
Quoted 4 lines · On Wednesday January 18, [email protected] wrote:

Hi,

Are there any known issues with changing the number of active devices in a RAID1 array?

There is now, thanks.

Quoted 10 lines

I'm trying to add a third mirror to an existing RAID1 array of two disks.

I have /dev/md5 as a mirrored pair of two 40 GB disks. Directly on top of it is a 40 GB XFS filesystem.

When I do "mdadm --grow /dev/md5 -n 3" the count of devices changes from 2 to 3, as expected.
If the XFS filesystem is mounted, the array size changes to 3.0 GB. If it is not mounted everything works fine.

Quoted 9 lines
Quoted 3 lines

Is this supposed to work, is it required that the array be inactive to add a disk, or am I just doing
something stupid?

It is supposed to work, it doesn't, but it is the code doing something stupid, not you.
Try the patch below.

[snip]

The patch you gave me worked, Neil, but the I ran into an odd problem where the change is lost after a reboot.

I have raid1 devices for both superblocks 0.90.? and 1.0
If I update the superblock 1.0 device, mdadm --detail shows the update, but if I reboot it is lost. As well, evms complains about a mismatch between the kernel and disk (this is how I first noticed it). Superblock 0.90 works fine.

i.e. Starting with /dev/md4, superblock 1.0 with 2 devices:

mdadm --detail /dev/md4 shows

Raid Devices : 2
Active Devices : 2

I do "mdadm --grow /dev/md4 -n3"

mdadm --detail /dev/md4 shows

Raid Devices : 3
Active Devices : 2

I reboot....

mdadm --detail /dev/md4 shows

Raid Devices : 2
Active Devices : 2

Hope this makes sense.

Thanks,
-Bill

#1 lore raw
Quoted 7 lines · On Thursday January 19, [email protected] wrote:

The patch you gave me worked, Neil, but the I ran into an odd problem where
the change is lost after a reboot.

I have raid1 devices for both superblocks 0.90.? and 1.0
If I update the superblock 1.0 device, mdadm --detail shows the update, but if I reboot it is lost.

Thanks for the report. I've just sent of a patch which fixes the problem... you should see it go past on linux-raid.

NeilBrown