LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2011, 09:38 PM   #1
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Rep: Reputation: 0
software raid1 fail


So.... I'm an idiot, and while messing around adding a new hdd to my computer I knocked off both of the sata cables to my raid1 array. Now, they're both failed and it's coming up as inactive. How can I fix this?
Code:
jess@NAS:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : inactive sdb1[0](S) sdc[1](S)
      3907026432 blocks

unused devices: <none>
jess@NAS:~$ sudo fdisk -l

Disk /dev/sda: 8119 MB, 8119738368 bytes
255 heads, 63 sectors/track, 987 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b7d58

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          32      248832   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              32         988     7677953    5  Extended
Partition 2 does not end on cylinder boundary.
/dev/sda5              32         988     7677952   8e  Linux LVM

Disk /dev/dm-0: 7470 MB, 7470055424 bytes
255 heads, 63 sectors/track, 908 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa76e8de3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243201  1953512001   fd  Linux raid autodetect

Disk /dev/dm-1: 390 MB, 390070272 bytes
255 heads, 63 sectors/track, 47 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa99677fa

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      243201  1953512001   fd  Linux raid autodetect
jess@NAS:~$
error message: mdadm: cannot get array info for /dev/md0

Last edited by daisychick; 12-28-2011 at 09:40 PM. Reason: forgot to add an error message
 
Old 12-28-2011, 09:54 PM   #2
2005wind
LQ Newbie
 
Registered: Apr 2010
Posts: 15

Rep: Reputation: Disabled
you can use
Quote:
sudo mdadm -E --scan
get some info
use
Quote:
mdadm -A /dev/md0
to activate the md

please type the /etc/mdadm/mdadm.conf
 
Old 12-28-2011, 10:15 PM   #3
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
Code:
jess@NAS:~$ sudo mdadm -E --scan
ARRAY /dev/md1 UUID=c4989226:40ca5381:cced5de7:ca715931
ARRAY /dev/md0 UUID=306e2114:444e0ff2:cced5de7:ca715931
jess@NAS:~$
mdadm.conf
Code:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR 
MAILFROM nas-server - mdadm

# definitions of existing MD arrays
# This file was auto-generated on Tue, 25 Jan 2011 04:21:13 -0600
# by mkconf $Id$
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=306e2114:444e0ff2:cced5de7:ca715931
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=c4989226:40ca5381:cced5de7:ca715931


---------- Post added 12-28-11 at 09:16 PM ----------

md1 is working fine.
Code:
jess@NAS:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sde1[1] sdd1[0]
      976759936 blocks [2/2] [UU]

md0 : inactive sdc[1](S) sdb1[0](S)
      3907026432 blocks

unused devices: <none>
jess@NAS:~$
 
Old 12-28-2011, 10:18 PM   #4
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
p.s. sudo mdadm -A /dev/md0 does nothing. No error message. no change in array.
 
Old 12-28-2011, 10:25 PM   #5
2005wind
LQ Newbie
 
Registered: Apr 2010
Posts: 15

Rep: Reputation: Disabled
please type some info in fdisk -l
 
Old 12-28-2011, 10:30 PM   #6
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
It's in the first post but here it is again with all drives connected.
Code:
jess@NAS:~$ sudo fdisk -l

Disk /dev/sda: 8119 MB, 8119738368 bytes
255 heads, 63 sectors/track, 987 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b7d58

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          32      248832   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              32         988     7677953    5  Extended
Partition 2 does not end on cylinder boundary.
/dev/sda5              32         988     7677952   8e  Linux LVM

Disk /dev/dm-0: 7470 MB, 7470055424 bytes
255 heads, 63 sectors/track, 908 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa76e8de3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243201  1953512001   fd  Linux raid autodetect

Disk /dev/dm-1: 390 MB, 390070272 bytes
255 heads, 63 sectors/track, 47 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x934a5078

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      121601   976760001   fd  Linux raid autodetect

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa99677fa

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      243201  1953512001   fd  Linux raid autodetect

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2236a1e8

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1      121601   976760001   fd  Linux raid autodetect

Disk /dev/md1: 1000.2 GB, 1000202174464 bytes
2 heads, 4 sectors/track, 244189984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table
jess@NAS:~$
 
Old 12-29-2011, 12:10 AM   #7
2005wind
LQ Newbie
 
Registered: Apr 2010
Posts: 15

Rep: Reputation: Disabled
hi you can
Quote:
mdadm -A /dev/md0 --verbose
get more info
 
Old 12-29-2011, 03:41 PM   #8
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
jess@NAS:~$ sudo mdadm -A /dev/md0 --verbose
mdadm: looking for devices for /dev/md0
mdadm: cannot open device /dev/sdb1: Device or resource busy
mdadm: /dev/sdb1 has wrong uuid.
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: /dev/sdc1 has wrong uuid.
mdadm: cannot open device /dev/sdd1: Device or resource busy
mdadm: /dev/sdd1 has wrong uuid.
mdadm: cannot open device /dev/sde1: Device or resource busy
mdadm: /dev/sde1 has wrong uuid.
mdadm: cannot open device /dev/md1: Device or resource busy
mdadm: /dev/md1 has wrong uuid.
mdadm: cannot open device /dev/sde1: Device or resource busy
mdadm: /dev/sde1 has wrong uuid.
mdadm: cannot open device /dev/sde: Device or resource busy
mdadm: /dev/sde has wrong uuid.
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: /dev/sdc1 has wrong uuid.
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: /dev/sdc has wrong uuid.
mdadm: cannot open device /dev/sdd1: Device or resource busy
mdadm: /dev/sdd1 has wrong uuid.
mdadm: cannot open device /dev/sdd: Device or resource busy
mdadm: /dev/sdd has wrong uuid.
mdadm: cannot open device /dev/dm-1: Device or resource busy
mdadm: /dev/dm-1 has wrong uuid.
mdadm: cannot open device /dev/sdb1: Device or resource busy
mdadm: /dev/sdb1 has wrong uuid.
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: /dev/sdb has wrong uuid.
mdadm: cannot open device /dev/dm-0: Device or resource busy
mdadm: /dev/dm-0 has wrong uuid.
mdadm: cannot open device /dev/sda5: Device or resource busy
mdadm: /dev/sda5 has wrong uuid.
mdadm: no recogniseable superblock on /dev/sda2
mdadm: /dev/sda2 has wrong uuid.
mdadm: cannot open device /dev/sda1: Device or resource busy
mdadm: /dev/sda1 has wrong uuid.
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: /dev/sda has wrong uuid.
jess@NAS:~$
 
Old 12-29-2011, 04:16 PM   #9
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
sudo mdadm -R restarted the array with only one drive showing. mounted and info is accessible.
 
Old 12-30-2011, 12:42 AM   #10
2005wind
LQ Newbie
 
Registered: Apr 2010
Posts: 15

Rep: Reputation: Disabled
you may can rebuild the md0
 
Old 12-30-2011, 01:07 AM   #11
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
yuup. Added the second drive back in and now have a full working array again.
cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sde1[1] sdd1[0]
976759936 blocks [2/2] [UU]

md0 : active raid1 sdc1[2] sdb1[0]
1953511936 blocks [2/1] [U_]
[================>....] recovery = 84.2% (1646413056/1953511936) finish=88.1min speed=58094K/sec

unused devices: <none>
 
Old 12-30-2011, 07:42 AM   #12
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
and it's done.

jess@NAS:/var/log$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sde1[1] sdd1[0]
976759936 blocks [2/2] [UU]

md0 : active raid1 sdc1[1] sdb1[0]
1953511936 blocks [2/2] [UU]

unused devices: <none>
 
Old 01-02-2012, 11:31 PM   #13
2005wind
LQ Newbie
 
Registered: Apr 2010
Posts: 15

Rep: Reputation: Disabled
ok is it ok ?
 
Old 01-02-2012, 11:33 PM   #14
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
if I reboot, it becomes inactive again. I checked the mdadm.conf and it looks fine. not sure why it's not activating.
 
Old 01-04-2012, 09:46 PM   #15
2005wind
LQ Newbie
 
Registered: Apr 2010
Posts: 15

Rep: Reputation: Disabled
you can add mdadm -a to rc.local
 
  


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
[SOLVED] Software Raid1 problems lpallard Linux - Software 10 10-09-2010 07:58 PM
Software RAID1 SBN Linux - General 1 01-21-2009 09:47 AM
Software raid1 shadowers Linux - Hardware 2 10-24-2008 05:08 PM
Have software raid1, but like to change to raid1+0 or 0+1, how? spaceuser Debian 8 03-17-2008 03:07 PM
Software RAID1 with mdadm bujecas Debian 0 10-26-2006 10:56 AM


All times are GMT -5. The time now is 05:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration