LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Growing RAID5 without back up data? (https://www.linuxquestions.org/questions/fedora-35/growing-raid5-without-back-up-data-862772/)

sumasage 02-15-2011 02:30 AM

Growing RAID5 without back up data?
 
I am trying to build a media server for my home and still in the process of evaluating my OS options (Ubuntu Server, Fedora Core, or Win Server). I am planning to use four 1TB drives initially for the RAID5 array. Once it fill up i will add more 1TB drives.

My question is can Fedora Core create a RAID5 array and grow latter without having to back up data to external hard drive and re-create the array? I am looking for something that is easy to use and manage. If Fedora Core doesnt have this option, can you recommend other distributions that can do this?

Thanks.

macemoneta 02-15-2011 01:59 PM

Growing a software RAID is more a function of having current tools, rather than a specific distribution. This is the process on most any recent distro:

Code:

For example, going from 3-disk RAID5 to 4 disks:

umount /dev/mdX
#Unmount the array

mdadm --add /dev/mdX /dev/sde
#Add the new drive as a hot spare

mdadm /dev/mdX --grow --raid-disks=4
#Add the new hot spare as a md device

mdadm -D /dev/mdX | grep Reshape
#To watch the status (this can take a long time, don't continue until this finishes)

e2fsck -f /dev/mdX
#Before we resize the partition, we need to check for errors

resize2fs /dev/mdX
#To resize the partitions.

mount /dev/mdX /some/path
#Mount the partition and use as normal

Update the configuration file so it builds properly on restart. For example:

Code:

DEVICE /dev/sd[bcd]
ARRAY /dev/mdX level=raid5 num-devices=3 metadata=0.90 UUID=xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx

Becomes:

Code:

DEVICE /dev/sd[bcde]
ARRAY /dev/mdX level=raid5 num-devices=4 metadata=0.90 UUID=xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx


sumasage 02-16-2011 02:08 AM

Thanks! I will try it out.


All times are GMT -5. The time now is 09:22 PM.