LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-22-2009, 04:42 PM   #1
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Rep: Reputation: 16
LUKS on 2TB RAID 5


Hey guys. I'm trying to encrypt a 2TB RAID 5. I run the command:

Code:
cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/md0
After I've entered and confirmed my password, it seems to go for a few moments, and then the whole computer locks up. It cannot be accessed directly or through ssh. My first though was that the drives might be pulling too much power, but I think the entire computer would die. Also, I seem to be able to create and ext4 partition and mount it. My though was that maybe 2TB is too big. Let me know your thoughts guys!

Also, I'm going to let the computer sit and see if anything happens. If after 30 minutes or so, nothing has happened, I'll assume the issue is not that the cpu is maxed et cetera.

EDIT: After waiting, its still locked up... I also tried creating and LVM and then encrypting it... I successfully created the LVM, but the system still locked up...

I should further add that I am using Arch Linux and have loaded dm-crypt and aes-i586 modules.

Last edited by wsduvall; 03-23-2009 at 07:21 AM.
 
Old 03-23-2009, 09:13 AM   #2
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
I have played with mdadm and with cryptsetup, but not with both together.
I don't think that the device-mapper has any size-limit which would get in your way. Same with mdadm.
Might this be some conflict between device-mapper and mdadm. As far as I remember mdadm does not use the device-mapper. Thus there might be a conflict.

I had encrypted LVM, which worked fine.

But of course no setup I had so far was at that scale, and currently I have no way of testing it at the scale you are working at.

Well, I'll try to replicate what you're trying to do in small scale and see if something comes up.

Edit: Here's what I just tested.
I created three image-files with each 100MB size (yeah, it's not much, but that VM just has 900MB of free disk-space) and put them together in a RAID5.
This I formatted and opened with cryptsetup, created an ext4-filesystem and mounted it.
Works fine.

As said, it's small scale, but more or less your setup (although I don't know if you have 3 or more disks in your array).

Which kernel-version do you use? Might there be some bug?

Last edited by reptiler; 03-23-2009 at 09:55 AM.
 
Old 03-23-2009, 04:09 PM   #3
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
reptiler, thanks very much for doing the research. My kernel version is:

Code:
[wsduvall@Uesat crypt]$ cat /proc/version 
Linux version 2.6.28-ARCH (root@T-POWA-LX) (gcc version 4.3.3 (GCC) ) #1 SMP PREEMPT Sun Mar 8 10:18:28 UTC 2009
I have a working RAID0/LVM/LUKS partition on another server, and that size is a bit less then 1TB. So maybe sizes over 1TB (the office size of my RAID5 is 1.82TB, I always round to 2TB)? I temporally created a ext4 fs on the RAID5 and I can write to it et cetera. I'm not sure if anyone out there uses Arch, but I wonder if I should change some hooks in /etc/mkinitcpio.conf and rerun mkinitcpio... I may play around with this more later.
 
Old 03-23-2009, 11:08 PM   #4
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
I just had a little look around and found something, coincidentally on the Arch-bug-tracker, which seems to fit your problem.
http://bugs.archlinux.org/task/11650
Just that the bug still seems to be open. Strangely enough, as it seems that it's related to the Arch-kernel and that everybody except for the Arch-team can build a kernel where it works.
 
Old 03-23-2009, 11:21 PM   #5
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
Wow thanks again. I really don't feel like building a custom kernel, which, under Arch is kinda hard... I wonder if I use a LiveCD with cryptsetup on it, encrypt the array, and then mount it, it will work. If its an Arch specific error solely with creating the arry, then this should work. Anybody know of any LiveCD's with cryptsetup? Gentoo maybe... maybe an older Arch CD... I've gotten it to work in the past on my webserver.

Last edited by wsduvall; 03-23-2009 at 11:26 PM.
 
Old 03-24-2009, 03:10 AM   #6
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
I don't know which LiveCD out there has all the stuff you need.
I have a LiveCD with all that, but the pure LiveCD is not available online I'm afraid.
You could, though, download the full install-CD here, but it's around 400MB, as opposed to the pure LiveCD which only has around 100MB.

I'm sure there must be small CD-images out there that offer what you need (basically a kernel that supports RAID and encrypted devices, and the tools for those), but I'm at a loss at the moment.

If you're not in a rush I could upload the LiveCD for you and give you a link. Otherwise, if your connection isn't so slow, 400MB also won't take a whole day.
 
Old 03-24-2009, 07:46 AM   #7
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
I have pretty good intertoobs here at college, it should only take 10 minutes... Thanks so much. I will post an update when I try this (tonight after class). Thanks so much!
 
Old 03-24-2009, 08:10 AM   #8
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
You're welcome.

If you have any problems with the CD let me know. Everything should work fine though.
 
Old 03-24-2009, 07:33 PM   #9
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
I'm having trouble with both the EasyLFS and the Gentoo LiveCD. EasyLFS doesn't like my RAID, and the Gentoo LiveCD doesn't seem to have the cryptography modules I need. I'm going to try the Ubuntu LiveCD, and then if I still have issues, I'll post them here.

Alright, I can't find any LiveCD's with RAID and LUKS. Gentoo has it, but not the modules I need. Ubuntu's LiveCD doesn't have it mdadm. Maybe I could install it... Next I'm going to try Finnix... anybody got any other recommendations?

Last edited by wsduvall; 03-25-2009 at 12:08 AM.
 
Old 03-25-2009, 12:27 AM   #10
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
What kind of RAID do you have?
Is it a hardware-RAID and the EasyLFS-CD is missing drivers?

As I'm working on a new version I have a CD here with more and later drivers, which might be able to help.
If you know which driver you need I could check if it's there.
 
Old 03-25-2009, 03:04 PM   #11
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
Alright I got it to work! I use the Finnix LiveCD and it was perfect! Thanks again, reptiler!
 
Old 03-25-2009, 11:26 PM   #12
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
You're welcome.

Good to hear you finally found a CD that worked for you.
I guess Arch doesn't have any problem reading your encrypted RAID now that's finally been set up.
 
Old 03-26-2009, 01:22 PM   #13
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
Nope, it works like a charm!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LUKS + RAID + LVM2 and suspend to ram vehn Slackware 3 12-14-2011 07:54 AM
Slackware 12.2 + RAID-1 + LVM + LUKS encrypted root gargamel Slackware 35 12-17-2009 11:25 AM
Raid 5, >2TB, GPT, Grub, booting, mounting root dtdionne Linux - Software 6 12-18-2007 05:37 AM
Migrated raid fs stuck at 2TB iku Linux - General 3 07-06-2007 10:42 AM
install redhat 9 on a 1.2tb raid system david@aber Red Hat 0 07-16-2004 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration