LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-15-2007, 01:21 AM   #1
mguiddy
LQ Newbie
 
Registered: Oct 2005
Distribution: OpenSuse 10.2
Posts: 7

Rep: Reputation: 1
Advice needed with external hard drives and RAID


Long story short, I want to used two external hard drives in a RAID 1 configuration. Everything worked well until I unplugged the hard drives.

/dev/md0 is configured to use /dev/sdb1 and /dev/sdc1. Once I unplugged and plugged in both external hard drives they stopped showing up as /dev/sdb1 and /dev/sdc1 and now show up as /dev/sdd1 and /dev/sde1.

Is there any way to get two separate external hard drives to work in a RAID?

I was thinking about looking into autofs to get each hard drive to map to the correct device but thought I'd ask here first.

I'm running opensuse 10.2
 
Old 09-15-2007, 09:28 AM   #2
Hammett
Senior Member
 
Registered: Aug 2003
Location: Barcelona, Catalunya
Distribution: Gentoo
Posts: 1,037

Rep: Reputation: 54
Do a dmesg and look for something similar to this
Code:
scsi 6:0:0:0: Direct-Access     SEAGATE  ST3250823A       3.03 PQ: 0 ANSI: 2
Note this is my external HDD, yours will be different

Then create an udev rule such as:

Code:
BUS=="scsi", SYSFS{vendor}=="SEAGATE", SYSFS{model}=="ST3250823A", KERNEL=="sd?1", SYMLINK+="LaCie", MODE="0755"
Replace with your HDD info from dmesg and change aswell SYMLINK+.

With this, you create a symlink in /dev that points to that specific HDD. So, no matter what /dev/sd* is your HDD, it will be always symlinked to anything you specify.

Then re-configure to use RAID1 ^_^

Hope it helps
 
Old 09-23-2007, 09:32 PM   #3
mguiddy
LQ Newbie
 
Registered: Oct 2005
Distribution: OpenSuse 10.2
Posts: 7

Original Poster
Rep: Reputation: 1
Thanks, that information did help.

I couldn't do it that way though because my enclosures all spit out identical dmesg info (they are all the same make and model). Your post did get me thinking and after heavy googling and reading the gentoo wiki I end up creating the RAID using /dev/disk/by-id/ devices, then adding everything to /etc/mdadm.conf

Now I have to figure out how to prevent the automounting of the enclosures I set up in RAID (right now the first disk is mounted to /dev/$VOLUMENAME and the second isn't mounted because the UUID is the same as the first, so I have to unmount the first disk before I can assemble the raid) and look into creating a udev rule that will assemble the raid after I turn on the second disk.

If anyone has any tips for the above, or any other tips for working with external RAID1 devices feel free to help me out.

Also, after all my searching I found out that when I first started this thread I didn't know how software raid works on linux. I didn't know I had to stop /dev/md0 before I turned off the hard drives, then when I turned them back on /dev/md0 wouldn't work and I thought it was because of what I said in my original post. Now I know I have to stop /dev/md0 and then reassemble it after both hard drives are on. Also I know know I could have assembled the RAID using UUID.

"The more you know..."

Last edited by mguiddy; 09-23-2007 at 09:44 PM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice on external hard drive rmjb Linux - Hardware 10 05-08-2007 05:33 PM
RAID questions, advice badly needed, SUSE 9.0 rwtreke Suse/Novell 4 01-12-2005 01:07 PM
Advice needed on FC2 partitioning and multiple drives dbruso Linux - Newbie 2 09-14-2004 03:35 PM
Advice on External, portable FireWire/USB DVD drives garethw Linux - Hardware 2 02-08-2004 01:46 PM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 03:28 PM


All times are GMT -5. The time now is 07:33 AM.

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