Swap and raid?

smp

Diamond Member
Dec 6, 2000
5,215
0
76
I've been struggling with this RH 7.3 setup for a couple of days now.
Firstly, if I'm mirroring two drives, should I have swap be mirrored as well?
I'm going for two partitions, a swap of 1000 megs and a / partition for the rest
It doesn't seem to want to work.


Secondly,
will linux (well, RH) work with a promise fasttrack 66 raid controller?
If not, I only have two ide connectors on board. I have two hard drives and a cd rom .. each hard drive should be on it's own channel (this is what i understand, for better bandwidth) .. is it safe to have the cd rom act as slave to one of those HDD's?
So far setup just keeps cacking out on me once I start to copy files after initial setup.
:(
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: smp
Firstly, if I'm mirroring two drives, should I have swap be mirrored as well?
Yes - I don't think you'll have much of a choice. If the kernel recognizes the array, it will speak to it through the /dev/ataraid/d?p? device nodes. While the original /dev/hd? nodes are still listed during boot-up, my understanding has always been that they are not to be used, lest bad things happen. It does seem pretty silly mirroring swap, but if you're going to work use the controller in RAID mode, you're stuck with it.

Secondly,will linux (well, RH) work with a promise fasttrack 66 raid controller?
I believe so, but you'd need to check the chipset against Linux IDE to be certain. Pretty sure it should work, though.

If not, I only have two ide connectors on board. I have two hard drives and a cd rom .. each hard drive should be on it's own channel (this is what i understand, for better bandwidth) .. is it safe to have the cd rom act as slave to one of those HDD's?
Sure, why wouldn't it be?

So far setup just keeps cacking out on me once I start to copy files after initial setup.
I assume that you're creating a driver disk per RH's instructions? If not, that's a problem. If so, I don't know. If you're set on having the mirror, you could install to a third disk, and copy things over later.

Also, if this is a linux-only machine, it would probably be easier to use the controller as a regular IDE controller along with Linux software (md) RAID. But if you need a mirror in Windows as well, that's not an option.
 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
Thank you!
That was the kind of help I was looking for.
Alright ... so far, I've managed to get past initial setup to the point where it prompts me to click ok to start installing files
(partition, network, services, packages ... next -->)
And it gives me this message;

The kernel was unable to re-read the partition
on tmp/hda (device or resource busy).
This means linux knows nothing about any
modifications you've made. You should reboot
your computer before doing anything with /tmp/hda

and it continues to give me the same error with /tmp/hdb and /tmp/hdc
It only gives me the option of ignoring that message .. which I just did .. I'll see what happens, but this same thing happened before. I don't know what it means.. it doesn't recognize my partitions is what I suspect though :(
 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
"An error occured while trying to initialize swap on md0 . this problem is serious and setup can't continue."

I don't get it .. :Q
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
OK, wait... what kind of RAID support are you using - ataraid or md?

ataraid - the controller is in "RAID mode" - meaning that arrays have been defined and initialized in the BIOS

md - the controller is acting as a regular IDE controller and linux will create arrays using software (md) RAID.

The installation will be different between them.
 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
Originally posted by: cleverhandle
OK, wait... what kind of RAID support are you using - ataraid or md? ataraid - the controller is in "RAID mode" - meaning that arrays have been defined and initialized in the BIOS md - the controller is acting as a regular IDE controller and linux will create arrays using software (md) RAID. The installation will be different between them.

I ditched the promise card.
Just using the regular two ide channels on the mobo .. so software raid.

I'm using two different 40 gig drives.
A WD400bb
A Maxtor D740X (or whatever)

Partitions set up like so;

1000 swap
37160 /

First I make software raid partitions on each HDD
Then I "make raid"
Setting the 1000 as swap
And the 37160 as /
Then I'm left with /dev/md0
I think this is correct.
I don't know why it's giving me problems.

This last time, I made it check for bad blocks on every partition I made.
It gave me the same errors . and now it's doing the bad block check.
After the block check it's going to cack out on me again with the same error I know it.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Ah... I see. I haven't done linux software RAID myself, so I can only speculate - are you booting with an md-capable kernel?

It looks like there's lots of info here, however. It does mention that it's pretty easy to convert a single disk into a mirror, so that may be an option if you want to deal with other things first.
 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
Originally posted by: cleverhandle
Ah... I see. I haven't done linux software RAID myself, so I can only speculate - are you booting with an md-capable kernel? It looks like there's lots of info here, however. It does mention that it's pretty easy to convert a single disk into a mirror, so that may be an option if you want to deal with other things first.

I'm gonna read that howto right now!
How'd you find it, cause when I looked for online docs on this stuff I just found old outdated stuff.
And yeah .. it cacked out on me again.
It's an anaconda error though .. so I don't know if the raid is what is doing it.
I'm gonna swap mobo .. (I have identical other mobo that was working with redhat before) and see if that fixes anything.
I just got this one off of FS/FT .. who knows, maybe it's a flakey mobo.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Since you're having so many problems I'd try installing without any RAID first, make sure the drives are actually working properly.

You shouldn't need that HOWTO because the RH installer should setup the proper initrd scripts to run from a md device, although I havn't done it myself.
 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
Thanks Nothinman .. I have used both drives successfully on that board, both with linux and windows....
I have just swapped the mobo for another of the same (same revision number even)
I still got the

The kernel was unable to re-read the partition
on tmp/hda (device or resource busy).
This means linux knows nothing about any
modifications you've made. You should reboot
your computer before doing anything with /tmp/hda


but after pushing ignore to all of those, it continued to format my drives and now it's installing the install image :)
Hopefully, this one'll work
I didn't make it this far on the other board .. ( :| @ other new board)
 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
Can it be the CD drive???
I just got an error while it was installing packages :|
This is getting tedious. I just swapped ram.
I'm gonna swap CD-ROM next.
Error copying some font files or something .. pah
.. will be rebooted
pah
 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
Thanks for your help guys.
Well, it turns out that it wasn't raid woes that were killing my weekend, but a bum cdrom drive instead!!!
I hate mystery hardware.
This drive worked fine last time I installed redhat on it this summer.
I guess it doesn't like the slave/master config with two hdds or something absurd like that .. anyways, measly 4x, past it's prime no doubt.
heh .. and the install goes a lot faster and smoother with my 12x plex (which isn't gonna live on this machine anyways) ..
So yeah .. no raid problems .. but I did accidentally hit "next" at the end of setup when it asked me to make a rescue disk, even though I didn't have a floppy hooked up to the machine .. you'd think that it would say "insert a blank floppy/try again" or something .. but NOOOOO it simply froze. I rebooted and it booted up fine and md0 and all the good raid stuff was happening during startup .. system ran fine .. everything's okay.
Heh .. :)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Just a couple of notes:
RAID 1 is fast on read, but slow on write. So putting a swap partition on a RAID 1 setup may not be the best thing to do speed wise.
CDROMs generally dont operate as fast as hard drives do, so putting a cdrom on the same ribbon as a hard drive will slow the hard drive down.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: n0cmonkey

RAID 1 is fast on read, but slow on write. So putting a swap partition on a RAID 1 setup may not be the best thing to do speed wise.

Yeah, I meant to specify this originally - if you use md, like you are, you don't want to mirror swap. In my original reply, I was assuming you were using ataraid, in which case you necessarily mirror or stripe a whole disk.

 

smp

Diamond Member
Dec 6, 2000
5,215
0
76
Is it possible to raid0 the swap and raid1 the rest?
n0cmonkey, I was afraid of that (the cdrom slowing down the drive) .. I can always pull the cdrom anyways, as it's only a web server mainly this thing and I won't really need it.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Is it possible to raid0 the swap and raid1 the rest?

If you use md you can have any combination of RAID you want. But don't worry about putting the swap on RAID, if you make more than one swap partition and give them the same priority Linux will automatically use them round-robin.

n0cmonkey, I was afraid of that (the cdrom slowing down the drive) .. I can always pull the cdrom anyways, as it's only a web server mainly this thing and I won't really need it.

The only time the CDROM should slow it down is when they're both accessed at the same time (namely, install), the rest of the time as long as the cdrom isn't used it won't matter.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Nothinman
Is it possible to raid0 the swap and raid1 the rest?

If you use md you can have any combination of RAID you want. But don't worry about putting the swap on RAID, if you make more than one swap partition and give them the same priority Linux will automatically use them round-robin.

n0cmonkey, I was afraid of that (the cdrom slowing down the drive) .. I can always pull the cdrom anyways, as it's only a web server mainly this thing and I won't really need it.

The only time the CDROM should slow it down is when they're both accessed at the same time (namely, install), the rest of the time as long as the cdrom isn't used it won't matter.

Ok, my information may be a little outdated or just outright wrong, so please correct me if it is. Most modern cdroms still work at ata 33. IDE is pretty dumb, so if one device is at ata33 the other device will also be stuck at ata33 even if it can operate faster.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Most modern cdroms still work at ata 33. IDE is pretty dumb, so if one device is at ata33 the other device will also be stuck at ata33 even if it can operate faster.

I believe they negotiate max speed seperately, but if both are being used at the same time then the faster device will end up waiting on the slower device more. If only the hard drive is being used it should be fine, I believe.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Nothinman
Most modern cdroms still work at ata 33. IDE is pretty dumb, so if one device is at ata33 the other device will also be stuck at ata33 even if it can operate faster.

I believe they negotiate max speed seperately, but if both are being used at the same time then the faster device will end up waiting on the slower device more. If only the hard drive is being used it should be fine, I believe.

When I reconnect my monitor to my athlon 900 Ill check to see whats up. I dont think the cdrom is attatched anymore. I noticed before the hard drive was at a lower udma level than its maximum when the cdrom was attatched.

Edit: All hard drives are running at UDMA 4 right now, which is the highest they can go I think (ATA 66?). I dont feel like shutting down to hook up the cdrom drive right now, maybe later.