1

I have a RHEL 6.5 box in which I have recently added two partitions to the a raid 1. It took the the disks without any incidents but I am not able to resize the raid itself. The output of cat /proc/mdstat is:

md0 : active raid1 sdc1[2] sde1[4] sdd1[3] sda1[0] sdb1[1]
      102388 blocks super 1.0 [5/5] [UUUUU]

Doing mdmadm --detail /dev/md0 gives:

/dev/md0: Version : 1.0 Creation Time : Wed Sep 7 11:53:07 2011 Raid Level : raid1 Array Size : 102388 (100.01 MiB 104.85 MB) Used Dev Size : 102388 (100.01 MiB 104.85 MB) Raid Devices : 5 Total Devices : 5 Persistence : Superblock is persistent

Update Time : Tue Feb  4 09:08:51 2014
      State : clean   Active Devices : 5 Working Devices : 5  Failed Devices : 0   Spare Devices : 0

       Name : ...
       UUID : 8be07299:879eb666:ac4b1cde:3c2d9b97
     Events : 424

Number   Major   Minor   RaidDevice State
   0       8        1        0      active sync   /dev/sda1
   1       8       17        1      active sync   /dev/sdb1
   2       8       33        2      active sync   /dev/sdc1
   4       8       65        3      active sync   /dev/sde1
   3       8       49        4      active sync   /dev/sdd1

So it seems to me that all 4 disks are mirrors. When I try to resize the array I get:

# mdadm --grow /dev/md0 --size=max

mdadm: component size of /dev/md0 unchanged at 102388K

How can I get this array to grow?

0

You cannot add partitions to a RAID1 and grow it. What happens is exactly what you describe; it added them as mirrors.

to grow the array, and when not using LVM (logical volume management), you need to grow the underlying partitions and then grow the array. This is most commonly done by removing a device from the array (set faulty with mdadm, then remove), repartitioning it, adding it back, waiting for resync, then doing it with the other. Then, you can use mdadm to grow it. The tricky part, though, is that with the new mdadm superblock, you can't just regrow the array any more. See this question of mine.

If you do have LVM and your original RAID partition is a physical device of your volume group, you can create a new RAID1 array with your new drives/partitions, make it into a physical device for LVM with pvcreate and then add it to the volume group. You can then use lvresize to resize the actual volume. There are plenty of howto's on the internet that tell you how, exactly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.