I have my opensuse 11.1 on a RAID-1. One of the disks failed but I couldn’t find a drive of the same size.
The 40GB disks I had were partitioned into /boot, / and /swap with / being about 35GB.
The new drive is 160GB. What should the partition table of my new 160GB disk be so I can replace the failed drive?
If I make it exactly match the partition table of the drive it is replacing I will be wasting ~120GB. Eventually the other 40GB drive will fail and I’d like to replace it with another 160GB disk and grow the raid to the max size.
Will mdadm be able to make a RAID-1 from a 35GB partition and a 120GB partition (obviously limited in size to the smallest partition) ?
It will work fine. Since you can only assemble equal size partitions, you will have unused space on the larger disk. You can format that as a non-RAID partition.
If you replacing a failed disk, yes, but actually it’s not that strict. The partitions can be in a different order on the other disk, e.g. you could assemble sda1 + sdb2 and sda2 with sdb3, as long as the sizes match. But you would have to go editing the RAID array descriptors to do this.
When the array was assembled by the installer, all you had to do was pair up equal sized partitions, there was no stipluation that sda1 had to go with sdb1, and so forth.
You can format and use the extra space on the larger disk as a single partition, it won’t disrupt RAID assembly.