Managing Disk Space with LVM
Subject:   Alternate RAID-1 migration
Date:   2006-04-30 19:04:48
From:   jrzagar
Instead of ending up with four raid-1 devices, wouldn't it be easier to do the following?

Use mdadm to mark one drive of each of the RAID 1 mirrors as failed, and then remove them:

# mdadm --manage /dev/md0 --fail /dev/sda1
# mdadm --manage /dev/md0 --remove /dev/sda1
# mdadm --manage /dev/md0 --fail /dev/sdc1
# mdadm --manage /dev/md0 --remove /dev/sdc1

Pull out the sda and sdc hard drives and replace them with two of the new 800G drives. Create 800G partitions on each drive and create md2:

# fdisk /dev/sda
# fdisk /dev/sdc
# mdadm --create /dev/md2 --level=1 \
--raid-devices=2 /dev/sd[ac]1--add /dev/sda1

Once you've activated the array, you can extend the volume group, move the logical volumes to the new drives, and remove the old raid arrays from the volume group:

# vgextend datavg /dev/md2
# pvmove /dev/md0 /dev/md2
# vgreduce datavg /dev/md0
# pvmove /dev/md1 /dev/md2
# vgreduce datavg /dev/md1

Now you can replace the hard drives for md[01], delete md0, recreate md1 with the second pair of 800G drives, and add the new md1 to datavg.

1 to 2 of 2
  1. Alternate RAID-1 migration
    2006-04-30 23:37:05  bryceharrington [View]

    • Alternate RAID-1 migration
      2006-05-11 14:40:36  gr34t [View]

    • Alternate RAID-1 migration
      2006-05-02 05:43:19  Tormak [View]

  2. Alternate RAID-1 migration
    2006-04-30 19:45:07  keescook [View]

1 to 2 of 2