LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-06-2003, 12:20 PM   #1
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Rep: Reputation: 0
RAID resync


I have a server running Redhat 7.2 with software raid 1. I need to stop the RAID resync for now, and restart it later when the system is not quite as busy. What would be the best way to stop the resync?

I was thinking about rebooting the server and pulling one drive, but would there be any possible negitave side affects of doing this?

How about using raidhotremove? Could I just remove one drive from the array for now, then add it again later? If so, how would I know which drive to remove from the array?
 
Old 03-06-2003, 12:37 PM   #2
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
how many disks is the raid-1 array composed of? If you had 3 of which one failed, I would raidstop /dev/mdX and edit /etc/raidtab and remove the failed disk from the array before restarting the array. Well, if you had two of which one failed, you cant restart the array with just one disk, as far as I know.

Take a look at /proc/mdstat. That should tell you what device has failed.

Last edited by nxny; 03-06-2003 at 12:49 PM.
 
Old 03-06-2003, 01:02 PM   #3
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Original Poster
Rep: Reputation: 0
there are 2 total disks in the array. The problem isnt that one of the disks failed, the problem is that the load average from the build is too high and causing other services to stop. If at all possible, I would like to stop the resync for now, and start it later when it's not so busy.

raidstop doesnt work, it tells me the device is busy.


here is some more info on my setup:

Filesystem Size Used Avail Use% Mounted on
/dev/md0 69G 20G 46G 29% /
/dev/md1 45M 22M 21M 50% /boot
none 441M 0 440M 0% /dev/shm

raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hda2
raid-disk 0
device /dev/hdd2
raid-disk 1
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hda1
raid-disk 0
device /dev/hdd1
raid-disk 1


thank you
 
Old 03-06-2003, 04:24 PM   #4
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
how about /proc/mdstat?

I see that you have for each raid-1 array, you have one partition each from each drive. So if you had a disk failure, both partitions belonging to your drive should be resyncing at this point. Or did you have a set of bad sectors in one of those partitions that makes one array 'dirty'?

We really need to see your /proc/mdstat. And your ps -ax | head -20

As you may be able to see from the PS output, it is the raid rebuild processes ( these are kernel processes and the user doesnt have control over these ) that's keeping your array 'busy'. As far as I've heard, the only way you can STOP these processes is by making necessary configuration to avoid these from starting up again and rebooting.

And what kind of resource crunch are we talking about here?

Last edited by nxny; 03-06-2003 at 04:27 PM.
 
Old 03-06-2003, 05:12 PM   #5
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks nxny

the raid is finially done and the server load is back in check.

When the server originaly crashed, I found the only way to get it to boot was to use a non-SMP kernel (seperate issue). Well, the only one I had on the server at the time was the redhat 2.4.7 kernel, which the server was running on since 2:00 yesterday through 12:00 today. using that kernel, the resync process was only at 23% this morning when I checked. Thats about 20 hours, 1% rebuild per hour!

Sendmail wasnt working (NS lookup faliures) and FTP was timing out.

So I upgraded to the lates redhat kernel (uniprcossser) and the complete resync took only 4 hours.


for the heck of it, here's my /proc/mdstat

Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hda2[0] hdd2[1]
73730240 blocks [2/2] [UU]

md1 : active raid1 hda1[0] hdd1[1]
48064 blocks [2/2] [UU]

unused devices: <none>
 
Old 03-14-2003, 04:48 PM   #6
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Finally, here it is.

The answer to your question lies in /proc/sys/dev/raid/speed_limit_max and
/proc/sys/dev/raid/speed_limit_min

These are writable files that can communicate your RAID intentions to the kernel and by default, contain values 100000 and 100 respectively. These are the values in KB of I/O that may go to 'resyncing' activities, the default max value being the theoretical goal. So if you want the resync to stop/ slow down, these values may be reduced during peak hours, provided you are willing to undertake the risks ( redundancy provided by the array is reduced, if you choose not to bring the array to proper operating condition )

See man 4 md for more information.
 
Old 03-14-2003, 05:22 PM   #7
thedeud
LQ Newbie
 
Registered: Mar 2003
Distribution: Redhat
Posts: 18

Original Poster
Rep: Reputation: 0
you, my frriend, are awsome. I'm going to try this next time a RAID server is resyncing and post the results.

Thank you.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
resync in Partitionable RAID 5. FinalFantasy Linux - General 4 10-15-2005 09:02 AM
Perc3Di SCSI RAID + Adaptec 2810SA RAID = Fatal Grub Error? LinuxOnTheEdge Linux - General 2 03-19-2005 02:35 PM
does linux support the sata raid and ide raid in k7n2 delta ilsr? spyghost Linux - Hardware 10 04-16-2004 05:27 AM
moving system from ide software raid to new box with scsi raid ftumsh Linux - General 0 10-28-2003 09:34 AM
Resync every reboot u4113072 Linux - Software 0 10-15-2002 02:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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