LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-26-2003, 07:36 PM   #1
DrTebi
LQ Newbie
 
Registered: Nov 2003
Location: Madrid/LA
Posts: 1

Rep: Reputation: 0
RAID1 Problem


(wasn't sure if I should have used the hardware forum... since I am using Software RAID)

I have browsed numerous threads and got my RAID 1 to work just fine. However, there is one strange problem I have that I couldn't get an answer to:

After booting, my /proc/mdstat looked like this:
Code:
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 ide/host0/bus0/target0/lun0/part1[0] ide/host0/bus1/target0/lun0/part1[1]
      120053632 blocks [2/2] [UU]
      [>....................]  resync =  1.3% (1601708/120053632) finish=164.9min speed=11969K/sec
unused devices: <none>
OK, so I figured the RAID is being built (synced), and waited until it was done. Then the same command showed everything was fine and running.

However, the problem is if I reboot, it starts all over again with the resync, (from 0), every time! Here is what I get from dmesg:
Code:
--- snip ---
md: raid1 personality registered as nr 3
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
 [events: 00000010]
 [events: 00000010]
md: autorun ...
md: considering ide/host0/bus1/target0/lun0/part1 ...
md:  adding ide/host0/bus1/target0/lun0/part1 ...
md:  adding ide/host0/bus0/target0/lun0/part1 ...
md: created md0
md: bind<ide/host0/bus0/target0/lun0/part1,1>
md: bind<ide/host0/bus1/target0/lun0/part1,2>
md: running: <ide/host0/bus1/target0/lun0/part1><ide/host0/bus0/target0/lun0/part1>
md: ide/host0/bus1/target0/lun0/part1's event counter: 00000010
md: ide/host0/bus0/target0/lun0/part1's event counter: 00000010
md: md0: raid array is not clean -- starting background reconstruction
md: RAID level 1 does not need chunksize! Continuing anyway.
md0: max total readahead window set to 124k
md0: 1 data-disks, max readahead per data-disk: 124k
raid1: device ide/host0/bus1/target0/lun0/part1 operational as mirror 1
raid1: device ide/host0/bus0/target0/lun0/part1 operational as mirror 0
raid1: raid set md0 not clean; reconstructing mirrors
raid1: raid set md0 active with 2 out of 2 mirrors
md: updating md0 RAID superblock on device
md: ide/host0/bus1/target0/lun0/part1 [events: 00000011]<6>(write) ide/host0/bus1/target0/lun0/part1's sb offset: 120053632
md: syncing RAID array md0
md: minimum _guaranteed_ reconstruction speed: 100 KB/sec/disc.
md: using maximum available idle IO bandwith (but not more than 100000 KB/sec) for reconstruction.
md: using 124k window, over a total of 120053632 blocks.
md: ide/host0/bus0/target0/lun0/part1 [events: 00000011]<6>(write) ide/host0/bus0/target0/lun0/part1's sb offset: 120053632
md: ... autorun DONE.
--- snip ---
Everything like reading and writing to the md0 works just fine, and still does now, except the resync starts again at every boot!
What is wrong, or what is it that I don't understand? Is it supposed to resync at every boot?
I checked my kernel messages, there was nothing indicating that any of the drives are bad. I am not using the RAID as a boot drive, simply as a storage.


----------------- Details about my install --------------
My system:
400 MgHz Pentium III
SuperMicro P6SBS
256MB SDRAM (Crucial)
Quantum Viking II 4.5 GB SCSI Disk (holds the Gentoo OS)
2 x Maxtor Diamond 9 120 GB disk (for the RAID1)
3COM NIC

I used Gentoo's LiveCD "x86-basic-1.4-20030911.iso", which is using Kernel 2.4.20, and installed everything from scratch, with RAID support:
Code:
[*] Multiple devices driver support (RAID and LVM)
<*>  RAID support
< >   Linear (append) mode
< >   RAID-0 (striping) mode
<*>   RAID-1 (mirroring) mode
< >   RAID-4/RAID-5 mode
< >   Multipath I/O support
< >  Logical volume manager (LVM) support
To create the RAID, I used cfdisk to create one primary partion, so about 114GB, on each drive. I set the partion type to FD.
I rebooted to see if the system read the partions correctly. Then I created the RAID 1 with mdadm:
Code:
mdadm --create /dev/md0 --chunk=128 --level=1 raid-devices=2 /dev/hd[ac]1
This command also starts the RAID. So all that was left to do is create a file system on the disks and start using them. I chose XFS:
Code:
mkfs.xfs -d agcount=64 -l size=32m /dev/md0
This is my /etc/mdadm.conf:
Code:
DEVICE /dev/hda1 /dev/hdc1
ARRAY /dev/md0 devices=/dev/hda1,/dev/hdc1
and this my /etc/fstab:
Code:
# <fs>               <mountpoint>   <type>      <opts>            <dump/pass>
/dev/sda1            /boot          ext2        noauto,noatime    1 1
/dev/sda5            /              xfs         noatime           0 0
/dev/dsa2            none           swap        sw                0 0
/dev/md0             /raid          xfs         noatime           0 0
/dev/cdroms/cdrom0   /mnt/cdrom     iso9660     noauto,ro         0 0
proc                 /proc          proc        defaults          0 0
tmpfs                /dev/shm       tmpfs       defaults          0 0
...please help/explain what the problem is.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardware RAID1 victorcwk Linux - Hardware 2 10-04-2005 03:24 PM
RAID1 remove vexedsa Linux - General 2 05-25-2005 02:16 AM
delete raid1 toneys Linux - General 2 09-22-2004 12:38 AM
read_ahead in raid1 jdt Linux - General 2 11-20-2003 10:18 AM
Raid1 with kernel 2.4.10 susx Linux - General 1 10-12-2001 09:33 PM

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

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