Results 1 to 4 of 4

Thread: Need to replace RAID disk but different size

  1. #1

    Default Need to replace RAID disk but different size

    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) ?

    Many thanks

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Need to replace RAID disk but different size

    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.

  3. #3

    Default Re: Need to replace RAID disk but different size

    So yuo are saying that the partition tables must match (with an extra unused, unformatted partition on the larger disk)?

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Need to replace RAID disk but different size

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •