# Highpoint ide raid1 hot swapping

## col

This is a guide on how to setup raid 1 on gentoo using the opensource highpoint drivers and thier nice GUI raid software. The driver supports hot swapping but to do this you need 3+ ide drives & ide mobile racks. This is a great way to backups & also offers security in case of drive failure.

(tested with vanilla kernel 2.4.20 with scsi compiled as modules)

*** Use i686/pentium 3 when compiling your kernel. I have certified the module to work on vanilla kernels 2.4.19, 2.4.20, 2.4.21

```

emerge vanilla-sources

emerge lvm-user

emerge lilo

```

DOWNLOAD THE FOLLOWING FILES:

Driver Version SuSE v2.01 (supports v7.1-8.1)

http://www.highpoint-tech.com/v2.01_suse_rr404.zip

Linux source code release for HPT374

http://www.highpoint-tech.com/hpt374-opensource-v111.tgz

Make sure you have the latest highpoint raid bios installed if you want to use this driver. This is a quick breakdown of how I did it so far on my gentoo 1.4 , gcc3.2, kernel 2.4.20.

- for RAID 1 hot swap you need at least 3 HDD. Setup gentoo on the standard IDE port to get started with a mirror HDD plugged into the highpoint controller that would normally be housed in a hotswap mobile rack.

- install gentoo on /dev/hda (standard ide port). Compile kernel to support ramdisk, initrd & loop....DO NOT COMPILE HIGHPOINT SUPPORT into the kernel. Have a blank mirror HDD plugged into the Highpoint secondary controller

- compiled & insmod the highpoint module as follows.

```

tar -zxf hpt374-opensource-v111.tgz

cd hpt374-opensource-v111

make

```

(with mirror disk plugged in)

```

insmod ./hpt374.o

Warning: loading ./hpt374.o will taint the kernel: no license

  See http://www.tux.org/lkml/#export-tainted for information about tainted modules

Module hpt374 loaded, with warnings

```

Now you should probably check that you can access the mirror drive (usually /dev/sda).

Now you need to create an initrd (initial ramdisk so the kernel can load the hpt374 kernel module & scsi modules at boot time) :

```

lvmcreate_initrd

cd /boot

cp initrd-lvm-2.4.20.gz initrd.gz

mkdir /mnt/initrd

mount -t ext2 -o loop initrd /mnt/initrd/

cd /mnt/initrd/

cp /lib/modules/2.4.20/kernel/drivers/scsi/scsi_mod.o /mnt/initrd/

cp /lib/modules/2.4.20/kernel/drivers/scsi/sd_mod.o /mnt/initrd

cp hpt374.o /mnt/initrd

```

now edit the rc init script to insmod these modules

```

nano linuxrc

```

change the following linuxrc to load the modules

```

#!/bin/sh

/sbin/insmod scsi_mod.o

/sbin/insmod sd_mod.o

/sbin/insmod hpt374.o

```

unmount and zip

```

cd ..

umount /mnt/initrd

gzip -9 /boot/initrd

```

now edit your lilo.conf. mine looks like this :

```

menu-scheme=Wb

boot = /dev/hda

disk = /dev/hda

bios = 0x80

#disk = /dev/hda

#bios = 0x81

prompt

map = /boot/System.map

lba32

delay = 50

timeout = 10

vga = normal   # Normal VGA console

   image = /boot/bzImage

   initrd = /boot/initrd.gz

   append = "root=/dev/sda1"

   label = Gentoo

        image = /boot/bzImage

        append = "root=/dev/hda1"

        label = Backup

   image = /boot/bzImage.old

        append = "root=/dev/sda1"

        label = Old kernel

```

now write the lilo bootloader (I have used grub but lilo seems to work a little better) :

```

lilo

```

tip : modify lilo.conf so it can write to drive 2 (secondary) using bios = & change root=/dev/sda1 to suit, remember to change fstab as well (UNCOMMENT MY EXAMPLE IF YOU NEED TO DO THIS)

- edit the fstab change your partitions from hda to sda

```

shutdown -h now

```

After shutdown unplug the gentoo HDD from the standard IDE controller (hda) and plug it into the Highpoint controller. Also change your bios to boot up from scsi. Restart. Good luck !!....it should now boot using the hpt374 controller. You will see a message at boot time as it loads.

Performance of the highpoint driver seems to be excellent in mirror mode (maxtor 120GIG 7200rpm ide*2) with no extra hdparm options. Be carefull with hdparm as it can corrupt your filesystem.

```

hdparm -Tt /dev/sda

/dev/sda:

 Timing buffer-cache reads:   1424 MB in  2.00 seconds = 712.00 MB/sec

 Timing buffered disk reads:  144 MB in  3.02 seconds =  47.68 MB/sec

```

INSTALLING THE GUI MANAGER:

```

 unzip v2.01_suse_rr404.zip

 tar -zxf GUI/hptraid.tar.gz

 mv GUI/help /usr/bin

 mv GUI/res /usr/bin

 mv GUI/hptraid1.2.6 /usr/bin/hptraid

 mv GUI/hptsvr /usr/bin/hptsvr

 ln -s /usr/lib/libstdc++-libc6.1-1.so.2 /usr/lib/libstdc++-libc6.2-2.so.3

```

add to /etc/conf.d/local.start:

```

echo "starting hptdaemon"

/usr/bin/hptsvr

```

This starts the raid manager GUI (login=RAID,passwd= hpt):

```

/usr/bin/hptraid

```

Click on 127.0.0.1 and select connect (user=RAID, pass=hpt). Select ARRAY MANAGEMENT. You may now create a raid 1 array using the manager by selecting the create array button. The highpoint docs describe this in more detail. Once the array is finished replicating you can pull the mirror disk out (hotswap) and plug in your second mirror drive. If you are going to hotswap use a good quality ide mobile rack.

```

cat /proc/scsi/hpt374/0

Device Driver for HPT374 UDMA/ATA133 RAID Controller Version 1.11

Physical device list

Controller/Bus/ID  Model                Capacity  Status   Array

-------------------------------------------------------------------

1 Channel 1 Master Maxtor 6E040L0        39205MB  Normal   linux

1 Channel 2 Master Maxtor 6E040L0        39205MB  Normal   linux

Logical device list

No. Type         Name                 Capacity  Status

-------------------------------------------------------------------

 1  RAID 1       linux                 39205MB  Normal

```

.....here is what happens when you hot swap your mirror disk:

```

Oct 18 23:16:45 linux kernel: hpt374: Disk failure: Controller 0 bus 1 id 0, Maxtor 54610H6 err=254

Oct 18 23:17:31 linux kernel: hpt374: Disk plugged: Controller 0 bus 1 id 0, Maxtor 54610H6

Oct 18 23:17:31 linux kernel: hpt374: Add RAID 1 member successfully.

Oct 18 23:17:31 linux kernel: hpt374: Mirror rebuild started.

Oct 18 23:48:36 linux kernel: hpt374: Mirror rebuild finished.

```

[img:8d03620fa3]http://www.aloysius.vic.edu.au/snapshot1.png[/img:8d03620fa3]

31 minutes to rebuild the new drive (this is an exact replica including bootloader). Test the build by shutting down & booting the slave drive. I have hot swapped over 100 time & so far it has worked flawlessly.Last edited by col on Wed Nov 12, 2003 6:36 am; edited 21 times in total

----------

## PhanLord

Is it possible to create a mirror image from already installed harddrive ?

I have HPT370 controler and unfortunately allready have installed gentoo1.4rc2 on one of the 2 drives that are connected to HPT370 (both as masters on their respective buses) is there a way for me to "upgrade" system in such fashion so i can have RADI 1, withouth need of reinstalling the whole gentoo ?

----------

## col

 *PhanLord wrote:*   

> Is it possible to create a mirror image from already installed harddrive ?
> 
> I have HPT370 controler and unfortunately allready have installed gentoo1.4rc2 on one of the 2 drives that are connected to HPT370 (both as masters on their respective buses) is there a way for me to "upgrade" system in such fashion so i can have RADI 1, withouth need of reinstalling the whole gentoo ?

 

Yes you can do this with an exisiting system. Follow the procedure and then goto the raid bios and select create array. You can duplicate your drive in the highpoint raid bios for experimenting . There is no need to reinstall gentoo. Make sure the initrd image is loading and the kernel module has loaded before you create the array. Gentoo will always boot off hda1 even if you dont get it right the first time but you may need to specify this from lilo.... i.e gentoo root=/dev/hda1 instead of root=/dev/sda1

----------

## npalmer76

Note that the driver _IS NOT_ open source, since it includes a binary only library which lacks a proper license, and thus loading it will taint an otherwise open source system.

-Nick

----------

## col

my systems along with many other peoples have already been tainted by the common nvidia drivers. this highpoint driver is partial opensource

----------

## npalmer76

Mine too, I just wanted people to be aware of the license if they are perusing this topic.

Thanks for the writeup! I am now running gentoo on a RAID 1 array. I am not booting off of the array yet, but I did get everything to work with grub on my non-RAID drive used to bootstrap the system and boot the other OSes I run. (I now can boot Gentoo, Gentoo on RAID 1, Mandrake, Debian, HURD, and Win2k. He, He. Yes I have more disk space than sense.)

I am having a bit of trouble though. When I try to mount the boot partition of my non-RAID drive (hda1), I don't see the contents of hda1! Instead I see the contents of the initrd ramdisk. I can mount all the other partions on the disk just fine. Did I miss something in the setup? How do I get it to mount that partition properly?

Thanks for any help,

-Nick

----------

## green_buddy

Hi everyone...  great thread.  It's definitely where I want to be going.  I have a few questions that I haven't been able to find answers to yet though, either on highpoint-tech or in any of the gentoo forums.  This thread is the closest one that's come to explaining the process behind getting my highpoint raid1 gentoo system up and running...  anway, now for the questions:

(1) Do I absolutely need all the gentoo gtk based RAID monitor software to run my RAID1 system, or will the drives mirror themselves through the bios without me needing to know about it, and then just letting me access /dev/hda as the main drive?

Please excuse my ignorance here as I'm not really 100% behind how this is working.  Other threads have gotten me confused with whether my hpt370 onboard RAID controller is actually hardware or software RAID.  I mean... it's on my mobo so it's gotta be hardware right?  But someone else in another thread (can't find the refering thread anymore) suggested that it might be software RAID?  How much more confusing can this get?!?  :Wink: 

(2) If it is hardware RAID, and controlled by my mobo's BIOS, why does my linux system OS need to know about it at all... especially for RAID1.  If the hardware is taking care of the mirroring, then if I setup hardware mirroring in the highpoint software that came with my BIOS won't the disks still mirror each other, eventhough the linux system itself doesn't know about it?  I would think in that case that i would just be able to treat my primary RAID1 drive as hda, and not know that there's hda1 and hda2 per se where hda2 is the slave mirror.

Thanks for the help here!  :Smile: 

-green

----------

## npalmer76

The highpoint system is a software RAID system with some hardware assistance. The hardware provides some functionality, but it does not hide the drives from the OS. You can mirror the drive using the BIOS tools, but if you do not install the highpoint driver then the OS sees both drives as /dev/hdx and /dev/hdy. If you then modify the contents of one of the drives, the higpoint controller will no longer allow the drives to function as a RAID even if you load the kernel module until you mirror the drives using the BIOS tools. (Ask me how I know.)

When you load the kernel module the module  hides the /dev/hdx and /dev/hdy devices and creates a scsi device which writes the data writen to that device to both discs. This will show up as /dev/sdz on your system. It will be /dev/sda if you have no other SCSI drives on your system, but may be some other letter depending on what order your BIOS initializes the highpoint controller and the scsi controller.

To get your system to use the RAID features of the controller, instead of using it in Just a Bunch of Disks mode, you must follow the directions in this thread to modify your kernel source, and compile the driver from highpoint. You must create an initrd to load this compiled module before loading the rest of the kernel so that the kernel sees the raid disk as the /dev/sdz device instead of as two disks. If you follow the directions in this thread closely you will get the RAID working properly. If not then the controller will act as just another IDE channel with a bunch of disks on it. You could choose to use the controller in this mode and use a different software RAID system, but I have not tried this. You will also not be able to use the hotswap features of the highpoint driver, but if you don't have hotswap cages (like me) this may not matter to you.

Hope this helps.

-Nick

----------

## green_buddy

 *npalmer76 wrote:*   

> ... If you then modify the contents of one of the drives, the higpoint controller will no longer allow the drives to function as a RAID even if you load the kernel module until you mirror the drives using the BIOS tools. (Ask me how I know.)

 

Ok... you asked for it!  :Wink:   How?

 *npalmer76 wrote:*   

> If you follow the directions in this thread closely you will get the RAID working properly.

 

The part I'm confused about is where to branch from the install docs and perform the kernel build part.  It sounds like I need gnome/kde first to do the above.  So does this assume that I have already built my linux box up to that point before I add the RAID1 configuration?

In my specific case, I'm not interested in using 3 disks and the hotswap feature, just want to setup a redundant mirror.  Furthermore, I'm also confused about the boot sector stuff.  It sounds like the drive mirrors itself completely once it's set up correctly, except for the boot sector.  In that case, what happens if my primary drive (with the boot sector) fails and I have to re-synchronize from the target mirror.  How do I get the boot sector back up with the appropriate partitioning and the like?  I am very much interested in getting the hardware assisted highpoint software raid system up.

Thanks for your insight into this Nick.  Another question I have is whether I just grab and flash the latest and greatest bios, or is the bios specific to the kernel that I'm going to be building from the opensource drivers?

-green

----------

## npalmer76

 *Quote:*   

> Ok... you asked for it!  How? 

 

When I upgraded to GCC 3.2.2 I rebuilt the kernel, but forgot to rebuild the module. When I rebooted the module wouldn't load,  and so ended up with both disks mounted. I had to recompile th emodule and modify the initrd, which meant modifying one of the disks, which meant I had to mirror it again. Took awhile with the 120 gig disks I am using, but it worked fine.  :Wink: 

 *Quote:*   

> The part I'm confused about is where to branch from the install docs and perform the kernel build part

 

You do the kernel build at the regular place in the install. The thing that is different is that once you have the system installed on a regular hard disk, you reboot and then insmod the module for the highpoint raid and then copy everything from the disk you just did the install on onto the RAID. This is why the original author indicates that you need three hard drives. One to do the install on, and then two to make up the RAID that you copy everything onto. The original instructions are lacking the reboot step.

 Once the copy is done you can add the third disk to the RAID if you want. In my case I use only two disks in the RAID, and use the third disk for my boot partition and my Windows drives. (I can't remember when the last time I booted to Windows though, as I run VMWare when I need to now. I have been contemplating wiping those partitions to do something usefull with them, but then that drive wouldn't be spun down all the time. Since the driver never spins up except when I am booting or modifying /boot I don't worry much about it failing.)

You have to modify the kernel source according to the directions in the GUI. You don't actually have to use the GUI, and I never have, so you don't need KDE to get the RAID working. Why these directions don't come eith the module I don't know, but they don't.

To save you the download of the gui:  you have to comment out the stuff in your kernel source that would make the kernel recognize the highpoint chip in drivers/ide/ide-pci.c. There are two entries in the ide_pci_chipsets array for the highpoint chips (DEVID_HTP34x and DEVID_HTP366). Once this is done you can compile the kernel as the install instructions state making sure not to include highpoint raid support in your kernel configuration.

Once the kernel is compiled and the install is done on the hard drive which is not going to be part of the array you can reboot into the new gentoo system. You can then insmod the module and see the /dev/sdz device that the module creates. You have to do this reboot since the kernel that comes on the live cd doesn't have the source modified not to recognize the Highpoint controller. 

You can now treat the /dev/sdz drive as you would any other, and copy your install from the drive your are running on onto the RAID. The original author does this using dd, but you can use cp if you want. I did it this way since I did the original install on one smaller partition, and then copied everything onto multiple partitions on the RAID. Be sure to modify the /etc/fstab on the /dev/sdz system to mount those drives instead of the drives on the /dev/hdx system you did the initial install on. I screwed this up the first reboot.

 *Quote:*   

> Furthermore, I'm also confused about the boot sector stuff. It sounds like the drive mirrors itself completely once it's set up correctly, except for the boot sector.

 

Sorry, I can't help you here. I use another disk as my boot partition so I don't boot off of the RAID. I never even tried to get that working, as I wanted to maximize the space on the RAID for things I use. I almost never mount my boot partition, so why use the space on disks I use a whole lot. Furthermore, since I use the RAID all the time the disks are more likely to fail. My boot disk almost never is spun up which means that the probability of it failing are pretty low.

 *Quote:*   

>  Another question I have is whether I just grab and flash the latest and greatest bios, or is the bios specific to the kernel that I'm going to be building from the opensource drivers? 

 

 I flashed the latest bios and grabbed the latest module source off of the highpoint site, and everything worked fine. I think the important thing is to match the BIOS version with the module version. The kernel cares not what BIOS you are using, but the module may depend on features in a particular BIOS version.

-Nick

----------

## col

the mirror drive is an exact replica of the master drive, boot sector and all. If you ever need to you just edit your grub boot command from /dev/sda to /dev/hda and it will boot on a standard controller.

 I have recently setup a Highpoint 374 controller using the new partial opensource drivers. It works great on kernel 2.4.20  (without modification) gentoo 1.4. I used grub as my bootloader this time. Highpoint have some new raid management software which is very cool. You can create mirrors,  stripe sets & spares using the gui managent tools. It also supports remote raid managment & email event notifications.

I have been running 2 servers on RAID 1 for about a year now & they have been rock solid. I hot swap the mirror drives every day as a fast/cheap way to backup around 100GIG of data. I have never had any file system errors on my mirror drives.

----------

## green_buddy

Thanks a ton for the great information both npalmer76 and col.  Just great stuff...

So here's the kicker.  My highpoint controller is onboard my KT7A-RAID mobo.  I've been trying to figure out all day and almost all of last night (sleep is hard for me when all I can think about is the next technology problem I want to solve  :Wink:  how to upgrade the highpoint bios onboard my mobo as it seems the mobo's latest and greatest bios flash doesn't support the necessary highpoint bios required for all this to work.  And to make matters worse there are 2 seperate versions of the KT7A-RAID bios flashing software... KT7A-RAID and KT7A-RAID v1.3.  This calls for a new forums emoticon... the   :Confused:  (confused) emoticon no longer applies here... we need one for me pulling my hair out in utter confusion!  :Wink: 

I'm assuming I need to install the latest SuSE_v133_v370_372.zip file from the highpoint site.  Could you clarify that that's the case?  I'm a bit of a noob to modprobe and insmod and custom kernel building, but now's not the time to worry about getting my feet wet here... I gotta jump in head first!   :Very Happy: 

Thanks for all your help with this guys!

-green

----------

## Kaeno

Hey Green_buddy

You can find unofficial bios updates for you're abit kt7a here

http://www.sudhian.com/showfaqs.cfm?fid=2&fcid=23#196

Just look at the desciption and get the once with the newest highpoint bios.

I would suggest the A9_2.34 or 9R_2.34 depending upon which mb version you have.

To identify which mb version you have, if i remeber correctly there is a white sticker on the motherboard with the version number. U can't miss it, it says a serial number and version like 1.3 or 1.1.

I upgraded my own kt7a a few month back with the modified bios from the link above, and it worked like a charm. But remember it could go wrong...

/Kaeno

----------

## drakos7

can someone send their init script. I am not profecient enough to write my own and the one provided in the first post does not work for me. Thanks! In essence, all I want is to get the GUI working.

----------

## green_buddy

 *Kaeno wrote:*   

> 
> 
> You can find unofficial bios updates for you're abit kt7a here
> 
> http://www.sudhian.com/showfaqs.cfm?fid=2&fcid=23#196
> ...

 

Thank you so much, that's exactly what I was looking for!  :Smile:   I can now continue on with my quest.  I'll continue to post back with progress and questions!  :Cool: 

-green

----------

## col

 *drakos7 wrote:*   

> can someone send their init script. I am not profecient enough to write my own and the one provided in the first post does not work for me. Thanks! In essence, all I want is to get the GUI working.

 

look above at the original post. I included an init script.....if this doesnt work for whatever reason, you can simply put /usr/bin/hptsvr in your /etc/conf.d/local.start ..... ( its unlikly you will ever need to restart it )

For me the SUSE (latest version) compiled raid management software works fine. It requires gtk support (I have both kde & gnome installed). You have to install it manually but so long as you put the files in the correct place it works fine.

----------

## green_buddy

 *Kaeno wrote:*   

> Hey Green_buddy
> 
> I upgraded my own kt7a a few month back with the modified bios from the link above, and it worked like a charm. But remember it could go wrong...
> 
> /Kaeno

 

Could you point me to the bios settings for what your boot directives are.  I'm having trouble getting my system to boot from the hard drive directly which is at /dev/hde.  For whatever reason I can't get the machine to boot up from the drive without first loading the grub boot disk I created and going through the appropriate setup steps.  I think it's probably being caused by the machines bios settings, although the install docs here are troublesome for me.  At the end of the Install Docs it says:

 *Quote:*   

> Important: Remember if you are running hardware RAID, you must use the bootdisk for the first reboot. then go back and install grub the way everyone else did the first time. You are done -- congratulations! 
> 
> 

 

What's that all about?  Go back and install grub the way everyone else did the first time?  Huh?  What did I miss here?

Thanks,

-green

----------

## green_buddy

Is there anyone who's successfully booting off a hard-disk attached to their raid controller only and not using a 3rd hard drive connected to their regular/primary (non-raid controlled) ide controller?

If so, an explanation of how would be greatly appreciated.  I'm having trouble booting from my hard drive on /dev/hde which is partitioned thusly...

```
/dev/hde1 --> /boot (ext3)

/dev/hde2 --> /swap (swap)

/dev/hde3 --> /root (reiserfs)

```

My bios boot order is (1) cdrom, (2) floppy, (3) hdd0 on my kt7a-raid mobo.  I was successfuly at upgrading my bios to the version kaeno pointed me to in his post above.  But I've only ever been able to boot into my kernel using the grub floppy bootdisk I created (which is suggested in the installation guide).  When I don't have either a cd or floppy disk in their respective drives (hoping that the machine will boot from the hard-drive), I just get the message...

 *Quote:*   

> Verifying DMI pool data...

 

And there it hangs... waiting for what?  I don't know!  :Shocked: 

Once I can get passed this point I would assume I can go ahead and start installing X and then gnome, etc to get to a point where I can start going through the steps recommended by col's first post to this thread.  Until then I'm stuck playing around with grub and trying to figure out why I can't boot from /dev/hde1.   :Rolling Eyes: 

Thanks for any and all help!

-green

----------

## green_buddy

 *col wrote:*   

> the mirror drive is an exact replica of the master drive, boot sector and all. If you ever need to you just edit your grub boot command from /dev/sda to /dev/hda and it will boot on a standard controller.
> 
> I have recently setup a Highpoint 374 controller using the new partial opensource drivers. It works great on kernel 2.4.20  (without modification) gentoo 1.4. I used grub as my bootloader this time. Highpoint have some new raid management software which is very cool. You can create mirrors,  stripe sets & spares using the gui managent tools. It also supports remote raid managment & email event notifications.
> 
> 

 

I was wondering if you could share your grub configuration and provide information on where the grub raid1 installation differs from the lilo instructions in your initial post to this thread?

Thanks,

-green

----------

## Kaeno

 *green_buddy wrote:*   

> 
> 
> I was wondering if you could share your grub configuration and provide information on where the grub raid1 installation differs from the lilo instructions in your initial post to this thread?
> 
> Thanks,
> ...

 

This is my grub.conf (Or at least part of it)

```
title=Firewall (Gentoo-2.4.19-r10)

root (hd0,0)

kernel (hd0,0)/bzImage-2.4.19-gentoo-r10 pci=noacpi root=/dev/sda3

initrd (hd0,0)/initrd.gz

```

Remember the raid drive is /dev/sda not /dev/hde, that is because the highpoint drivers when loaded acts as a scsi controller, but the kernel still detect the ide controller, so /dev/hde is only the first harddisk in you're raid. If you want to tell the kernel to ignore the raid controller, add this line to the grub kernel line:

```
ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0 ide3=0 ide4=0 ide5=0 ide6=0 ide7=0 ide8=0 ide9=0

```

all on one line, so it look like this

```
kernel (hd0,0)/bzImage-2.4.19-gentoo-r10 pci=noacpi root=/dev/sda3 ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0 ide3=0 ide4=0 ide5=0 ide6=0 ide7=0 ide8=0 ide9=0

```

Again all on one line.

Hope this helps

/Kaeno

----------

## green_buddy

Kaeno,

Thanks for that... what does the

```
pci=noacpi
```

 directive mean?  I noticed you have a kt7a-raid mobo also... what are your bios settings to get the bios to boot off the hard-disk attached to the raid controller?  Right now my boot order is...

cdrom

floppy

hdd0If I set it to boot from hdd0 first, then it just hangs and says... 

 *Quote:*   

> Verifying DMI pool data...

  and never gets to the boot partition on the hard-disk at all.

Any thoughts?

-green

----------

## col

For my last install on a hpt374 controller here is how I did it using vanilla-sources 2.4.20 :

1 : I had my gentoo installed on the standard IDE controller.

2 : I compiled the hpt374 kernel module and created an initrd with this module loading from the ram disk. To test the module have your mirror drive installed on the hpt374 controller and try insmodding the module (the module wont load if there are no drives plugged in). Make sure it insmods ok and you see the drive in /dev/sdx. Also reboot & make sure your initrd is working and loads the module at boot time.

3 : shutdown & plug your gentoo drive into the hpt374 controller.

4 : Now at boot & tell grub to use /dev/sdx using "e" at the boot menu. Now start hptsvr daemon and load the raid management software. Create a new RAID 1 mirror with the spare drive and select the create & duplicate option.

5 : edit grub menu.lst to load /dev/sdx instead of /dev/hdx . Re-install grub on the newly created mirror

6 : edit fstab to use sdx instead of hdx

7 : test and reboot.

8 : if you get stuck you can always boot the gentoo cdrom to edit your configs.

I found this much easier than the hpt372 that I used the first time. I did not need to edit the kernel source & had no problems getting grub to work. Also the raid management software is much better because it lets you create raid disks on the fly.

----------

## Kaeno

Hey green

 *green_buddy wrote:*   

> what does the
> 
> ```
> pci=noacpi
> ```
> ...

 

To be honest i cant remeber what it does, but ignore it, the grub.conf was taken from another computer.

 *Quote:*   

> I noticed you have a kt7a-raid mobo also... what are your bios settings to get the bios to boot off the hard-disk attached to the raid controller?

 

Try settings the first boot device to:

- ATA100RAID

ftp://ftp.abit.com.tw/pub/download/fae/kt7a-raid-e.pdf

Page 50 - First Boot Device:

Hope this helps

/Kaeno

----------

## green_buddy

 *Kaeno wrote:*   

> Hey green
> 
> Try settings the first boot device to:
> 
> - ATA100RAID
> ...

 

Just to make sure I tried that again, but no dice.  Same thing *Quote:*   

> Verifying DMI pool data...

  and then tries to boot from the cd.  Aaaauuuggghhh!   :Twisted Evil: 

I feel like Charlie brown trying to kick a football being held by Lucy!  Good grief!   :Rolling Eyes: 

-green

----------

## int1

You all may want to try the experimental LiveCD at:

http://cvs.gentoo.org/~livewire/livecd-experimental-05-16-2003.iso

It uses the linux-2.4.21-rc2 kernel as a base, which has improved highpoint support in it, especially regarding RAID.

The ac-sources based on this kernel (right now it's linux-2.4.21-rc2-ac2) have some good stuff as well.

int1

----------

## Kaeno

 *green_buddy wrote:*   

> Just to make sure I tried that again, but no dice.  Same thing *Quote:*   Verifying DMI pool data...  and then tries to boot from the cd.  Aaaauuuggghhh!   

 

And you are sure that after the first install, and the boot from the grub floppy, you installed grub correctly on /dev/sda (MBR), or if that doesent work, you might try installing it on /dev/sda1, and install a normal windows MBR using a win98 bootup disc by executing fdisk /MBR

/Kaeno

----------

## green_buddy

Col,

I need a little further explanation in my case... sorry about being so needy here.  For now I've given up on booting directly into the hard-disk and am going to use a boot floppy until things get cleared away...  So back to my questions on the raid1 install... *col wrote:*   

> - Modify kernel source (as shown in highpoint docs in that come with the GUI, they are good).
> 
> - compiled & insmod the highopint module. I can now access /dev/sda
> 
> - emerge lilo lvm-user
> ...

 I've gotten this far and can now access both /dev/sda and /dev/hde.  Well... I can mount stuff on /dev/hde, but not yet on /dev/sda.

At this point I'm skeptical about moving on, 'cause in my case, /dev/sda is /dev/hde.  /dev/hda in my case is my cd-rom drive.  I don't have an extra disk lying around to attach it to the regular (non-raid controlled) ide controller.

I'm worried about doing a mke2fs -j /dev/sda1, 'cause I already have an ext3 partition on /dev/hde1, as well as the swap and root partitions as well.  Do I just skip the steps for creating partitions on /dev/sda?  'Cause as far as I understand it, /dev/sda and /dev/hde are the same drives in my case.  I want to avoid corrupting /dev/hde if I start creating partitions on /dev/sda.  Am I being clear?  :Confused: 

What next?

Thanks,

-green

----------

## col

 *green_buddy wrote:*   

> Col,
> 
> I need a little further explanation in my case... sorry about being so needy here.  For now I've given up on booting directly into the hard-disk and am going to use a boot floppy until things get cleared away...  So back to my questions on the raid1 install... *col wrote:*   - Modify kernel source (as shown in highpoint docs in that come with the GUI, they are good).
> 
> - compiled & insmod the highopint module. I can now access /dev/sda
> ...

 

ok the partitions are the same thing so if you format /dev/sda1 you will also format /dev/hda1 assuming that they are the same physical disk. I dont see the point of bothering with this if you only have one disk ?

----------

## green_buddy

 *col wrote:*   

> ok the partitions are the same thing so if you format /dev/sda1 you will also format /dev/hda1 assuming that they are the same physical disk. I dont see the point of bothering with this if you only have one disk ?

 

The long of it...  I'm sorry if I haven't been clear enough.  I have two 80Gig disks, but was having a significant amount of trouble just getting my install to work with both disks, so decided to try and take one of the potential problems out of the equation in order to simplify the situation.  Your reply to the second post seemd to indicate that you can indeed install the raid1 on an already installed system.  Another problem was that I only have 2 drives, and not 3 which seems to make the raid1 setup much different than your instructions.

I've now installed the other drive to try and get to a point where I can continue to move through your instructions...

The short of it... I have 2 drives.  Mobo onboard Highpoint raid controller.

Thanks for all the helping with this.

-green

----------

## green_buddy

 *green_buddy wrote:*   

> The short of it... I have 2 drives.  Mobo onboard Highpoint raid controller.

 

Scratch that... I went out and bought another drive (smaller) over the weekend to hold the small boot partition...  Hopefully that will make things a little easier from here on out, and so far it has!  :Smile: 

It's amazing how far drives have fallen in price lately that you can pick up 40Gig for under $40  for a WD-ATA/133 drive... talk about cost effective.  I was hoping I could pick up a 5Gig disk for under $5 bucks, but apparently they don't make 'em that small anymore!  :Wink: 

 :Question:  col:

I have a question... I now have 3 partitions on both /dev/hda and /dev/sda.  It looks as though you have a single massive partition.  I was hoping to get everything working using a partitioning schema similar to the one used in the install docs, where...

```
/dev/hda1 && /dev/sda1 = ext3

/dev/hda2 && /dev/sda2 = swap

/dev/hda3 && /dev/sda3 = reiserfs
```

Can you clarify what you're doing when you call for a 

```
dd if=/dev/hda1 of=/dev/sda1
```

I assume your intention is to copy the root partition, but it seems you have boot and root on the same partition.  Is there another way of accomplishing that?  I was thinking that I could do a...

```
rsync -a /mnt/source/ /mnt/destination
```

  After mounting both source and destination to /dev/hda3 and /dev/sda3 respectively.

For whatever reason when I do

```
dd if=/dev/hda3 of=/dev/sda3
```

 the process doesn't seem to complete.  Granted... it takes a very long time I'm sure, but over an hour is a little ridiculous no?  :Confused: 

Also, the rest of the install process for this is a little different as well wrt the initrd stuff.  Do you forsee any problems with the route I'm taking due to the fact that I am using 3 seperate partitions and you only seem to be using 1?

Thanks again,

-green

----------

## col

yes there are other ways of cloning the partitions that you can find in these forums...if you read my summary of how I setup the hpt 374 controller, it is a much simpler procedure....no dd, no modify kernel & kernel recompile.....also grub works now. There has been a new driver released since I wrote the first guide so next time I set up a hpt374 controller I will carefully document it and update the original howto. If you check back in a few weeks time I will post a new howto based on the latest highpoint software. 

The RAID 1 does not care about how your partitions are set up....it mirrors everything including the partition tables & boot sector. The mirror disk is an exact replica of the master disk.

----------

## col

I have updated the howto so it should be much easier to follow now.  It is written for the hpt374 controller.

----------

## puke

Can the latest gentoo-sources be used now, instead of the vanilla-sources?

----------

## col

I used vanilla because I was having problems compiling the kernel module with other kernels. If the module compiles & insmods then you can use it.

----------

## puke

 *Quote:*   

> I used vanilla because I was having problems compiling the kernel module with other kernels. If the module compiles & insmods then you can use it.

 

What about stability?  Does the module degrade system stability in any way?

----------

## col

 *puke wrote:*   

>  *Quote:*   I used vanilla because I was having problems compiling the kernel module with other kernels. If the module compiles & insmods then you can use it. 
> 
> What about stability?  Does the module degrade system stability in any way?

 

Not with the kernels I have been using ....I have used both the hpt372 & hpt374 modules on 2* servers since october 2002 & both have been running perfectly....since then I have gone through 2*2.4 vanilla kernels both which worked perfectly.

----------

## fredbear5150

I've been following this thread as the method by which I will ultimately get a Raid 0/1 setup working on my setup - an A-Bit KX7-333R with built in HPT 370/372 IDE Raid Controller. I'm trying to get two RAID 1 mirrors up first.

I made three partitions on the first drive with it being /dev/hda:

hda1 = boot (100 MB)

hda2 = swap (1 GB)

hda3 = / (8 GB)

Ultimately, I then want to create a /home filesystem which uses the remainder of the first disc and the complete second disc of the pair as a single LVM volume of about 150GB (I need SERIOUS file storage!   :Laughing:  ) I haven't, yet, got as far as creating the LVM volume so I've just been working on the 3 partitions I've created so far.

Following the instructions here, using the 2.4.22 vanilla sources and the latest Highpoint driver version (v1.31), I managed to create a disc that loaded initrd with the scsi modules and the hpt37x2 module and could boot up fine. I could see the mirror drive on the HPT controller also.

However, when I went and moved hda to the hde position on the Highpoint controller and changed the BIOS to boot off of ATARaid first, the Highpoint controller could not find a bootable disk! The RAID was off-line and the controller did warn me about this and asked if I wanted to rebuild the RAID1 mirror. I said "No" and continued trying to boot - all I did do was make sure the controller had the hde disk as the bootable one.

When this didn't work, I put the drive back in hda and tried to boot but it wouldn't. To my horror, when I botted the Gentoo CD and did an fdisk on /dev/hda just to see the partition status, the partitions had disappeared!

I'm now going through the install process again by building on the hda drive. The questions I have are really these:

1) When I get to plugging the hda drive into hde with the mirror plugged in also, do I initiate the RAID1 from the Highpoint BIOS or just continue booting and use the RAID Management tools to set the RAID up?

2) Does the HPT BIOS write anything to the drive when it gets turned into a RAID drive? I cannot understand why the partitions got overwritten. Also, prior to this, the same box ran RedHat 7.2 in RAID 1 across two 80GB drives. When I urgently needed a spare drive, I took the RAID off of the box and put the hde drive into hda. Apart from having to re-do lilo.conf and fstab, it booted up fine so it proves that you can move RAID drives onto normal IDE drives easily.

3) Once I've got the first mirror pair up, I'll put the next pair in and set the RAID one mirror up on those from the Highpoint BIOS. Then I'll just use LVM to create a single logical volume across the remainder of hde and the whole of HDF. Is this the correct attack plan or should I instead create a RAID 0/1 setup in the Highpoint BIOS?

Obviously, once I've done this build and got the drive to boot as hda with 

the hpt module loading from initrd, I'm a bit concerned about moving the drive onto the Highpoint controller because it seemed to get overwritten last time - again, I DEFINITELY did not set up the RAID1 mirror in the Highpoint BIOS.

Any help would be appreciated - the How-To is good as far as it goes, I just need to understand these last couple of points.

----------

## NicholasDWolfwood

Lemme ask something...if I want to use a 2.6 kernel with this, will it work?

I've tried to setup software RAID, the problem is that I've already made a RAID0 array, so I can't remake a new array, unless I'm missing something...I'd like to upgrade my file server to the 2.6 kernel series (2.6-test6-mm4 to be exact) but there's no hardware RAID support, much to my dismay. The server is currently running a 2.4.21 vanilla, patched for XFS support...

----------

## col

 *Quote:*   

> 
> 
> 1) When I get to plugging the hda drive into hde with the mirror plugged in also, do I initiate the RAID1 from the Highpoint BIOS or just continue booting and use the RAID Management tools to set the RAID up?
> 
> 

 

When you remove the drive from the standard IDE to the hpt IDE you do not have to have the mirror disk plugged in. The disks can be hot plugged. You do not have to set up the raid in the bios. With the raid bios you can tell it to create the raid only then power down and remove the disk. Boot linux up and the open up the Highpoint gui manager. Then hot plug in the mirror drive and do a rescan. It will start rebuilding the mirror. This can also be done using the gui manager but your mirror disks must be blank with no partitions. Either way it should work. 

 *Quote:*   

> 
> 
> 2) Does the HPT BIOS write anything to the drive when it gets turned into a RAID drive? I cannot understand why the partitions got overwritten. Also, prior to this, the same box ran RedHat 7.2 in RAID 1 across two 80GB drives. When I urgently needed a spare drive, I took the RAID off of the box and put the hde drive into hda. Apart from having to re-do lilo.conf and fstab, it booted up fine so it proves that you can move RAID drives onto normal IDE drives easily.
> 
> 

 

I have never lost any data myself. The only way I can think of is you have cloned the blank drive on the good drive using the highpoint bios ? this is easy to do if you plug your master into the wrong ide port. This is why I prefer to use the raid gui instead of the bios.

I also have an extra menu option in my lilo meny to boot off the standard ide port (hda) which works fine.

 *Quote:*   

> 
> 
> 3) Once I've got the first mirror pair up, I'll put the next pair in and set the RAID one mirror up on those from the Highpoint BIOS. Then I'll just use LVM to create a single logical volume across the remainder of hde and the whole of HDF. Is this the correct attack plan or should I instead create a RAID 0/1 setup in the Highpoint BIOS? 
> 
> 

 

yes I guess this sounds like it will work. I dont use LVM myself though.Last edited by col on Mon Nov 03, 2003 4:06 am; edited 2 times in total

----------

## col

 *NicholasDWolfwood wrote:*   

> Lemme ask something...if I want to use a 2.6 kernel with this, will it work?
> 
> I've tried to setup software RAID, the problem is that I've already made a RAID0 array, so I can't remake a new array, unless I'm missing something...I'd like to upgrade my file server to the 2.6 kernel series (2.6-test6-mm4 to be exact) but there's no hardware RAID support, much to my dismay. The server is currently running a 2.4.21 vanilla, patched for XFS support...

 

I dont know  ? to test it , compile your kernel without highpoint support and then try compiling the highpoint module. Being only partial opensource there is a chance it may not work but if it builds / insmods the you should be ok with 2.6.

----------

