Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Debian Squeeze in a RAID 1 on 2 physical 2 TB disks. Is it possible in the future to add two physical disks and extend the RAID 1?

share|improve this question
    
How do you want to extend the RAID 1? More drives as redundend mirrors (but not more useble disk space). An independend second mirror pair? Changing to a 4 disk RAID 5 for more capacity and still some redundancy? .... –  Hennes Feb 18 '13 at 19:33
    
in order to have 2x2Tb in mirror with 2x2Tb –  user62025 Feb 18 '13 at 22:21
add comment

2 Answers

up vote 0 down vote accepted

UPDATED

I've removed the md-based instructions. They didn't take into account the striping issues of RAID0 and may have led to data loss. The LVM solution listed below is better anyway.


If you're using LVM, this is a lot easier. The process is similar, but you use LVM to span the two RAID1s. Follow this tutorial:

share|improve this answer
    
when you say "create a raid0 from my original raid1", that means data will be erased ? –  user62025 Feb 19 '13 at 12:54
    
I don't think it will erase any data, but now that I think about it, you probably don't want to do that because of the default way that data is striped. Better to follow the LVM method mentioned at the end of the answer. –  hrunting Feb 20 '13 at 1:45
add comment

Using LVM would indeed be the easiest way. Even if you don't use LVM yet you may consider using it with the new disks. That means that you cannot transparently increase the size of your current volume but have to use mount points for space extension.

Having four disks you can do both RAID-0 and RAID-1 simultaneously (if all are the same size or you are willing to do without some of the capacity). But using RAID-0 requires copying your data.

Without RAID-0 and without LVM you can to this: You create a second RAID-1 with the new disks. If the old RAID is md0 and the new one is md1 then you can create a combined device:

mdadm --create /dev/md2 --level=linear /dev/md0 /dev/md1

Not a general problem but I don't know whether the boot scripts are clever enough to get that done. If you don't use your whole disks for your RAID-1 but single partitions in them (e.g. md0 for /boot, md1 for / and md2 for data) then it's not problem as you can use your own boot script to set up your "two level RAID" if necessary.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.