Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RAID questions after some config changes [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
AxelTerizaki
n00b
n00b


Joined: 12 Apr 2003
Posts: 33

PostPosted: Sat Oct 08, 2005 4:32 pm    Post subject: RAID questions after some config changes [SOLVED] Reply with quote

Okay, I have successfully managed to transfer most of the system that was on a lightly damaged HD to a set of two new ones, to make a RAID 1 on those, while keeping my RAID 5 for my data.

The problem is that with a raidtab like this:

Code:
raiddev /dev/md1
# /boot (RAID 1)
        raid-level      1
        nr-raid-disks   2
        chunk-size      32
        device          /dev/hda1
        raid-disk       0
        device          /dev/hdd1
        raid-disk       1

# / (RAID 1)
raiddev                 /dev/md2
raid-level              1
nr-raid-disks           2
chunk-size              32
persistent-superblock   1
device                  /dev/hda3
raid-disk               0
device                  /dev/hdd3
raid-disk               1

# Data (RAID 5)
raiddev /dev/md0
        raid-level      5
        nr-raid-disks   5
        nr-spare-disks  0
        persistent-superblock 1
        parity-algorithm        left-symmetric
        chunk-size      64
        device          /dev/hdc1
        raid-disk       0
        device          /dev/hde1
        raid-disk       1
        device          /dev/hdg1
        raid-disk       2
        device          /dev/hdi1
        raid-disk       3
        device          /dev/hdk1
        raid-disk       4


But when I do a cat /proc/mdstat I get this:
Code:

md1 : active raid1 hdd1[1] hda1[0]
      104320 blocks [1/1] [U]

md0 : active raid5 hdk1[4] hdi1[3] hdg1[2] hde1[5](F) hdc1[0]
      976558592 blocks level 5, 64k chunk, algorithm 2 [5/4] [U_UUU]

md2 : active raid1 hdd3[1] hda3[0]
      77537600 blocks [1/1] [U]

unused devices: <none>


I have two problems:

1) md1 and md2 seem to have only one drive monitored (one U). In order to copy the system, I had to initialize the md1 and md2 with only one drive (nr-disks 1 in /etc/raidtab). As you can see, now I changed it, but after many reboots it just stays like that.

2) md0 seems to have one drive down, while all the drives are listed here, and functionning properly (I mean, I can fdisk them and such.) and they are correctly listed when the various bioses of my IDE controller cards start up before boot. I had to unplug one of the HDs of the RAID 5 before doing the system transfer because I didn't have enough powercables at that time ^^; But now there is enough for all disks, but cat /proc/mdstat still shows this one HD missing. It appears faulty, but when I do a raidhotadd /dev/md0 /dev/hde1, it won't let me and replies
Code:
mahoro dev # raidhotadd /dev/md0 /dev/hde1
/dev/md0: can not hot-add disk: invalid argument.




Does anyone have any ideas on how to work these two problems out?


Last edited by AxelTerizaki on Sun Oct 09, 2005 2:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55044
Location: 56N 3W

PostPosted: Sat Oct 08, 2005 4:54 pm    Post subject: Reply with quote

AxelTerizaki,

When you make a RAID 1 set with one drive missing, you set up your raidtab for two drives but set one faulty.
Like this :-
Code:
# /boot
raiddev                 /dev/md0

# Must Use RAID1 (mirror) for booting off to keep Grub Happy
raid-level              1    # it's not obvious but this *must* be
                             # right after raiddev
persistent-superblock   1    # set this to 1 if you want autostart,
                             # BUT SETTING TO 1 WILL DESTROY PREVIOUS
                             # CONTENTS if this is a RAID0 array created
                             # by older raidtools (0.40-0.51) or mdtools!
chunk-size              16   # Thats 16kb
nr-raid-disks           2
nr-spare-disks          0
device                  /dev/sda1
raid-disk               0
# failed-disk           0    # create the arrary in degraded mode
device                  /dev/sdb1
raid-disk               1
The failed -disk entry is commented out now, in favour of the raid-disk 0 line.
When you set it up this way, the system sets up to expect two drives in the raid set but is quite happy with one.
You go through the process of mkaing the raid set and putting a filesystem on /dev/md0 jsu as if both drives were working.
After the raidhotadd, I fixed the raidtab to show that both drives were OK.

I have a feeling that the same thing applies to raid5 too but I don't use raid5.

For your raid1 setup, you can do this process now, making a new raid set with just the partition that does not 'belong' and the good one flagged as a failed-disk. Then copy the content and raidhotadd the former good raid partition.
I have a feeling that the raid5 set will not be so easy.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
AxelTerizaki
n00b
n00b


Joined: 12 Apr 2003
Posts: 33

PostPosted: Sat Oct 08, 2005 4:58 pm    Post subject: Reply with quote

Thanks for the help about the Raid 1 array. I did indeed miss the faulty-disk bit. I'll try it now :)
Back to top
View user's profile Send private message
AxelTerizaki
n00b
n00b


Joined: 12 Apr 2003
Posts: 33

PostPosted: Sun Oct 09, 2005 2:13 pm    Post subject: Reply with quote

Okay, it got solved: both RAID arrays now work pretty nicely, thanks for the help :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum