LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-01-2012, 02:28 PM   #1
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Rep: Reputation: Disabled
Trouble Setting Up RAID1 on Debian Squeeze


Hey All,

Here is the deal. I'm trying to setup my previous computer as a file/web server. Here are the PC's specs:

MSI K9N Mobo
8GB OCZ RAM
AMD Athlon 64 6000+ 3.1ghz Dual Core CPU
2 x 750gb Hard Drives (which need the /home partition mounted to "them" on a RAID 1 setup to use for my music, videos, etc. files)
And a 60gb Hard Drive (for storing the OS and any programs/packages to keep the "media" drives separated)

**The only partition I created on the 60GB was like a 6.5GB swap (I did 6.5 just to have the hard drive at an even 55GB). Everything else is located under the / partition.


Now, so far, I've only got the basic Debian OS installed. I've installed the mdadm software/package, but when it is done downloading/installing by command line I get a GUI that pops up asking a few questions, but mainly asking about arrays. I have been choosing "open all arrays" (don't know what it means, hope this is right...) during this step, then it will return me to command line.

Basically, from here is where I'm having trouble. I need to set up the array and move (mount?) my /home from the 60GB to the 750GB drives. Using "fdisk" it shows that the system is recognizing the two hard drives because the are listed as "sdb" and "sdc" after the 60GB, but I'm not sure where to go from here. I've yet to come across anything through Google about doing this RAID setup with 3 hard drives (only two (the 750GB drives) will be setup on the RAID array).

Any and all help will be greatly appreciated.
 
Old 10-01-2012, 07:37 PM   #2
shihad
LQ Newbie
 
Registered: May 2005
Location: Girvan, Scotland
Distribution: Ubuntu
Posts: 6

Rep: Reputation: 0
Hopefully this will help:

https://raid.wiki.kernel.org/index.php/RAID_setup

As a quickie, fdisk the 2 750GB drives. Create a single partition on both of equal size and make them type fd (Linux RAID autodetect).
Assuming these partitions are /dev/sdb1 and /dev/sdc1, run the command

mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 /dev/sdc1

Then, you can create the filesystem. Assuming you want ext4, run the command

mkfs.ext4 /dev/md0

You should then be able to mount /dev/md0 somewhere, copy your /home contents, and then remount /dev/md0 under /home

Good luck!
 
Old 10-02-2012, 09:59 AM   #3
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shihad View Post
Hopefully this will help:

https://raid.wiki.kernel.org/index.php/RAID_setup

As a quickie, fdisk the 2 750GB drives. Create a single partition on both of equal size and make them type fd (Linux RAID autodetect).
Assuming these partitions are /dev/sdb1 and /dev/sdc1, run the command

mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 /dev/sdc1

Then, you can create the filesystem. Assuming you want ext4, run the command

mkfs.ext4 /dev/md0

You should then be able to mount /dev/md0 somewhere, copy your /home contents, and then remount /dev/md0 under /home

Good luck!
Thanks much. I will give this a shot tonight and see what happens. At the moment I actually have no files under /home (everything is backed up on an external drive). Is the a way to create a couple dummy text files just to see if I can get the mirroring working? I'd like to actually have some content in the text files and not just blank. I suppose I need to download a text editor?
 
Old 10-02-2012, 11:03 AM   #4
shihad
LQ Newbie
 
Registered: May 2005
Location: Girvan, Scotland
Distribution: Ubuntu
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by Aunnix View Post
Thanks much. I will give this a shot tonight and see what happens. At the moment I actually have no files under /home (everything is backed up on an external drive). Is the a way to create a couple dummy text files just to see if I can get the mirroring working? I'd like to actually have some content in the text files and not just blank. I suppose I need to download a text editor?
Not really. When you have your raid setup, just copy some files onto the raid, e.g. some config files from /etc. Of course best to remove them after testing....
 
Old 10-02-2012, 11:14 AM   #5
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shihad View Post
Not really. When you have your raid setup, just copy some files onto the raid, e.g. some config files from /etc. Of course best to remove them after testing....
Ah, that works. Again, thanks! I will keep you posted on my progress once I get home from work and can try to work on it.
 
  


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
Setting up New server with Squeeze - need help with RAID1 debian newbie Linux - Server 3 02-20-2012 09:52 AM
LXer: Setting Up Network RAID1 With DRBD On Debian Squeeze LXer Syndicated Linux News 0 08-23-2011 05:00 AM
LXer: How To Set Up Software RAID1 On A Running LVM System (Debian Squeeze) LXer Syndicated Linux News 0 06-15-2011 07:30 AM
LXer: How To Set Up Software RAID1 On A Running System (Incl. GRUB2 Configuration) (Debian Squeeze) LXer Syndicated Linux News 0 06-09-2011 04:40 PM
Problems upgrade debian lenny to squeeze (RAID1) lopinhos Linux - Server 1 04-18-2011 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:15 PM.

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