LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 05-18-2008, 09:29 PM   #1
jonez
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
RAID Setup, Hard Drive labels change after reboot!


Hi all, glad to be here. Hopefully i'll gain some more experience and i'll be able to help others someday too.

I have an old Dell Dimension 4500 P4 running Fedora 8 on a single IDE drive. I also have two RAID cards, one with 4 SATA drives connected and the other with 4 IDE drives connected.

I have the 4 SATAs on software RAID0 and I have 2 sets of 2 drives in software RAID1 with the 4 IDEs. I set them all up using mdadm.

I'm using SAMBA so that I can access these RAIDs over my home network.

My problem is that the first time I set up these RAID sets and then rebooted, the drive labels changed and my RAIDs failed. My drives were labeled based on the device they were connected to, such as the SATA drives were sd[b-e] and the IDEs sd[f-i]. After reboot they had switched and the IDEs were sd[b-e] and the SATAs were sd[f-i]. I checked and I did not have an mdadm.conf file so I have now created that, but before I reboot again I wanted to know if that alone will prevent these drive labels from changing again or if there is something I can do do make these labels perminent? Thank you for reading.

Here's some info I hope will be helpful:

/etc/mdadm.conf
Code:
DEVICE partitions
ARRAY /dev/md0 level=raid0 num-devices=4 UUID=b71fab15:a20541de:8f86d477:6be33b4e
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=8fe1c24f:92627051:d0ddcf4d:af77ce69
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=0e7a4180:3ac0077a:473410f9:8f82bc24
fdisk -l (for my RAIDs)
Code:
Disk /dev/md0: 2000.4 GB, 2000420601856 bytes
2 heads, 4 sectors/track, 488383936 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 123.5 GB, 123518910464 bytes
2 heads, 4 sectors/track, 30155984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 123.5 GB, 123518910464 bytes
2 heads, 4 sectors/track, 30155984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table
mdadm -D /dev/md0:
Code:
        Version : 00.90.03
  Creation Time : Sun May 18 14:52:04 2008
     Raid Level : raid0
     Array Size : 1953535744 (1863.04 GiB 2000.42 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sun May 18 15:11:40 2008
          State : active
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 64K

           UUID : b71fab15:a20541de:8f86d477:6be33b4e
         Events : 0.3

    Number   Major   Minor   RaidDevice State
       0       8       81        0      active sync   /dev/sdf1
       1       8       97        1      active sync   /dev/sdg1
       2       8      113        2      active sync   /dev/sdh1
       3       8      129        3      active sync   /dev/sdi1
mdadm -D /dev/md1:
Code:
        Version : 00.90.03
  Creation Time : Sun May 18 14:52:42 2008
     Raid Level : raid1
     Array Size : 120623936 (115.04 GiB 123.52 GB)
  Used Dev Size : 120623936 (115.04 GiB 123.52 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Sun May 18 17:12:19 2008
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 8fe1c24f:92627051:d0ddcf4d:af77ce69
         Events : 0.7

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1

mdadm -D /dev/md2:
Code:
        Version : 00.90.03
  Creation Time : Sun May 18 14:52:59 2008
     Raid Level : raid1
     Array Size : 120623936 (115.04 GiB 123.52 GB)
  Used Dev Size : 120623936 (115.04 GiB 123.52 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Sun May 18 16:25:07 2008
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 0e7a4180:3ac0077a:473410f9:8f82bc24
         Events : 0.7

    Number   Major   Minor   RaidDevice State
       0       8       49        0      active sync   /dev/sdd1
       1       8       65        1      active sync   /dev/sde1
 
Old 05-19-2008, 10:10 PM   #2
jonez
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Well with some help from a friend, I figured it out. I used udev to match a qualifier for each drive and set the drive label based on that.

Here's a sample rule I wrote for UDEV:

Code:
#sdb
ATTR{stat}=="  269793  1627660 241341206 22283087     5402   501990  4059168  7008000        0  8368216 29290914", KERNEL="sdb"
where upon matching ATTR{stat} for a specific device, it will automatically give it the name sdb.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
remount RAID drive after reboot with mdadm ufmale Linux - Software 1 11-15-2007 08:13 PM
Remounting raid (sda1) drive on reboot spammy163 Linux - Newbie 2 04-29-2006 01:58 PM
hard drive powers down on reboot postal26 Linux - Hardware 1 05-31-2004 09:03 AM
hard drive write causes reboot eastsuse Linux - Newbie 2 05-14-2004 10:49 AM
Software Raid Setup Ok - Reboot fails on disk failure test ikke Linux - General 2 05-11-2003 06:42 PM


All times are GMT -5. The time now is 09:30 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