Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-04-2008, 12:09 AM   #1
Registered: Jun 2005
Distribution: Various
Posts: 72

Rep: Reputation: 15
Question How does mdadm handle changing drive letters?

I have a RAID 1 going now, /dev/md0, composed of /dev/sda (internal) and /dev/sdb (usb enclosure). I haven't run into any issues yet, but I'm wondering what'll happen if I boot up with a USB flash drive (/dev/sdc) connected and the drive letters get remapped. If, for example, sdb and sdc were switched around.

Can mdadm be configured to build the md0 array out of two specific UUIDs or volume labels? Or is it intelligent enough to detect the change by itself? I've searched Google and these forums but I haven't found any way of doing so. /etc/fstab doesn't seem to help in this case, since the two block devices that create the array are never actually mounted.
Old 09-04-2008, 12:32 AM   #2
Registered: Apr 2007
Location: Corinth, TX
Distribution: CentOS, RHEL, SLES, ubuntu
Posts: 44

Rep: Reputation: 15
the raid set information is stored on the block devices themselves, and as such will be recognized as part of their respective raid sets regardless of the device name they get assigned. the raid part happens at a lower level than the /dev/xxx assignment
Old 09-04-2008, 03:41 AM   #3
Bruce Hill
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL
Distribution: Gentoo / Funtoo
Posts: 6,926

Rep: Reputation: 126Reputation: 126
To second djjoshuad's post, I have boot on /dev/md0 RAID1, swap on
/dev/md1 RAID1, and a LUKS encrypted LVM containing / and ~/ running
in RAID0 on /dev/md2 -- 2 SATA drives. There is also a SATA DVD+/-RW,
and another SATA drive (old Windows/Slackware dual boot) in the box.

I have changed SATA cables and the RAID arrays always function well,
simply remapping the device nodes to their proper assignments.
Old 09-04-2008, 09:02 AM   #4
Registered: Jun 2005
Distribution: Various
Posts: 72

Original Poster
Rep: Reputation: 15
Great, thanks for the replies! This would explain how a brand new debian install knew that my two drives had previously been part of a raid (it warned me when I went to create it).


mdadm, raid

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
Changing superblock for MDADM raid0 harddrives? TefoZi Linux - Newbie 1 04-07-2008 09:22 PM
Command for changing rmp to something Slack can handle? Oakstaff Slackware 4 02-24-2005 03:39 PM
Relabelling drive letters? Jiblet Linux - Newbie 18 08-02-2004 11:02 PM
Wine problem- cannot define drive letters minister_fister Linux - Software 1 10-01-2003 01:21 PM
Swapping Drive Letters in Windows while multibooting with LILO akfnphx2 Linux - General 2 05-27-2001 07:34 AM

All times are GMT -5. The time now is 07:59 PM.

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