LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-22-2014, 12:45 PM   #1
evansmb
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Rep: Reputation: Disabled
linux raid fails to add a hard drive to the raid on boot up


I am setting up a linux raid. It consists of two drives. When the system is rebooted only one drive joins the array. So before the reboot mdstat would look similar to the following:
Personalities : [raid1]
md0 : active raid1 sdc1[2] sdb1[0]
3906876480 blocks super 1.2 [2/1] [U_]
[>....................] recovery = 0.0% (208768/3906876480) finish=1871.1min speed=34794K/sec


How ever after a reboot it mdstat will show something like:

Personalities : [raid1]
md0 : active raid1 sdb1[0]
3906876480 blocks super 1.2 [2/1] [U_]

unused devices: <none>


I then have to add the second drive back to the array manually. Would anyone have an idea of why it will not add the second drive on boot?
 
Old 09-23-2014, 09:34 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
You need to have raid built-in to your kernel or loaded by initrd to have it assemble the boot drive. Otherwise it has to mount the drive before it has the module. Be sure to install grub on both disks.

Code:
CONFIG_MD=y
CONFIG_MD_RAID1=y
CONFIG_MD_AUTODETECT=y
 
Old 09-23-2014, 12:28 PM   #3
evansmb
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Looks like is getting loaded.
[root@netflow 2.6.32-431.17.1.el6.x86_64]# cat /proc/modules
dm_mirror 14384 0 - Live 0xffffffffa002d000
dm_region_hash 12085 1 dm_mirror, Live 0xffffffffa0026000
dm_log 9930 2 dm_mirror,dm_region_hash, Live 0xffffffffa001f000
dm_mod 84337 23 dm_mirror,dm_log, Live 0xffffffffa0000000



looking in the messages logs i see:

Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] 976754645 4096-byte logical blocks: (4.00 TB/3.63 TiB)
Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] Write Protect is off
Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] Assuming drive cache: write through
Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] 976754645 4096-byte logical blocks: (4.00 TB/3.63 TiB)
Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] Assuming drive cache: write through
Sep 23 12:25:09 netflow kernel: sdc: sdb1
Sep 23 12:25:09 netflow kernel: sdc1
Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] 976754645 4096-byte logical blocks: (4.00 TB/3.63 TiB)
Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] Assuming drive cache: write through
Sep 23 12:25:09 netflow kernel: sd 8:0:0:0: [sdc] Attached SCSI disk
Sep 23 12:25:09 netflow kernel: md: bind<sdc>
Sep 23 12:25:09 netflow kernel: md: kicking non-fresh sdc from array!
Sep 23 12:25:09 netflow kernel: md: unbind<sdc>
Sep 23 12:25:09 netflow kernel: md: export_rdev(sdc)
 
Old 09-24-2014, 09:31 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Something is messed up. Your RAID should be on partitions, like sdc1 sdb1. The whole drive sdc should not have a raid superblock. You can check with
Code:
mdadm --examine /dev/sdc
 
  


Reply



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
[SOLVED] Boot fails after setting up software RAID 1+0 (or RAID 10) jrhorn424 Slackware 6 10-02-2011 12:30 PM
RAID 5 and storing the boot data on the 1st hard drive Latitude Linux - Hardware 3 04-14-2009 06:47 AM
RAID-1 setup doesn't boot on second Hard Drive petrasl Slackware - Installation 4 12-22-2008 12:48 PM
Software RAID 1, if one drive fails I can't boot just from the other! Oskare100 Linux - Server 1 09-23-2007 01:48 AM
hard to add second HD for raid 0 after linux is installed? bwalsh Linux - Hardware 1 08-27-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:28 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration