Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Absolute Beginner Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Absolute Beginner Talk
The perfect starting place to find out more about computers, Linux and Ubuntu.

 
Thread Tools Display Modes
Old June 10th, 2007   #1
aaron_summer
5 Cups of Ubuntu
 
Join Date: May 2007
Location: Vancouver, BC
Beans: 25
Ubuntu 7.04 Feisty Fawn
USB HDD RAID 5 Setup

Good Day Every,

I have 3 320 USB External HDDs (all identical HDD Models) and need to setup an external RAID 5 with them to keep all my photos and videos safely archived.

I have Ubuntu Server installed and would like to know if anyone can walk me through setting up a software raid 5 setup for these USB drives? Or at least point me to a resource where this has been done before.

Thanks in advance,
__________________
Aaron Summer
Ubuntu 7.04 Server, Intel Dual Core 3.0 Ghz Processor, 1 GB Ram, 80GB HDD
aaron_summer is offline   Reply With Quote
Old June 14th, 2007   #2
nutz
Quad Shot of Ubuntu
 
nutz's Avatar
 
Join Date: May 2007
Location: Phoenix,AZ
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via AIM to nutz
Re: USB HDD RAID 5 Setup

I would like to know also.
nutz is offline   Reply With Quote
Old June 15th, 2007   #3
aaron_summer
5 Cups of Ubuntu
 
Join Date: May 2007
Location: Vancouver, BC
Beans: 25
Ubuntu 7.04 Feisty Fawn
Re: USB HDD RAID 5 Setup

After some research I was able to build a simple software controlled RAID 1 array with 2 of my external 320 GB USB drives.

Tools used: gparted, gedit, mdadm and of course some coffee

First I needed to know the location of my USB drives ...

Code:
cat proc/diskstats
My two USB drives were mounted (?) to /dev/sda1 and /dev/sdb1.

I then opened gparted and removed the partitions from both drives, and created a new partition using the full disk space and formated to EXT3 file type. (I wonder if I could have gotten away with not formatting the drives?)

Then I opened a terminal window and installed the mdadm tools for software raid ...

Code:
sudo apt-get install mdadm
After the mdadm installed I used it to build the RAID 1 ...

Code:
sudo mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
Then to sync the two drives together I needed to reboot the computer.

Once the computer restarted I opened a terminal to view the progress of the sync ...

Code:
cat /proc/mdstat
or

Code:
watch cat /proc/mdstat
The above will refresh the results every 2 seconds by default

After about 2.5 hours the drives where synced and ready to be formated with the reiserfs.

Code:
sudo mkfs -t reiserfs /dev/md0
GREAT! We have a virtual drive that is all formated and ready to be mounted. To make things run smooth I edited the /etc/fstab file with gedit...

Code:
sudo gedit /etc/fstab
I added the following line to /etc/fstab ...

Code:
/dev/md0 /media/raid auto defaults 0 0
The above will allow me to use mount -a and have the device mount as /media/raid. Remember to make the /media/raid directory ...

Code:
sudo mkdir /media/raid
Next let's mount the raid device ...

Code:
sudo mount -a
Almost done ... next you will need to use chown to allow writing to the drive by users other than root.

Now you are done.

This worked perfectly for me and runs very well.

Please add comments if I have missed anything ... remember I am very very new to linux and this was my first attempt at creating a software raid 1 with external usb drives.
__________________
Aaron Summer
Ubuntu 7.04 Server, Intel Dual Core 3.0 Ghz Processor, 1 GB Ram, 80GB HDD

Last edited by aaron_summer; June 15th, 2007 at 11:44 AM..
aaron_summer is offline   Reply With Quote
Old August 18th, 2007   #4
HalNineThousand
5 Cups of Ubuntu
 
HalNineThousand's Avatar
 
Join Date: Jul 2006
My beans are hidden!
Kubuntu 6.06
Re: USB HDD RAID 5 Setup

What happens if the drives get disconnected and somehow not connected in the same order at some later date? Do they change device IDs and the RAID stops working?
HalNineThousand is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:06 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry