old-www/HOWTO/ATA-RAID-HOWTO/nativeraid.html

612 lines
9.5 KiB
HTML

<HTML
><HEAD
><TITLE
>Installing Native Linux RAID</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="Linux ATA RAID HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Installing Red Hat 7.2"
HREF="installing.html"><LINK
REL="NEXT"
TITLE="Installing on an existing Linux system"
HREF="existing.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux ATA RAID HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="installing.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="existing.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="NATIVERAID">6. Installing Native Linux RAID</H1
><P
>The first step you want to take is to configure your networking and connect your computer to Internet, which is still running under Promise Driver SCSI emulation. Next you will install native Linux RAID.</P
><P
>&#13; <P
></P
><OL
TYPE="1"
><LI
><P
>Go to <A
HREF="http://www.kernel.org/"
TARGET="_top"
>www.kernel.org</A
> and download latest kernel <TT
CLASS="FILENAME"
>2.4.18.tar.gz</TT
>.</P
></LI
><LI
><P
>Configure your kernel:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>cd /usr/src/
tar xvzf linux-2.4.18.tar.gz
cd linux # cd to kernel source directory just created by tar
cp config.txt .config #(See NOTE below to find out where to get config.txt)
make menuconfig</PRE
></FONT
></TD
></TR
></TABLE
>
<DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="90%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>NOTE</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>You can download a working <TT
CLASS="FILENAME"
>config.txt</TT
> file <A
HREF="files/config.txt"
TARGET="_top"
>HERE</A
>. You can, of course, modify this to suit your needs either directly in a text editor or by typing <B
CLASS="COMMAND"
>make menuconfig</B
> as explained above. It is easy to make mistakes if you are editing <TT
CLASS="FILENAME"
>.config</TT
> directly in vi or emacs. Therefore, it is recommended to use Menu Interface by typing <B
CLASS="COMMAND"
>make menuconfig</B
>.</P
></TD
></TR
></TABLE
></DIV
></P
></LI
><LI
><P
>Enable all the following in the kernel statically (NOT as modules):</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> ATA/IDE/MFM/RLL Support --&#62;
&#60;*&#62; ATA/IDE/MFM/RLL Support
IDE/ATA/ATAPI Block Devices --&#62;
&#60;*&#62; Enhanced ATA/IDE/MFM/RLL disk/cdrom/tape/floppy support
&#60;*&#62; Include IDE/ATA-2 Disk Support
[*] Use multi-mode by default
Include IDE/ATAPI CDROM support
[*] Generic PCI IDE chipset support
[*] Sharing PCI IDE interrupt support
[*] Generic PCI Bus master DMA support
[*] Use PCI DMA by default when available
[*] Intel PIIXn chipset support
[*] PIIXn tuning support
[*] Promise PDC202{46|62|65|67|68} support
[*] Special UDMA Feature
[*] Special FastTrack Feature
[*] VIA 82CXXX chipset support
&#60;*&#62; Support for IDE RAID controllers
&#60;*&#62; Support Promise Software RAID (fasttrack)</PRE
></FONT
></TD
></TR
></TABLE
></P
></LI
><LI
><P
>After you have enabled static features as shown above, make any more changes that you would like to make to suit your environment.</P
></LI
><LI
><P
>Save the kernel configuration. It is saved to <TT
CLASS="FILENAME"
>.config</TT
> in the current directory. Please back up this file. If you dont do so, you will regret it later. Copy <TT
CLASS="FILENAME"
>.config</TT
> file in a blank floppy or in <TT
CLASS="FILENAME"
>/root</TT
></P
></LI
><LI
><P
>Build and install the kernel like you normally do, by typing:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>make dep ; make clean ; make &#38;&#38; make install
make modules &#38;&#38; make modules_install</PRE
></FONT
></TD
></TR
></TABLE
></P
></LI
></OL
></P
><P
>Look at <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
> to make sure new lines are added to boot your new kernel 2.4.18. Note that there should not be an <TT
CLASS="OPTION"
>initrd=</TT
> line for this new kernel in <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
>. That is, our new kernel will boot itself without depending on a <TT
CLASS="FILENAME"
>initrd.img</TT
> unlike your current 2.4.7-10 kernel.</P
><P
>Now adjust <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
> as follows:
<P
></P
><OL
TYPE="1"
><LI
><P
>Locate the root=/dev/sdaX line for the new kernel in <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
>. Change this to <TT
CLASS="FILENAME"
>root=/dev/ataraid/d0pX</TT
> where <TT
CLASS="FILENAME"
>X</TT
> is a number <TT
CLASS="FILENAME"
>1</TT
> through <TT
CLASS="FILENAME"
>16</TT
>. Save your changes.</P
></LI
><LI
><P
>Type:</P
><P
>
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>/sbin/lilo</PRE
></FONT
></TD
></TR
></TABLE
></P
></LI
><LI
><P
>If you chose any ext2 partitions during installation, you should comment them out in <TT
CLASS="FILENAME"
>/etc/fstab</TT
> for now.(Best thing is: Forget ext2 in this whole process)</P
></LI
><LI
><P
>Remove all floppies and CDs, and reboot by typing:</P
><P
>
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>sync;sync;reboot</PRE
></FONT
></TD
></TR
></TABLE
></P
></LI
><LI
><P
>At the LILO prompt, type your new kernel lable corresponding to <TT
CLASS="FILENAME"
>2.4.18</TT
> Your computer should then boot into your new kernel.</P
></LI
><LI
><P
>Login and type <B
CLASS="COMMAND"
>df -k</B
> to make sure you see <TT
CLASS="FILENAME"
>/dev/ataraid/d0X</TT
> entries instead of earlier <TT
CLASS="FILENAME"
>/dev/sdaX</TT
> entries.
<DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="90%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>NOTE</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>You may see some errors related to mounting swap device at the time of booting into new kernel. These are harmless. You should edit <TT
CLASS="FILENAME"
>/etc/fstab</TT
> to change any <TT
CLASS="FILENAME"
>sdaX</TT
> entries to <TT
CLASS="FILENAME"
>ataraid/d0pX</TT
> entries.</P
></TD
></TR
></TABLE
></DIV
>
</P
></LI
><LI
><P
>Now, connect your computer to Internet and download <TT
CLASS="FILENAME"
>lilo-22.tar.gz</TT
> (the latest version of lilo program) from the Internet.</P
></LI
><LI
><P
>Remove the existing lilo on your computer by typing: <B
CLASS="COMMAND"
>rpm -e --nodeps lilo</B
></P
></LI
><LI
><P
>Install new version of lilo as follows:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>tar xvzf lilo-22.tar.gz
cd lilo-22 # cd to lilo source directory just created by tar
./QuickInst.sh </PRE
></FONT
></TD
></TR
></TABLE
></P
></LI
><LI
><P
>Say "Yes" to questions the system will ask you.</P
></LI
><LI
><P
>Ignore any errors except if <TT
CLASS="FILENAME"
>/sbin/lilo</TT
> is not created.</P
></LI
><LI
><P
>Adjust <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
> as follows:
<P
></P
><UL
><LI
><P
>Replace <TT
CLASS="FILENAME"
>linear</TT
> by <TT
CLASS="FILENAME"
>lba32</TT
></P
></LI
><LI
><P
>Delete line "<TT
CLASS="FILENAME"
>compact</TT
>"</P
></LI
><LI
><P
>Change <TT
CLASS="FILENAME"
>vga=</TT
> line to <TT
CLASS="FILENAME"
>vga=normal</TT
></P
></LI
><LI
><P
>Change <TT
CLASS="FILENAME"
>boot=/dev/sda</TT
> line to <TT
CLASS="FILENAME"
>boot=/dev/ataraid/dN</TT
> (where <TT
CLASS="FILENAME"
>N</TT
> is the partition number on which your root file system exists. Type <B
CLASS="COMMAND"
>df -k /</B
> to find out your root partition number).</P
></LI
><LI
><P
>Make sure that <TT
CLASS="FILENAME"
>default=linux-2.4.18</TT
> (where <TT
CLASS="FILENAME"
>linux-2.4.18</TT
> is the label given to boot your new kernel: <TT
CLASS="FILENAME"
>2.4.18</TT
>)</P
></LI
></UL
></P
></LI
><LI
><P
>Save changes to the file and type: <B
CLASS="COMMAND"
>/sbin/lilo</B
></P
></LI
><LI
><P
>Reboot the system and cross your fingers.</P
></LI
></OL
></P
><P
><A
HREF="files/lilo.conf2.txt"
TARGET="_top"
>Here is how the final <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
> should look like.</A
></P
><P
>If everything comes up without any errors, time to celebrate!!</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="installing.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="existing.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Installing Red Hat 7.2</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Installing on an existing Linux system</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>