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'm currently building an NAS. I have 2 3TB hard disks. Is it possible to software RAID these two if they hold the operating system? Or do I need a separate OS disk? If yes, could I just use an USB Stick for that? Cause a 40€ 1TB hard disks IMHO is overkill just for a small Debian installation.

share|improve this question

1 Answer 1

It's surely possible. RAID1 has the added advantage that even if GRUB doesn't know it exists, it can read one half of the mirror and boot the system like that - once it hands over to your initramfs mdadm should take over, assemble the array, and then the kernel can really kick in.

You'll want to look at mdadm - it's in the repos, so apt-get will work for that, and the debian kernel will handle it happily. You'll need a liveCD, but first install mdadm into your OS and then boot from the CD so you can build the array, let it sync the data to the other half of the mirror, update your fstab accordingly (you'll most likely now have / on /dev/md0) and that should be all but for a reboot.

GRUB2 does come with a raid module you can tell it to load and boot the root from the md device, which might make more sense for a long-term solution.

It's also possible to run the OS from a USB stick, though it might be quite slow.

share|improve this answer
    
I'll just summarize to ensure I got it right: 1. Install debian on HD1 2. apt-get mdadm 3. Configure array 4. update fstab 5. Configure GRUB2 to boot directly from the md device I'm not sure what I need the LiveCD for though. –  John Smith Nov 10 '12 at 21:04
    
Sorry linebreaks somehow don't seem to work. I just added two spaces at the end like the help told me. –  John Smith Nov 10 '12 at 21:09
    
Something like; 1: Boot from debian install CD; 2: Get to the "partition disks" setup step; 3: Create partitions on each drive and in the "Use as" menu select "Physical Volume for RAID"; 4: This will bring up another option up top called "Set up RAID" (or similar) where you can create your array; 5: Carry on installing as normal. The updating fstab part was assuming you already had Debian installed - installing it fresh like that is easier. –  Xyon Nov 10 '12 at 21:24

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.