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 am currently building a RAID-5 with three 2TB HDDs on Debian. I am wondering how I could configure my RAID to be encrypted and expandable in the future. I do not need nor want partitions, but must I use LVM to be able to resize the filesystem? Or do I need it (LVM) for the encryption? If so, between which layers?

Disks > RAID > (LVM?) > Encryption > (LVM?) > Filesystem (JFS)

Also, for the encryption, I was wondering if I should use dm-crypt, dm-crypt with LUKS, or loop-AES. Do you have suggestions?

Thanks for your time,

William

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

RAID 5? Do you hate your data that much?

OK, now that I've gotten that out of the way...

The RAID array will appear to the OS as a single disk, and that's how you'll treat it.

By default, pretty much everybody layers it this way, and the OS installer will too if you set it up during installation:

Filesystem
LVM volume(s)
Encryption
Disk

As for what to use, dm-crypt/LUKS is also what the proverbial everyone uses; it's bog standard. Loop-AES is much less common since it runs in user space.

Using these choices also guarantees that the OS will properly prompt you for the passphrase at startup. (If you have an existing system, you may need to rerun dracut after setting up the disk...)

share|improve this answer
    
So then I'll put LVM after the encryption. I was asking that since the OS is already installed, so I must setup the RAID manually. Now I just need to choose whether I use LUKS or not with dm-crypt. Thanks for the heads up about data corruption, I just ordered another drive to transform it into RAID-6. –  William Aug 11 '12 at 3:03
    
All the existing init scripts, initial ramdisk, etc., will be expecting LUKS, so if you want a less painful boot process, best to use it. :) –  Michael Hampton Aug 11 '12 at 3:07
    
Ok. Thanks a lot for your help. You answered in minutes questions that puzzled me for weeks! –  William Aug 11 '12 at 3:18
    
If you use 4 drives(with the new disk added) in RAID 6 then your available disk space will equal that of RAID 10. And the latter will be faster. (R6 will allow up to 2 drive failures though. With R10 it depends on which disks fail). - And neither is a replacement for backups. (think theft, fire, PSU failure etc) –  Hennes Aug 11 '12 at 6:13
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.