LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-08-2012, 12:49 PM   #1
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Rep: Reputation: 18
Creating a Slackware server, need clarification on software RAID + encryption


So I'm creating a file server using Slackware64 13.37. I have Slackware installed to a USB drive and it's all good, and I have 2 2TB disks for storage. I had originally planned to have the active shares on one of the disks and rsync it to the other disk every night but a friend suggested I used a software RAID 1 instead. I'd also like the storage to be encrypted.

So I understand how to make the array using mdadm and I'm pretty sure how to add a new disk to the array if I encounter a failure (mdadm -a, info about which array to add to and which disk I want to add). My question is concerning the combination of encryption with the array. Assuming I create the array using the entire disks (sda, sdb) and encrypt the entire array (md0) after (using LUKS), how exactly would adding a new disk to the array work? Is there anything special I would have to deal with because my array is encrypted when a failure happens or would simply adding a new disk in mirror the whole encrypted file system to the new disk?

Thanks.
 
Old 07-08-2012, 12:55 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,562
Blog Entries: 2

Rep: Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035
Quote:
Originally Posted by spudgunner View Post
I had originally planned to have the active shares on one of the disks and rsync it to the other disk every night but a friend suggested I used a software RAID 1 instead.
And actually, your initial plan is better, because it is a backup plan, while using a RAID 1 is not a backup plan. Unless you don't want to have a backup, but rather minimized downtimes in case of failures.

Quote:
So I understand how to make the array using mdadm and I'm pretty sure how to add a new disk to the array if I encounter a failure (mdadm -a, info about which array to add to and which disk I want to add). My question is concerning the combination of encryption with the array. Assuming I create the array using the entire disks (sda, sdb) and encrypt the entire array (md0) after (using LUKS), how exactly would adding a new disk to the array work? Is there anything special I would have to deal with because my array is encrypted when a failure happens or would simply adding a new disk in mirror the whole encrypted file system to the new disk?
mdadm will not care if the data on the disks is encrypted or not, it is data agnostic, so adding a disk would be exactly the same as before.
 
Old 07-08-2012, 03:53 PM   #3
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 18
Thanks for that info, I will be sticking to the rsync plan then. Just out of curiosity, why isn't RAID 1 considered a backup plan (since it's basically a straight duplication of data)?
 
Old 07-08-2012, 04:06 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,562
Blog Entries: 2

Rep: Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035Reputation: 4035
Very simple: If you use your rsync approach you can restore files that got deleted (due to malware, bugs, hardware failure or simple user error) on one disk from the other disk.
If you use RAID 1 and delete a file it will be removed automatically on both disks.
Although many people seem to think that, a RAID is never a backup solution and it was never intended to be one. The sole purpose of a RAID (except RAID 0, of course) is to keep downtimes low when a disk fails, so that the users can continue the work while the array is being recreated.

Last edited by TobiSGD; 07-08-2012 at 04:16 PM. Reason: fixed grammar
 
Old 07-08-2012, 04:11 PM   #5
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 583

Rep: Reputation: 129Reputation: 129
Because if somethings happens to your filesystem it happens at the same time at your "backup".
But a backup is considered to survive such disasters. Raid does however protect against the failure of a disk and that can be a great time saver.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
server setup advice on raid and encryption wincen Linux - Newbie 3 01-05-2011 04:00 AM
Issue with creating a Software RAID on CentOs tightlikethat Linux - Newbie 2 03-23-2010 12:24 AM
Creating software mirror raid during installation hq4ever Fedora 1 02-21-2006 09:09 AM
hardware/software raid: clarification hamish Linux - Hardware 4 01-24-2005 03:23 AM
Creating RAID (software) dominant Linux - Software 2 01-23-2005 01:22 PM


All times are GMT -5. The time now is 02:00 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration