Monday, April 29, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 8795  / 3 Years ago, tue, september 7, 2021, 3:10:32

I have a machine with 3 identical disks. I performed a clean installation of ubuntu 12.10 on one disk.



How can I convert the running system to boot off a (software) raid5 comprised of all three disks (one of these is in use running the system)?



Is it possible to start a raid 5 md device in degraded mode using 2 disks(disks 2&3), copy the data over from disk1, boot of of 2&3 (raided 5) and then add disk1 into the md device and let them resync? If possible, how would I got about doing this? what are the steps I need to perform? and if possible, do you know of a tutorial I can follow?



[I know something similar is possible if you want to boot off of a RAID 1, you started a degraded device and add the first disk later]



Thanks.


More From » installation

 Answers
5

Try this:




  1. Make a backup.

  2. Test the backup.

  3. If needed, install mdadm

  4. Create a RAID 5 array with mdadm --create --level=5 missing /dev/sdb1 /dev/sdc1
    Adjust drives or partitions as needed.

  5. Format the new array (mkfs -t ext2 /dev/mdx).

  6. Copy all data to the new array. rsync -av --exclude-from=excludefile /source/ /destination/ might come in handy since you do not want to copy /dev/ :)

  7. Setup your bootloaded (grub2?) to boot from the new array.

  8. Reboot and test.

  9. Add the old drive to the degraded array. This will fail if you have the drive in use at the time of adding. (So make sure it is not mounted from step 6, or reboot to a liveCD).


[#32775] Wednesday, September 8, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lishrag

Total Points: 306
Total Questions: 109
Total Answers: 125

Location: Saint Lucia
Member since Wed, Feb 8, 2023
1 Year ago
;