Skip to main content

Thread: Convert system to RAID5


hello,

update post specifics work through process, , respond comments have questions have not solved.

i'll try make short possible. end goal have system using raid5, made current system has multiple partitions.

current setup:
  • 2tb drive
    • swap partition - 2gb
    • / partition - 20gb
    • /home partition - rest
  • 750gb drive
    • swap partition - 2gb
    • /home/myuser/xtradata partition - rest


acquired 3 more of same 2tb disk have. end system 4 identically partitioned disks, each 1 this:
  • swap partition - 2gb
  • raid1 - /boot - 1gb
  • raid5 - / - rest


raid1 partition 4 disk raid1 (i know writes slower, /boot partition, , want disks "swapppable" same mbr can pull damaged disk , run in degraded mode, if necessary)

so, lay out plan current holes , questions. here goes:
  1. partition 3 empty 2tb disks layout above
  2. create raid1 , raid5 arrays in "degraded" mode using
    code:
    mdadm --create --verbose /dev/md1 --level=5 --chunk=32 --raid-devices=4 missing /dev/sdb3 /dev/sdc3 /dev/sdd3
    (i used webmin raid interface create raid1 array because couldn't figure out how set "persistent superblock" option mdadm, although think specifying version 0.9 superblock...)
  3. format drives using
    code:
    sudo mkfs.ext4 -e stride=8,stripe-width=32 /dev/md1 sudo mkfs.ext4 /dev/md0
  4. copy boot data new boot partition using
    code:
    rsync -avxhaxs --delete --progress /boot /mnt/newraid1/
  5. copy rest of data new root partition using
    code:
    rsync -avxhaxs --delete --progress / /mnt/newraid5/
  6. remove boot new root partition (rm -r /mnt/newraid5/boot/*)
  7. update /etc/fstab on new raid5 mount newraid1 /boot , newraid5 /
  8. ???
  9. remove primary disk , verify function 3 disks in "degraded mode"
  10. copy "extradata" stuff on new array
  11. test system functions thoroughly
  12. partition primary disk same other 3
  13. add 4th disk arrays , update fstab use 4th swap, too


??? represents these questions:
how update grub use these partitions appropriately?
how write grub disks (using installer cd? don't think has mdadm on it...)?
how copy mbr each of disks? (i guess "update-grub" each of 4 disks, right?)

also, if has suggestions or pointers on how can make better, love hear them.

thanks!

--mobrien118

ok, finished this! , made major changes in direction, here procedure. if admin move tutorials/howtos folder, maybe helpful. how 1 request that?

anyway, discovered can boot raid5 array grub2, decided change partitioning scheme this:

  • raid5 - swap - 2gb
  • raid5 - / - 10gb
  • raid5 - {mirror of /} - 10gb
  • raid5 - /home - rest


structurally mimics current partitioning scheme.

here process:
  1. partition 3 empty 2tb disks layout above
  2. create raid5 arrays in "degraded" mode using
    code:
    mdadm --create --verbose /dev/mdy --level=5 --chunk=32 --raid-devices=4 missing /dev/sdbx /dev/sdcx /dev/sddx
    *y=0,1,2 , 3 , x=1,2,3 , 4
  3. format swap using
    code:
    mkswap /dev/md0
  4. format drives using
    code:
    sudo mkfs.ext4 -e stride=8,stripe-width=32 /dev/mdx
    *x=1,2 , 3
  5. mount last raid array using
    code:
    sudo mkdir /mnt/newraid1  sudo mount /dev/md3 /mnt/newraid1/
  6. copy /home data new boot partition using
    code:
    rsync -avxhaxs --delete --progress /home/ /mnt/newraid1/
  7. boot alternative livecd, tell assemble raid arrays (but don't set shell root) , start shell
  8. mount original root (sdb2) , new root (md1) *it wasn't md1 @ point. had find using ls -l /dev/disk/by-uuid/
  9. copy old root new root using
    code:
    cp -a /media/sdb2/* /media/md1/
  10. mount home partition should using
    code:
    mount /dev/md3 /media/md1/home
  11. chroot *new* filesystem using
    code:
    mount -o bind /proc /mount/point/proc  mount -o bind /dev /media/md1/dev  mount -o bind /dev/pts /media/md1/dev/pts  mount -o bind /sys /media/md1/sys   cp /etc/resolv.conf /media/md1/etc/resolv.conf  chroot /media/md1
  12. update grub on *new* disks using
    code:
    mv /boot/grub/device.map /boot/grub/device.map.old  grub-mkdevicemap  update-grub2  grub-install /dev/sdc  grub-install /dev/sdd  grub-install /dev/sde
  13. shutdown , remove old primary disk system
  14. boot new system
  15. mount old "extra data" partition
  16. copy data old "extra data" partition, since wasn't copied on in rsync of /home using
    code:
    sudo rsync -avxhaxs --delete --progress /media/oldxtrapart/ /home/me/xtradata/
  17. test system functions thoroughly
  18. partition primary disk same other 3 (i copied mbr using "dd if=/dev/sdb of=/dev/sda bs=512 count=1. requires reboot)
  19. add 4th disk partitions arrays (i did using webmin, can done using palimpsest or, of course, mdadm command line)
  20. wait until 4th disk starts rebuilsding , *reboot* (because grub needs system have been booted current disk configuration, wouldn't work before rebooting)
  21. repeat grub-install process above, using /dev/sda (or whatever now)


has system running nicely. read speeds on first partition on 400 mb/s , @ end of 4th partition, i'm getting 200 mb/s, @ beginning of partition @ 330 , has round downward slope.

woohoo!

--mobrien118


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Convert system to RAID5


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account