Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 09-15-2007, 02:21 AM   #1
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, 10:28 AM   #2
Senior Member
Registered: Aug 2003
Location: Barcelona, Catalunya
Distribution: Gentoo
Posts: 1,042

Rep: Reputation: 54
Do a dmesg and look for something similar to this
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:

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, 10:32 PM   #3
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 10:44 PM.


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 06:33 PM
RAID questions, advice badly needed, SUSE 9.0 rwtreke SUSE / openSUSE 4 01-12-2005 02:07 PM
Advice needed on FC2 partitioning and multiple drives dbruso Linux - Newbie 2 09-14-2004 04:35 PM
Advice on External, portable FireWire/USB DVD drives garethw Linux - Hardware 2 02-08-2004 02:46 PM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 04:28 PM > Forums > Linux Forums > Linux - General

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

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