1

I'm moving my VG to a RAID, i have 3 disk 600GB, the VG is in the partition /dev/sdc2

/dev/sdc1 1G type linux <-- Boot partition
/dev/sdc2 599G type Linux LVM

One disk have the VG and with the others two i've created the RAID5

mdadm --create /dev/md0 --level=5 raid-devices=3 /dev/sdb1 /dev/sdd1 missing
pvcreate /dev/md0
vgextend VG_name /dev/md0
pvmove /dev/sdc2
vgreduce VG_name /dev/sdc2
pvremove /dev/sdc2

later I format the /dev/sdc2 to type 'Linux raid autodetect' for add to the RAID but now i get

mdadm: /dev/sdc2 not large enough to join array

certainly completely forget the boot partition on device /dev/sdc

How can solve for add /dev/sdc2 to the RAID. i think i need resize the partitions /dev/sdb1 and /dev/sdd1 but i dont know how

4
  • 1
    In theory, this can be done (see this guide). In practice, I would never even try but move my data out of the way and start over. A lot less stress, especially as your situation is even more complicated due to the LVM on top the RAID device.
    – Sven
    Commented May 28, 2013 at 18:08
  • 1
    In my experience, working with live data is quite stressful. Backup, resize, and recover = peace of mind
    – Ravi
    Commented May 28, 2013 at 20:14
  • 2
    Add sdc2 back to VG, Move LVs sdc2. Remove the MD device from the VG. Re-create MD with the correct partition sizes. Leave enough space for the boot partition to exist on every drive. Repeat your earlier procedure to migrate back to the RAID.
    – Zoredache
    Commented May 28, 2013 at 22:26
  • @Ravi has reason is stressful but i can't stop the system. i'll try a some like Zoredache comment
    – rkmax
    Commented May 29, 2013 at 2:36

0

You must log in to answer this question.

Browse other questions tagged .