Linux NAS with raid question

cjs06

n00b
Joined
Apr 15, 2009
Messages
12
I have a NAS with 3 TB hard drives hooked up and plenty of sata ports for growth. The OS is installed on a separate hard drive. I currently have it setup with Ubuntu Server 9.04 and I have mdadm installed along with Webmin.

The three hard drives are in raid 5 with a 128kb chunk size and i have it formatted in ext3. My question is can I extend the raid if I add a fourth TB hard drive and also extend the ext3 partition the raid is formatted in without loosing data?

I am aware that LVM allows me to easily extend the VG and also the LV if i add another hard drive but I want redundancy; or mabey redundancy is overrated for a NAS?

Any help would be appreciated as Hardforums is the place to go for storage help;).
 
Its pretty easy to add drives to a mdadm raid 5 array.

To add a drive to the array use the following command, but change sdf1 to the drive you want to add:
Code:
sudo mdadm --add /dev/md0 /dev/sdf1
Now you grow the array:
Code:
sudo mdadm --grow /dev/md0 --raid-disks=4
You can watch the progress with:
Code:
watch cat /proc/mdstat
Finally, when its done growing the array you expand the partition to make use of the new space:
Code:
sudo resize2fs /dev/md0
Enjoy
 
Back
Top