LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-15-2009, 08:31 AM   #1
h725
Member
 
Registered: Apr 2008
Posts: 114

Rep: Reputation: 15
question about raid 1


Hi,

I've a server with 2 IDE disk (80GB), with 3 partitions:

/boot (md0)
/ (md1)
swap (md2)

The second ide disk, hdb, have some hardware problem, so I'm going to replace it.
Meanwhile, I want to set hdb "fault" and remove it from raid.

Quote:
# mdadm /dev/md1 -f /dev/hdb2
mdadm: set /dev/hdb2 faulty in /dev/md1
Quote:
# mdadm /dev/md1 -r /dev/hdb2
mdadm: hot remove failed for /dev/hdb2: Device or resource busy
I think this is normal because / partition is mounted.. so how can I remove the device from raid? It's necessary to reboot system? In that case, I must edit /etc/mdadm/mdadm.conf before?


Another question:

Quote:
# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90.01
Creation Time : Thu Feb 17 18:29:44 2005
Raid Level : raid1
Array Size : 79101696 (75.44 GiB 81.00 GB)
Device Size : 79101696 (75.44 GiB 81.00 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Tue Sep 15 10:33:58 2009
State : clean, degraded, recovering
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1

Rebuild Status : 43% complete

UUID : fdb1286b:099c4e58aaf5:a35fd3824e86
Events : 0.76951239

Number Major Minor RaidDevice State
2 3 2 0 spare rebuilding /dev/hda2
1 3 66 1 active sync /dev/hdb2
Why there is one spare device?? I don't have any spare devices.. only the two disc.

Thankyou
 
Old 09-15-2009, 03:29 PM   #2
ZenDrum
LQ Newbie
 
Registered: Mar 2005
Distribution: Slackware
Posts: 7

Rep: Reputation: 1
With most hardware IDE RAID controllers, for a RAID 1 failure, you shutdown the machine, swap the drive, and restart. When the controller sees the new drive, it will begin to rebuild the array.

Note this is for IDE, which normally doesn't support hot swap. If it were SAS, SATA, or some SCSI backplanes, you could hotswap and leave the machine running.

Hope this helps.
 
Old 09-16-2009, 12:06 AM   #3
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
You have to remove the drive from the other arrays before you can remove it.
 
Old 09-16-2009, 08:11 AM   #4
h725
Member
 
Registered: Apr 2008
Posts: 114

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by leandean View Post
You have to remove the drive from the other arrays before you can remove it.
Yes, I've removed /dev/hdb1 and /dev/hdb3 from other arrays .. but /dev/hdb2 still busy:

Quote:
# mdadm /dev/md2 -f /dev/hdb3
mdadm: set /dev/hdb3 faulty in /dev/md2

# mdadm /dev/md2 -r /dev/hdb3
mdadm: hot removed /dev/hdb3

# mdadm /dev/md0 -f /dev/hdb1
mdadm: set /dev/hdb1 faulty in /dev/md0

# mdadm /dev/md0 -r /dev/hdb1
mdadm: hot removed /dev/hdb1
Quote:
# cat /proc/mdstat
Personalities : [linear] [raid1]
md1 : active raid1 hdb2[1] hda2[2]
79101696 blocks [2/1] [_U]
[===============>.....] recovery = 79.8% (63132672/79101696) finish=9.8min speed=26990K/sec
md2 : active raid1 hda3[0]
843584 blocks [2/1] [U_]

md0 : active raid1 hda1[0]
97664 blocks [2/1] [U_]

unused devices: <none>

Quote:
# mdadm /dev/md1 -r /dev/hdb2
mdadm: hot remove failed for /dev/hdb2: Device or resource busy
So it's necessary to reboot the machine? How can I tell md to not rebuild array /dev/md1 after the reboot?

Thankyou
 
Old 09-16-2009, 03:20 PM   #5
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
There is nice howto for removing failed PRIMARY HDD's from RAID1: http://www200.pair.com/mecham/raid/raid1-page3.html

However, is it possible that you are trying to remove the wrong HDD? You have [_U] for md1, but [U_] for md0 and md2. Be very carefull, check 3 times.

Also, from your posts looks like system is (automaticaly?) recovering failed hdX2 id md1 after you set the --failed flag.Notice this:

Quote:
Update Time : Tue Sep 15 10:33:58 2009
State : clean, degraded, recovering
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1

Rebuild Status : 43% complete
even in your first post.
 
Old 09-17-2009, 02:26 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,414

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
Check /etc/mdadm.conf & /etc/fstab and comment out refs to that raid.
 
  


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
software raid 10 (yes, another raid question) aunquarra Linux - Server 3 06-15-2007 06:28 PM
to Raid, or not to Raid - that is the question. compgeek50 Linux - Hardware 2 05-16-2007 03:44 PM
RAID Question sunra Linux - Hardware 2 01-12-2006 11:51 AM
raid 1 question rblampain Linux - Software 5 01-12-2006 10:09 AM
Raid question PaulSpn1 Linux - Hardware 4 08-06-2004 04:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:11 PM.

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