|
次のページ
前のページ
目次へ
3. ブート可能な RAIDLinux 上での RAID0/1/5 の基本的な設定は、他の文書で詳細にそれを取り上げ ているので、この文書では取り上げません。ルートの RAID 設定と、 標準的な LILO でそれをブート可能なものとする問題に取り組みます。 LILO の (man ページで はない) ソースと raidtools-0.90 と一緒のそれぞれ文書は、ブート動作の詳細 とシステムのブート時のパラメータを、汎用的な RAID 設定についても取り上げ ています。
ここでは2つのシナリオを取り上げます。そのシナリオは、RAID のブート可能 なルートの設定と、既存の RAID でないシステムを RAID のブート可能な ルートへデータ損失無く変換することです。
3.1 標準的な LILO で RAID 1 からブートするブート情報を冗長にし保守を簡単にするには、小さい RAID1 を設定しそれをシ ステムディスクの /boot にマウントします。LILO はデバイス 0x9?? を認識せ ず、ブート時そのデバイスの情報を見つけられません。それはその時に RAID サ ブシステムが使える状態になっていないからです。単純な対処として、 ドライブ (群) の構成 (geometry) 情報を LILO に渡すことができます。その情 報から、LILO は、 カーネルが RAID1 パーティション上にあっても、カーネルをロードするた めに必要な情報である"位置"を決定できます。これは、RAID1 パー ティションが標準的なパーティションと同じことによりますが、RAID1 パーティ ションの最後には RAID スーパブロックが書かれています。ブート可能な RAID セットは、ディスクドライブの最初の 1024 メガバイト内に位置しなければなり ません。理論的に、RAID パーティションの始点は 1024 メガバイト内のどこに でも位置できますが、実際には、ブートのための RAID の全体を最初のブロック に位置させるまで、動作させることができませんでした。これは、たぶん、私が まぬけな何かをしたからですが、当時は間違った結果の検討をしませんでした。 それ以来、単純に、ブート可能な RAID を最初のパーティションに位置させ、全 ての私のシステムを設定しています。私はルートが RAID であるシステムの構成 を持っており、それは、/boot にブート可能な RAID1 をマウントするもので、 ルートの RAID セットは次に示すものです――RAID1, RAID5, RAID10 そして RAID1-10 (1つのミラーと1つのRAID0 のセット)。最後のはたいへん特異な LILO ファイルのペアを持ちます。それは、ディスク構成が同じでないからです が、しかしながら、主要なことは初期のブートプロセスにとって同じです。 RAID10 と RAID1-10 のルートのマウントは initrd を使うことが必要 で、ブートプロセスが initrd の環境に移行した後ルートをマウント します。 例として取り上げたシステムの設定ファイルを付録としますので、参照してくだ さい。
従来の LILO の設定ファイルは、素でこのようになっているでしょう――
# 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 の設定ファイルのペアはこのようになります――
# 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
ドライブの構成情報は、fdisk コマンドで得られます――
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 ブートのための lilo.conf の詳細な説明RAID の lilo.conf ファイルを以下に示し、各エントリの詳細をコメントとしま す。
# 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
次のページ 前のページ 目次へ |
[ |