  Boot + Root + Raid + Lilo : Software Raid HOWTO
  Michael Robinton, Michael@BizSystems.com
  <mailto:michael@bizsystems.com>
  v1.04, July 20, 2000
  The Linux Japanese FAQ Project (JF@linux.or.jp)
  v1.04j, February 19, 2001

  ̕ł raidtools 0.90 g[gt@CVXe RAID ɐݒ
  AWIȃu[g[_ł LILO 𗘗pāANɃ[g
  }Eg邱ƂŁAu[g\ RAID ̃VXe\z@qׂ
  B̃fBXÑf[^𑹂ȂƂȂA܂ł̃fBXN RAID1
   RAID5 ̃~[Zbgɕϊ邱Ƃグ܂B
  ______________________________________________________________________

  ڎ

  1. ͂߂
     1.1 ӎ
     1.2 oO
     1.3 쌠\

  2. Ƃn߂OɕKvȎ
     2.1 KvȃpbP[W
     2.2 {̍ŐVł̓
     2.3 Гǂł
     2.4 RAID ֘Ȁ

  3. u[g\ RAID
     3.1 WI LILO  RAID 1 u[g
     3.2 RAID u[ĝ߂ lilo.conf ̏ڍׂȐ

  4. RAID łȂVXe RAID1/4/5 ɉP
     4.1 菇PFVJ[l̏
     4.2 菇QFV RAID ̂߂ raidtab ݒ
     4.3 RAID 쐬tH[}bgAĐݒ肷
     4.4 V RAID foCXɌ݂ OS Rs[
     4.5 V RAID eXg
     4.6 RAID ACɌÂfBXN𓝍

  5. t^`Fraidtab ̗
  6. t^aFSCSI RAID5 ̎Ql
  7. t^bFinitrd gp ide RAID10
  8. t^cFinitrd  gp ide RAID1-10
  9. {ɂ

  ______________________________________________________________________

  1.  ͂߂

  1.1.  ӎ

  ́̕AHarald Nordgaad-Hansen <hnh@bukharin.hiof.no
  <mailto:hnh@bukharin.hiof.no>> 񋟂ĂꂽƁARAID [O
  Xg Martin Bene <mb@sime.com <mailto:mb@sime.com>> |XgR
  gt lilo.conf t@C̓eɊÂč쐬Ă܂B
  vɂւ񊴎ӂĂ܂B̕ɂāÁȀ
  ƁARAID [OXg Linux RAID Project Ŋ􂷂吨̕X
  ʂAՂ̂ɂ܂Ƃ߂悤w͂܂BāAu
  [g\ȃ[g RAID ̍\zƗeՂɂ邽߁Aۂ̉^p𐔑
  ܂B{ł́A܂PhCũVXe RAID VXe
  ɕϊ@ɂāAЂƂ̃ZNVĂ܂BvɁA
  ̕ϊ܂ǂ́Au[g\ȃ[g RAID ̗ɂ
  ܂B
  1.2.  oO

  ̕ɂoO͂͂łB񍐂AC
  B

  1.3.  쌠\

  This document is GNU copyleft by Michael Robinton
  Michael@BizSystems.com <mailto:michael@bizsystems.com>.

  Permission to use, copy, distribute this document for any purpose is
  hereby granted, provided that the author's / editor's name and this
  notice appear in all copies and/or supporting documents; and that an
  unmodified version of this document is made freely available.  This
  document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY, either expressed or implied.  While every effort
  has been taken to ensure the accuracy of the information documented
  herein, the author / editor / maintainer assumes NO RESPONSIBILITY for
  any errors, or for any damages, direct or consequential, as a result
  of the use of the information documented herein.

     Ql
        ̒앨́AҋyѕҏW҂̎Ƃ̔zzƂׂĂ̕
        yѕ⏕I앨ɋLڂACĂȂ앨R
        ɓł悤zĂꍇɌAp̖ړI킸Ag
        pEEЕz邱ƂłB̒앨́Aǎ҂̖ɗ
        Ӑ}č쐬ꂽ̂ł邪A̕ɂ́AIEَI
        @Ȃۏ؂ƂȂȂBmȏLq悤ő̓w
        𕥂Ă͂̂́A̒앨ɋLڂꂽ̗pɋN
        ߌ⑹ɂāAҁEҏWҁEǗ҂͈ؐӔC𕉂
        B

  2.  Ƃn߂OɕKvȎ

  KvȃpbP[WƁA RAID ̍\zƉ^pɊւ悭鎿ɓĂ
  镶ƂȉɎ܂BȒPɂłǂł炱̎ɂ͖ڂ
  ĂB

  2.1.  KvȃpbP[W

  ܂͈ȉ̃pbP[W̍ŐVo[W肷Kv܂B

  o  RAID, initrd T|[gĂ Linux J[l

       M҂ linux-2.2.14 <ftp://ftp.kernel.org/pub/linux/ker-
       nel/v2.2/>  kernel.org 肵܂B

       󒍁F҂ linux-2.2.17 <ftp://ftp.ker-
       nel.org/pub/linux/kernel/v2.2/>  kernel.org 肵܂
       B

  o  ftp://ftp.kernel.org/pub/linux/daemons/raid/alpha/
     <ftp://ftp.kernel.org/pub/linux/daemons/raid/alpha/> ŐVł̃c[
     ƃpb`ŁA RAID1/4/5 ̃T|[gǉ܂B

       M҂ http://people.redhat.com/mingo/raid-patches/
       <http://people.redhat.com/mingo/raid-patches/raid-2.2.14-B1>
       gĂ܂B
       󒍁F҂ http://people.redhat.com/mingo/raid-patches/
       <http://people.redhat.com/mingo/raid-patches/raid-2.2.17-A0>
       gĂ܂B

  󒍁Fu[gɊւĖ҂͍ŏIIɂ̕ŏqׂĂ@gp
  ܂łB́A̗pfBXgr[V Red Hat Linux
  6.2J łB Red Hat Linux 6.1  GUI CXg[p
   RAID1 ւ̃CXg[ƁARed Hat ɂgꂽ LILO gp
  邽߁A RAID1 ̃u[gWŉ\ƂȂ܂ (VJ[l
  gpꍇ́A RAID pb`KvɂȂ܂)B̏ڍׂɂĂ The
  Software-RAID HOWTO
  <http://www.linuxdoc.org/HOWTO/Software-RAID-HOWTO.html>({
  <http://www.linux.or.jp/JF/JFdocs/The-Software-RAID-HOWTO.html>) Q
  ƂB

  2.2.  {̍ŐVł̓

  ̍̕ŐVo[WN
  <ftp://ftp.bizsystems.net/pub/raid/Boot+Root+Raid+LILO.html>ɂ
  BƒĂ͑劽}łB

  Boot Root Raid + LILO HOWTO

  LaTeX (DVI  PostScript ܂)CeLXgCHTML ̊etH[}bg
  œł܂D

       http://www.linuxdoc.org/HOWTO/Boot+Root+Raid+LILO.html
       <http://www.linuxdoc.org/HOWTO/Boot+Root+Raid+LILO.html>

  SGML  HTML `œł܂D

       ftp.bizsystems.net/pub/raid/ <ftp://ftp.bizsys-
       tems.net/pub/raid/>

  2.3.  Гǂł

  RAID0 gȂARAID1/5 gpȂA܂

       /usr/src/linux/Documentation/initrd.txt

  ͓ǂłB

  ꂩ raidtools pbP[Wɕt̕}jAǂł
  B

   Software-RAID-HOWTO.html
  <http://metalab.unc.edu/mdw/HOWTO/Software-RAID-HOWTO.html> EEE

  2.4.  RAID ֘Ȁ

  ֌W郁[OXgȉɗ񋓂܂\\

  o  ͂Ђ肵Ă悤ł\\majordomo@nuclecu.unam.mx
     <mailto:majordomo@nuclecu.unam.mx>  subscribe raiddev ̓ẽ
     [𑗂ΎQł܂B

     e raiddev@nuclecu.unam.mx <mailto:raiddev@nuclecu.unam.mx> 
     [𑗂܂B

  o  RAID J\\majordomo@vger.rutgers.edu
     <mailto:majordomo@vger.rutgers.edu>  subscribe linux-raid ̓e
     ̃[𑗂ΎQł܂B

     e send mail to: linux-raid@vger.rutgers.edu <mailto:linux-
     raid@vger.rutgers.edu> փ[𑗂܂ (ꂪłȃ[
     OXĝ悤ł)B

  3.  u[g\ RAID

  Linux ł RAID0/1/5 ̊{IȐݒ́A̕ŏڍׂɂ
  Ă̂ŁA̕ł͎グ܂B[g RAID ݒƁAWI
   LILO łu[g\Ȃ̂ƂɎg݂܂B LILO 
  (man y[Wł͂Ȃ) \[X raidtools-0.90 ƈꏏ̂ꂼꕶ́A
  u[g̏ڍׂƃVXẽu[g̃p[^AėpI RAID ݒ
  ɂĂグĂ܂B

  ł͂Q̃ViIグ܂B̃ViÍARAID ̃u[g
  \ȃ[g̐ݒƁA RAID łȂVXe RAID ̃u[g\ȃ
  [gփf[^ϊ邱ƂłB

  3.1.  WI LILO  RAID 1 u[g

  u[g璷ɂێȒPɂɂ́A RAID1 ݒ肵
  VXefBXN /boot Ƀ}Eg܂BLILO ̓foCX 0x9?? F
  Au[g̃foCX̏܂B͂̎
  RAID TuVXegԂɂȂĂȂłBPȑΏƂ
  āAhCu (Q) ̍\ (geometry)  LILO ɓnƂł܂B
  ̏񂩂ALILO ́AJ[l RAID1 p[eBVɂĂAJ
  [l[h邽߂ɕKvȏł"ʒu"ł܂B
  ́ARAID1 p[eBVWIȃp[eBVƓƂɂ܂
  ARAID1 p[eBV̍Ōɂ RAID X[pubNĂ
  Bu[g\ RAID ZbǵAfBXNhCu̍ŏ 1024 KoC
  gɈʒuȂ΂Ȃ܂B_IɁARAID p[eBV̎n_
  1024 KoCĝǂɂłʒuł܂Aۂɂ́Au[ĝ߂
  RAID ̑Ŝŏ̃ubNɈʒu܂ŁA삳邱Ƃł܂
  łB́AԂA܂ʂȉłA͊
  ʂ̌܂łBȗAPɁAu[g\ RAID
  ŏ̃p[eBVɈʒuASĂ̎̃VXeݒ肵Ă܂B
  ̓[g RAID łVXe̍\ĂÁA/boot Ƀu
  [g\ RAID1 }EĝŁA[g RAID Zbg͎Ɏ
  ̂ł\\RAID1, RAID5, RAID10  RAID1-10 (P̃~[ƂP
  RAID0 ̃Zbg)BŌ̂͂ւق LILO t@C̃yA
  B́AfBXN\łȂłAȂAvȂ
  Ƃ͏̃u[gvZXɂƂēłB RAID10  RAID1-10 ̃[g
  ̃}Eg initrd gƂKvŁAu[gvZX initrd ̊
  Ɉڍsニ[g}Eg܂BƂĎグVXe̐ݒ
  t@Ct^Ƃ܂̂ŁAQƂĂB

  ] LILO ̐ݒt@ĆAfł̂悤ɂȂĂł傤\\

  # lilo.conf - assumes drive less than 1024
          boot = /dev/hda
          delay = 40               # extra, but nice
          vga = normal             # not normally needed
          image = /bzImage
          root = /dev/hda1
          read-only
          label = Linux

  RAID  LILO ̐ݒt@C̃yA͂̂悤ɂȂ܂\\

  # lilo.conf.hda - primary ide master
          disk=/dev/md0
          bios=0x80
          sectors=63
          heads=16
          cylinders=39770
          partition=/dev/md1
          start=63
          boot=/dev/hda
          map=/boot/map
          install=/boot/boot.b
          image=/boot/bzImage
          root=/dev/md0
          read-only
          label=LinuxRaid

  # ---------------------

  # lilo.conf.hdc - secondary ide master
          disk=/dev/md0
          bios=0x80                # see note below
          sectors=63
          heads=16
          cylinders=39770
          partition=/dev/md1
          start=63
          boot=/dev/hdc            # this is the other disk
          map=/boot/map
          install=/boot/boot.b
          image=/boot/bzImage
          root=/dev/md0
          read-only
          label=LinuxRaid

     BIOS=lineɂ
        bios vC}fBXNAoɎsꍇAi
        AȂ̂łjbios Ȃ΁AZJ_fBXNA
        IɃu[gĂ܂ (󒍁GLɎƂAbios=0x80jB
        AȂ bios ̏ꍇ́Alilo.conf.hdc  BIOS=line 
        bios=0x81 Ə܂B IDE bios  SCSI bios ɂ肪
        łBM҂ɂẮAŏ̃u[ghCuُIꍇA
        łhCu C: u邽߂ɁAPɃvC}hCu
        ƃZJ_hCuƌŁAbios=0x80 ̂܂܂łB

     󒍁GH
        M҂̂ bios  A-BIOS,  bios  B-BIOS ƂA
        Ƃl@܂B
        A-BIOS ł IDE  primary master  1Ԗ Asecondary slave 
        4Ԗڂƃn[hEFAIɔԍts܂Bn[hfBXN̗L
        Ɋ֒m܂B]āA[U KAprimary  P[u
        master ɐݒ肵n[hfBXNtȂ΂Ȃ܂B

        B-BIOS łIDE  primary master 珇 secondary slave ܂ŁA
        ׂāAn[hfBXNɁAԍt܂Bn[h
        fBXNꍇACDROM̏ꍇAԍ͊蓖Ă܂B
        [U͓ɃP[uA master/slave ̐ݒɋCtKv͂
        ܂B

        āAG[ꍇlĂ݂܂B BIOS Ƃ 1Ԗڂ̃n
        [hfBXNAN悤ɁA[U͐ݒ肵܂B primary
        master ɂn[hfBXN̏ႵAprimary slave Ƀn[h
        fBXNꍇAprimary master ̃n[hfBXNF
        A primary slave ŏ̃n[hfBXNƔF܂B
        Aprimary master ̃n[hfBXN boot O܂ł́Aɓ
        삵Ă̂ŁAprimary slave ̃n[hfBXNɂ boot loader
        ͓Ă܂B

        A-BIOS ł 1Ԗڂ̌̏ႵĂ primary master ̃n[hfBXN
        FɎsAG[ɂȂ܂B

        B-BIOS ł  1Ԗڂ primary slave  boot loader ̖n[
        hfBXNAboot 悤ƂāAG[ɂȂ܂B

        A-BIOS ł́A primary master ̖ɋCtł傤B

        B-BIOS ł́Aprimary master ̖ɋCtł傤H boot
        loader ̖îƂȂ̂łjƊႢ OS ̍ăCX
        g[āA primary slave ̓ej󂵂Ă܂
        B

        ȂM҂́AB-BIOS ƕ\Ă܂B

  hCu̍\́Afdisk R}hœ܂\\

  fdisk -ul (L ̏)
  fdisk -ul /dev/hda

  Disk /dev/hda: 16 heads, 63 sectors, 39770 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            63     33263     16600+  fd  Linux raid autodetect
  /dev/hda2         33264    443519    205128   82  Linux swap
  /dev/hda3        443520  40088159  19822320   fd  Linux raid autodetect

  * note the listing of the START of each partition

  3.2.  RAID u[ĝ߂ lilo.conf ̏ڍׂȐ

  RAID  lilo.conf t@CȉɎAeGg̏ڍׂRgƂ
  ܂B

  # lilo.conf.hda - primary ide master
  #       the location of the /boot directory that will be
  #       designated below as containing the kernel, map, etc...
  #       note that this is NOT the actual partition containing
  #       the boot image and info, but rather the device
  #       that logically contains this directory.
  #       in this example, /dev/md1 is mounted on /dev/md0/boot
       disk=/dev/md0

  #       tell LILO which bios device to use for boot, i.e. C: drive
       bios=0x80

  #       tell LILO the geometry of the device
  #       this is usually but not always the "logical"
  #       geometry. Check the /proc file system or watch
  #       the boot messages when the kernel probes for the drive
  #
       sectors=63
       heads=16
       cylinders=39770

  #       this is a dummy entry to make LILO happy so it
  #       will recognize the raid set 0x9?? and then find
  #       the START of the boot sector. To really see
  #       what this was for, read the documentation
  #       that comes with the LILO source distribution.
  #       This parameter "must" be different than the
  #       disk=  entry above. It can be any other mdx
  #       device, used or unused and need not be the one
  #       that contains the /boot information
  #
       partition=/dev/md1

  #       the first sector of the partition containing /boot information
       start=63

  #       the real device that LILO will write the boot information to
       boot=/dev/hda

  #       logically where LILO will put the boot information
       map=/boot/map
       install=/boot/boot.b

  #       logically where lilo will find the kernel image
       image=/boot/bzImage

  #       standard stuff after this
  #       root may be a raid1/4/5 device
       root=/dev/md0
       read-only
       label=LinuxRaid

  4.  RAID łȂVXe RAID1/4/5 ɉP

  RAID łȂVXe RAID ւ̉P͂ȂȒPŁA̕
  菇ȂAq܂B̋Lq́Au[gp[eBVƃ[
  gp[eBVAăXbvp[eBVƂȂVXê
  ̂̂łB

  VXěÂfBXN\\\

      /dev/hda1     boot, dos+lodlin  lilo 
      /dev/hda2     root
      /dev/hda3     swap

  ʂ̃fBXNǉAŜ̃VXe RAID1 ɕϊ܂B
  fBXN̒ǉeՂȂA菇 RAID1 ̑ RAID5 Zbg
  邱Ƃł܂B

  4.1.  菇PFVJ[l̏

  ꂢȃJ[l raidtools-0.90 (͍ŐVo[W)A
  0.90 RAID ւƃJ[lPJ[lpb`A_E[hĂ
  B

  raidtools RpCCXg[܂BāAt̃hLg
  ǂłB

  gp\ RAID ̎ (0/1/4/5 ?) ׂăT|[gݒŁAJ[l
  RpCCXg[ĂBJ[lRtBO[V
  ɂ RAID foCX autostart w肵ƂmF܂BJ[l
  K؂Ƀu[g邩eXgAāAȂgƂĂ
  RAID ̎ނVJ[lŃT|[gĂ邩mF邽
  /proc/mdstat 𒲂ׂĂB

  4.2.  菇QFV RAID ̂߂ raidtab ݒ

  VfBXNʂ IDE Rg[̃}X^[foCXƂȂA
   /dev/hdc ɂȂ܂B

      /dev/hdc1     16MB\\͂ȏł̃J[lC[W
                    \ȗ̈
      /dev/hdc2     fBXN̑啔̗̈
      /dev/hdc3     KvȂ̃Xbv̈BȂ hdc2 ɉ
                    B(󒍁F̃ViI swap  RAID ɂȂ)

  /dev/hdc1  /dev/hdc2 ̃p[eBV^Cv raid-autostart  "fd"
  ɕύXĂB

  failed-disk p[^gpāA] RAID1 ݒ̂߂ raidtab
  쐬܂Bfailed-disk ͕\̍ŌɒuׂłB

  # example raidtab
  # md0 is the root array
  raiddev                 /dev/md0
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hdc2
  raid-disk               0
  # this is our old disk, mark as failed for now
  device                  /dev/hda2
  failed-disk             1

  # md1 is the /boot array
  raiddev                 /dev/md1
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hdc1
  raid-disk               0
  # boot is marked failed as well
  device                  /dev/hda1
  failed-disk               1

  4.3.  RAID 쐬tH[}bgAĐݒ肷

  ̃R}h md foCX쐬܂\\

      mkraid /dev/md0
      mkraid /dev/md1

  RAID foCX͍쐬An߂܂B/proc/mdstat ̒ŁAJ[l
  ɂ RAID ̌X̏ԂƁARAID foCX̓邱Ƃł
  B

  u[gfoCXƃ[gfoCXtH[}bg܂\\

      mke2fs /dev/md0
      mke2fs /dev/md1

  V[gfoCXǂ₷ꏊɃ}EgA̒ /boot
  ̂߂̃fBNg쐬ÃfBNgɃu[gp[eBV
  }Eg܂B

      mount /dev/md0 /mnt
      mkdir /mnt/boot
      mount /dev/md1 /mnt/boot

  4.4.  V RAID foCXɌ݂ OS Rs[

  ͔ɊȒPłB

      cd /
      # sob`t@Cݒ肵܂傤B
      cp -a /bin /mnt
      cp -a /dev /mnt
      cp -a /etc /mnt
      cp -a (/mnt  /proc  nsf }EgׂẴfBNg) /mnt

  [gt@CVXeɑ̃fBXN}Eg胊NĂƁA
  ̑͗pSȂ΂Ȃ܂BL̗͂ւPȃVXe
  z肵Ă̂ŁAGȏꍇA菇኱CKv邩܂
  B

  4.5.  V RAID eXg

  u[gtbs[AJ[l rdev ܂B

      dd if=kernal.image of=/dev/fd0 bs=2k
      rdev /dev/fd0 /dev/md0
      rdev -r /dev/fd0 0
      rdev -R /dev/fd0 1

  RAID foCX fstab Ɏ悤ɏCAV}Eg|Cg
  𔽉f܂\\

    /dev/md0        /       ext2    defaults        1 1
    /dev/md1        /boot   ext2    defaults        1 1

  RAID foCX̃}Eg͂AVt@CVXeu[gA
  ׂĐ삵Ă邩mF܂B

      umount /mnt/boot
      umount /mnt
      raidstop /dev/md0
      raidstop /dev/md1
      shutdown -r now

  tbs[u[gfBXNŁARAID VXe͂ɍ쓮Akރ[h
  ͂łBׂĂ̂̂V RAID VXeɓ]Ă邩
  [`FbNĂBobNAbv̂ȂԂŁAŎsȂ
  ΁AȂ͎ł܂܂B

  삵Ȃ΁AÂVXe reboot AԂďCs
  BSɐ܂łJԂĂB

  4.6.  RAID ACɌÂfBXN𓝍

  O̎菇ł̐ RAID ACݎgpł邱ƂӖ܂A܂
  璷ɂ͂ȂĂ܂BɐV RAID ACɍ悤ɌÂfBX
  N (Q) ؂蒼ׂłBhCu̍\񂪓łȂȂAÂh
  Cũp[eBVTCY RAID p[eBVƓ邩
  傫Ȃ΁ARAID Zbgɒǉ邱ƂłȂAƂƂ
  LĂĂB

  KvɉāAÂhCu؂蒼܂BƂā\\

      /dev/hda1     /dev/hdc1 Ɠȏ
      /dev/hda2     /dev/hdc2 Ɠȏ
      /dev/hda3     gcAswap ɂłɂłEEE

  raidtab  failed-disk p[^ raid-disk ɏA RAID A
  CɐV (Â) fBXNp[eBV hot add ܂B

      raidhotadd /dev/md1 /dev/hda1
      raidhotadd /dev/md0 /dev/hda2

  /proc/mdstat 𒲂ׂƁAPȏ RAID foCXŐVp[eBV
  ̂߂ɍč\zsĂ邱Ƃ܂BPAQA
  ƌo߂ƁARAID AC͊Sɓ܂ (p[eBV傫
  ǎԂ܂)B

  ̎̕n߂̃̕ZNVŏqׂ菇gAV RAID yA
  ŁAu[g\ RAID ̐ݒ܂B̍Ō̎菇̐ݒƃeXgI
  ܂ŁÃu[gtbs[͎Ă͂Ȃ܂B

  5.  t^`Fraidtab ̗

  ̎̕n߂̃̕ZNVŏqׂꂽ RAID1 ̗

   df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md0              19510780   1763188  16756484  10% /
  /dev/md1                 15860       984     14051   7% /boot

  # --------------------------

   fdisk -ul /dev/hda

  Disk /dev/hda: 16 heads, 63 sectors, 39770 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            63     33263     16600+  fd  Linux raid autodetect
  /dev/hda2         33264    443519    205128   83  Linux native
  /dev/hda3        443520  40088159  19822320   fd  Linux raid autodetect

  # --------------------------

   fdisk -ul /dev/hdc

  Disk /dev/hdc: 16 heads, 63 sectors, 39770 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdc1            63     33263     16600+  fd  Linux raid autodetect
  /dev/hdc2         33264    443519    205128   82  Linux swap
  /dev/hdc3        443520  40088159  19822320   fd  Linux raid autodetect

  # --------------------------

  # md0 is the root array, about 20 gigs
  raiddev                 /dev/md0
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hda3
  raid-disk               0
  device                  /dev/hdc3
  raid-disk               1

  # md1 is the /boot array, about 16 megs
  raiddev                 /dev/md1
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hda1
  raid-disk               0
  device                  /dev/hdc1
  raid-disk               1

  # --------------------------

  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=63
    heads=16
    cylinders=39770
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=63

  boot=/dev/hda
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only

  # -------------------------

  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=63
    heads=16
    cylinders=39770
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=63

  boot=/dev/hdc
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only

  6.  t^aFSCSI RAID5 ̎Ql

  S̃fBXNg SCSI RAID5

   df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md0              11753770   2146076   9000678  19% /
  /dev/md1                 15739       885     14042   6% /boot

  # --------------------------

   fdisk -ul /dev/sda

  Disk /dev/sda: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sda1            32     32767     16368   fd  Linux raid autodetect
  /dev/sda2         32768    292863    130048    5  Extended
  /dev/sda3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sda5         32800    260095    113648   82  Linux swap
  /dev/sda6        260128    292863     16368   83  Linux native - test

  # ------------------------

   fdisk -ul /dev/sdb

  Disk /dev/sdb: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sdb1            32     32767     16368   fd  Linux raid autodetect
  /dev/sdb2         32768    292863    130048    5  Extended
  /dev/sdb3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sdb5         32800    260095    113648   82  Linux swap
  /dev/sdb6        260128    292863     16368   83  Linux native - test

  # ------------------------

  # fdisk -ul /dev/sdc

  Disk /dev/sdc: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sdc2            32    292863    146416    5  Extended
  /dev/sdc3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sdc5            64    260095    130016   83  Linux native - development
  /dev/sdc6        260128    292863     16368   83  Linux native - test

  # ------------------------

   fdisk -ul /dev/sdd

  Disk /dev/sdd: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sdd2            32    292863    146416    5  Extended
  /dev/sdd3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sdd5            64    260095    130016   83  Linux native - development
  /dev/sdd6        260128    292863     16368   83  Linux native - test

  # --------------------------

  # raidtab
  #
  raiddev /dev/md0
          raid-level      5
          nr-raid-disks   4
          persistent-superblock 1
          chunk-size      32

  # Spare disks for hot reconstruction
          nr-spare-disks  0
          device          /dev/sda3
          raid-disk       0
          device          /dev/sdb3
          raid-disk       1
          device          /dev/sdc3
          raid-disk       2
          device          /dev/sdd3
          raid-disk       3

  # boot partition
  #
  raiddev /dev/md1
          raid-level      1
          nr-raid-disks   2
          persistent-superblock 1
          chunk-size      32

  # Spare disks for hot reconstruction
          nr-spare-disks  0
          device          /dev/sda1
          raid-disk       0
          device          /dev/sdb1
          raid-disk       1

  # --------------------------

  # cat lilo.conf.sda
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=32
    heads=64
    cylinders=4095
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=32

  boot=/dev/sda
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only

  # ------------------------
  # cat lilo.conf.sdb
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=32
    heads=64
    cylinders=4095
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=32

  boot=/dev/sdb
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only

  7.  t^bFinitrd gp ide RAID10

  XgCvꂽ RAID0 yAp RAID1 ł́ARAID0 Zbg̃fBX
  Neʂ͊Sɓł͂܂񂪁A\ɋ߂eʂłB

  /dev/md0  /boot p[eBVŁAJ[lɂ autostart 
  /dev/md1  /dev/md3 ͂Q RAID0 ZbgŁAJ[lɂ autostart 
  /dev/md2 ̓[gp[eBV initrd ɂ start 

  df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md2                118531     76485     35925  68% /
  /dev/md0                  1917      1361       457  75% /boot

  # ----------------------------

   fdisk -ul /dev/hda

  Disk /dev/hda: 4 heads, 46 sectors, 903 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            46      4231      2093   fd  Linux raid autodetect
  /dev/hda2          4232    166151     80960   fd  Linux raid autodetect

  # ----------------------------

   fdisk -ul /dev/hdb

  Disk /dev/hdb: 5 heads, 17 sectors, 981 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdb1            17     83384     41684   fd  Linux raid autodetect

  # ----------------------------

   fdisk -ul /dev/hdc

  Disk /dev/hdc: 7 heads, 17 sectors, 1024 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdc1            17     84013     41998+  fd  Linux raid autodetect
  /dev/hdc2         84014    121855     18921   82  Linux swap

  # ----------------------------

   fdisk -ul /dev/hdd

  Disk /dev/hdd: 4 heads, 46 sectors, 903 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdd1            46      4231      2093   fd  Linux raid autodetect
  /dev/hdd2          4232    166151     80960   fd  Linux raid autodetect

  # ----------------------------

  # raidtab
  #
  raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hda1
          raid-disk       0
          device          /dev/hdd1
          raid-disk       1

  raiddev /dev/md1
          raid-level      0
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hdd2
          raid-disk       0
          device          /dev/hdb1
          raid-disk       1

  raiddev /dev/md2
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/md1
          raid-disk       0
          device          /dev/md3
          raid-disk       1

  raiddev /dev/md3
          raid-level      0
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hda2
          raid-disk       0
          device          /dev/hdc1
          raid-disk       1

  # ----------------------------

  contents of linuxrc

   cat linuxrc
  #!/bin/sh
  # ver 1.02 2-22-00
  #
  ############# really BEGIN 'linuxrc' ###############
  #
  # mount the proc file system
  /bin/mount /proc

  # start raid 1 made of raid 0's
  /bin/raidstart /dev/md2

  # tell the console what's happening
  /bin/cat /proc/mdstat

  # Everything is fine, let the kernel mount /dev/md2
  # tell the kernel to switch to /dev/md2 as the /root device
  # The 0x900 value is the device number calculated by:
  #  256*major_device_number + minor_device number
  echo "/dev/md2 mounted on root"
  echo 0x902>/proc/sys/kernel/real-root-dev

  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  exit

  # ----------------------------

  contents of initrd

  ./bin/ash
  ./bin/echo
  ./bin/raidstart
  ./bin/mount
  ./bin/umount
  ./bin/cat
  ./bin/sh
  ./dev/tty1
  ./dev/md0
  ./dev/md1
  ./dev/md2
  ./dev/md3
  ./dev/md4
  ./dev/console
  ./dev/hda
  ./dev/hda1
  ./dev/hda2
  ./dev/hda3
  ./dev/hdb
  ./dev/hdb1
  ./dev/hdb2
  ./dev/hdb3
  ./dev/hdc
  ./dev/hdc1
  ./dev/hdc2
  ./dev/hdc3
  ./dev/hdd
  ./dev/hdd1
  ./dev/hdd2
  ./dev/hdd3
  ./dev/initrd
  ./dev/ram0
  ./dev/ram1
  ./dev/ram2
  ./dev/ram3
  ./dev/ram4
  ./dev/ram5
  ./dev/ram6
  ./dev/ram7
  ./etc/raidtab
  ./etc/fstab
  ./lib/ld-2.1.2.so
  ./lib/ld-linux.so.1
  ./lib/ld-linux.so.1.9.9
  ./lib/ld-linux.so.2
  ./lib/ld.so
  ./lib/libc-2.1.2.so
  ./lib/libc.so.6
  ./linuxrc
  ./proc

  8.  t^cFinitrd  gp ide RAID1-10

  ͔[̑gŃVXeグ̂łB[gƂă}E
  g RAID foCX́A[ȃTCỸfBXNōグP
  RAID0 ACƑ傫ʂ̃fBXNp[eBV\ RAID1
  łB lilo.conf t@C𒲂ׂ邱ƂŁAep[^Ȃ̂悤
  ɐݒ肳Ă̂ƂR () ɑ΂錩[܂邩܂
  B

  /dev/md0  /boot p[eBVŁAJ[lɂ autostart 
  /dev/md1  md2 ̃~[Zbg̕ЕŁAJ[lɂ autostart 
  /dev/hda3  md2 ̃~[ZbĝЕł
  /dev/md2  /dev/md1  /dev/hda3 ō\ RAID1 ŁAinitrd  start 

  df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md2                138381     74421     56815  57% /
  /dev/md0                  2011      1360       549  71% /boot

  # ----------------------------

   fdisk -ul /dev/hda

  Disk /dev/hda: 8 heads, 46 sectors, 903 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            46      4415      2185   fd  Linux raid autodetect
  /dev/hda2          4416     43423     19504   82  Linux swap
  /dev/hda3         43424    332303    144440   83  Linux native

  # ----------------------------

   fdisk -ul /dev/hdc

  Disk /dev/hdc: 8 heads, 39 sectors, 762 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdc1            39      4367      2164+  fd  Linux raid autodetect
  /dev/hdc2          4368     70199     32916   82  Linux swap
  /dev/hdc3         70200    237743     83772   fd  Linux raid autodetect

  # ----------------------------

   fdisk -ul /dev/hdd

  Disk /dev/hdd: 4 heads, 39 sectors, 762 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdd1            39    118871     59416+  fd  Linux raid autodetect

  # ----------------------------

  # raidtab
  #
  raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hdc1
          raid-disk       1
          device          /dev/hda1
          raid-disk       0

  raiddev /dev/md1
          raid-level      0
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hdc3
          raid-disk       0
          device          /dev/hdd1
          raid-disk       1

  raiddev /dev/md2
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/md1
          raid-disk       1
          device          /dev/hda3
          raid-disk       0

  # ----------------------------

   cat linuxrc
  #!/bin/sh
  # ver 1.02 2-22-00
  #
  ############# really BEGIN 'linuxrc' ###############
  #
  # mount the proc file system
  /bin/mount /proc

  # autostart /boot partition and raid0
  /bin/raidstart /dev/md2

  # tell the console what's happening
  /bin/cat /proc/mdstat

  # Everything is fine, let the kernel mount /dev/md2
  # tell the kernel to switch to /dev/md2 as the /root device
  # The 0x900 value is the device number calculated by:
  #  256*major_device_number + minor_device number
  echo "/dev/md2 mounted on root"
  echo 0x902>/proc/sys/kernel/real-root-dev

  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  exit

  # ----------------------------

  contents of initrd.gz

  ./bin
  ./bin/ash
  ./bin/echo
  ./bin/raidstart
  ./bin/mount
  ./bin/umount
  ./bin/cat
  ./bin/sh
  ./dev/tty1
  ./dev/md0
  ./dev/md1
  ./dev/md2
  ./dev/md3
  ./dev/console
  ./dev/hda
  ./dev/hda1
  ./dev/hda2
  ./dev/hda3
  ./dev/hdc
  ./dev/hdc1
  ./dev/hdc2
  ./dev/hdc3
  ./dev/hdd
  ./dev/hdd1
  ./dev/hdd2
  ./dev/hdd3
  ./dev/initrd
  ./dev/ram0
  ./dev/ram1
  ./dev/ram2
  ./dev/ram3
  ./dev/ram4
  ./dev/ram5
  ./dev/ram6
  ./dev/ram7
  ./etc/raidtab
  ./etc/fstab
  ./lib/ld-2.1.2.so
  ./lib/ld-linux.so.1
  ./lib/ld-linux.so.1.9.9
  ./lib/ld-linux.so.2
  ./lib/ld.so
  ./lib/libc-2.1.2.so
  ./lib/libc.so.6
  ./linuxrc
  ./proc

  # ----------------------------

   cat lilo.conf.hda
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md2
  # geometry
    bios=0x80
    cylinders=903
    heads=8
    sectors=46
  # geometry for 2nd disk
  # bios will be the same because it will have to be moved to hda
  #  cylinders=762
  #  heads=8
  #  sectors=39

  # dummy
    partition=/dev/md0
  # start of device "disk" above
    start=46
  # second device
  #  start=39

  # seem to have some trouble with 2.2.14 recognizing the right IRQ
    append = "ide1=0x170,0x376,12 ether=10,0x300,eth0 ether=5,0x320,eth1"

  boot=/dev/hda
  map=/boot/map
  install=/boot/boot.b

  initrd=/boot/initrd.gz

  image=/boot/zImage
  root=/dev/md2
  label=LinuxRaid
  read-only

  # ----------------------------

   cat lilo.conf.hdc
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md2
  # geometry
    bios=0x80
  #  cylinders=903
  #  heads=8
  #  sectors=46
  # geometry for 2nd disk
  # bios will be the same because it will have to be moved to hda
    cylinders=762
    heads=8
    sectors=39

  # dummy
    partition=/dev/md0
  # start of device "disk" above
  #  start=46
  # second device
    start=39

  # seem to have some trouble with 2.2.14 recognizing the right IRQ
    append = "ide1=0x170,0x376,12 ether=10,0x300,eth0 ether=5,0x320,eth1"

  boot=/dev/hdc
  map=/boot/map
  install=/boot/boot.b

  initrd=/boot/initrd.gz

  image=/boot/zImage
  root=/dev/md2
  label=LinuxRaid
  read-only

  9.  {ɂ

  { Linux Japanese FAQ Project s܂B|Ɋւ邲ӌ
   JF vWFNg <JF@linux.or.jp> ɘAĂB

     v1.04j
        |: {_ <hng@ps.ksky.ne.jp>

        uHv̖󒍌:
        쓈   <kawawa@mail.interq.or.jp>

        Z:
        쓈   <kawawa@mail.interq.or.jp>A
         Y  <nakano@apm.seikei.ac.jp>A
        Takahiko KAWASAKI  <KawasakiT@soj.sega.co.jp>A
        U Ti <ysenda@pop01.odn.ne.jp>A
         L <takei@webmasters.gr.jp>

