📄 readme.raid1
字号:
Notes for use of LILO on RAID installations.(LILO version 22.0 through 22.4.1 -- 17-Apr-2001)(LILO version 22.5 and later -- 14-Mar-2003) see NEW CONSIDERATIONSRESTRICTIONS============Only RAID1 is supported. LILO may be used to boot a systemcontaining other RAID level partitions, but it may not be installedon any RAID partition other than RAID level 1.GOAL====The goal of a RAID1 installation of LILO is redundancy. Redundancy tothe point that a failure of one disk in an array will not render thesystem difficult to boot.A secondary goal of LILO on a RAID installation is to maintain arraycoherency when the LILO command line is written back to the map file. This writeback occurs when the '-R' switch command line is cleared,when the user has specified the 'lock' option, or if a 'fallback'command line is in use.INSTALLATION ON A RAID SET==========================A RAID installation of the LILO boot loader is initiated byspecifying that the boot record is to be placed in the boot area ofa RAID partition. This is accomplished by the 'boot=' line in theLILO configuration file, '/etc/lilo.conf'. For instance, a systemrunning with '/dev/md1' mounted as root ('/'), would use the line: boot = /dev/md1to initiate a RAID installation. As directed, the boot record iswritten to the RAID partition. Unfortunately, in the event offailure of the RAID set disk from which booting occurs, the boot recordon the surviving disk(s) will only be usable if the disks are entirely"parallel" to the disk that originally booted the system.To continue, we first need some terminology for talking about RAID 1partitions.TERMINOLOGY===========RAID 1 writes the same data to the corresponding disk blocks of thepartitions which make up the RAID set. Two partitions are said to be"parallel" if they start at exactly the same sector address on theirrespective drives. This means that files on the two disks have theirdata written at exactly the same absolute sector addresses on bothdrives. Two partitions are said to be "skewed" if they do not start at thesame sector address on their respective drives. Data within eachpartition will be at the same offset from the beginning of eachpartition, but not at the same absolute sector address.PARALLEL CASE============="Parallel" RAID sets are the easiest for LILO to handle. One bootrecord, written to the boot area of the RAID partition, references thesame sectors, no matter which disk is operational at boot time. For"parallel" RAID installations, LILO has no need to write boot recordsoutside of the RAID partition, if primary. This is in contrast toprevious versions of LILO based upon the "lilo.raid1" patch file tovanilla version 21, which wrote the LILO boot record to the Master BootRecords of all of the drives in the array, and not to the RAIDpartition.With the boot record written to the RAID partition on "parallel" RAIDsets, every drive has a boot record which will boot the system. There is now only one map file, and this file may be referenced byany of the boot records, since it is at exactly the same sectoraddress on every drive. To insure that it is possible to boot fromthis simplest LILO installation to "parallel" RAID set partitions,one must insure that they are primary partitions; i.e., partitionnumbers 1-4 on their respective disks, and that each disk has writtento it a "master" boot loader which boots the partition marked "active".And on each disk, mark the RAID set partition active. Booting normallyoccurs from the drive with the lowest BIOS device code (0x80). Inthe event this drive fails, another drive assumes the role of BIOSdevice code 0x80, and in the case of a "parallel" RAID installation,will be perfectly bootable.The unusual event of RAID set partitions which are parallel, but notprimary partitions will be described later.MORE TERMINOLOGY================A boot record is "accessible", if it exists on a primary parition,which may be marked "active"; or it is a Master Boot Record (MBR),written to sector 0 of a drive.Non-RAID LILO installations write accessible boot records when theywrite to primary partitions, such as: boot = /dev/hda1or, boot = /dev/sdb3Boot records are written to the MBR by specifying the drive; viz., boot = /dev/hdbwrites to the MBR of the slave drive on the primary IDE controller.Similarly, a boot record is "inaccessible" if it is written to alogical (or secondary) partition; i.e., partition numbers 5 andabove. These partitions are not booted by any of the usual MBR bootloaders which search the partition table for a partition marked"active". They may be booted from a boot manager, such as the LILOboot menu, and are booted as 'other=' entries in the configurationfile, '/etc/lilo.conf'.SKEWED CASE==========="Skewed" installations are not quite as simple. Here the partitionsare not likely to be primary, and their distinguishing characteristicis that files on the filsystem within the partition lie at differentabsolute sector addresses: kernel files, initrd files, and the LILOmap file, in particular. Thus any boot record written to '/dev/mdX',the RAID partition, will have sector addresses which cannot beguaranteed accurate for all drives. Worst case is that they areaccurate for only one drive. Hence, this boot will work for onedrive, but it is not universal. It will fail for some drive ordrives in the array.In this case, LILO needs to place boot records in "accessible" placesso that all drives will be bootable in a recovery situation.Here the need for the user to specify alternative actions becomesnecessary. There is a new keyword now recoginzed in theconfiguration file, and a new command line switch corresponding tothe keyword: 'raid-extra-boot=' and the '-x' switch. The followingdescription will be for the configuration file option, but is equallyapplicable to the command line switch.For the simplest of "skewed" installations, it may be undesirable tohave LILO automatically write boot records outside of the RAIDpartition. In this case, 'raid-extra-boot=' should be specified,literally, as "none"; viz., boot = /dev/md1 raid-extra-boot = noneWith this specification, LILO will write the boot record to'/dev/md0' only. If the RAID disk on the lowest BIOS device codefails, the array may not be bootable, except from a floppy disk.Without the specification "none", the default LILO action in the caseof a skewed installation is: boot = /dev/md1 raid-extra-boot = autoThis requests LILO to place recovery boot records on the MBRs of anydrives for which the the '/dev/md1' boot record is not valid, becauseof partition skew. Even with "auto" specified, or implied by havingno 'raid-extra-boot=' line, LILO will never write a boot record tothe MBR of BIOS device 0x80. This MBR is considered so critical,that it will never be written, unless you specifically request it.It is strongly suggested that before any LILO installation on a RAIDset, that LILO be run with the 'test' flag: '-t'. LILO will gothrough all the motions of mapping the kernel(s) to be booted, but itwill tell you where it wants to write any additional boot records. lilo -tIs strongly recommended, especially if you are not sure whether youhave a "skewed" (extra boot records needed) or "parallel" RAIDinstallation.If boot records are desired on all MBRs of all disks with partitionsin the raid set, then the following specification is used: boot = /dev/md1 # OR, -b /dev/md1 raid-extra-boot = mbr # OR, -x mbrIf there are three disks with partitions that are part of the /dev/md1raid set, then the Master Boot Records of all three will receiveadditional boot records. With this specification, the MBR of BIOSdevice 0x80 will be overwritten. The caution to run 'lilo -t' first, just to see where LILO will writeboot records, is reemphasized.The keyword 'raid-extra-boot=' may also be used to specify exactlywhere you want LILO to write the auxiliary boot records. Considerthe following RAID installation: disk 0: /dev/hdc6; disk 1: /dev/sda1. The installation is "skewed". Disks /dev/hda and/dev/hdb exist, and occupy BIOS device codes 0x80 and 0x81,respectively. /dev/hdc is BIOS device code 0x82, and /dev/sda isBIOS device code 0x83. If the configuration file looks somethinglike: boot = /dev/md1 # the following line is not needed, but may be used to # force the device code which the RAID set will boot as #disk=/dev/md1 bios=0x82 # disks hda and hdb are on the expected bios codes 80 & 81 # disk=/dev/hdc bios=0x82 disk=/dev/sda bios=0x83 # image = /boot/vmlinuz label = linux root = /dev/md1 read-only other = /dev/hda label = MBRthen LILO will write the boot record to boot from 0x82, the lowestdevice code of any disk in the RAID set. An additional boot recordwill be written to the MBR of '/dev/hdc'. Disk '/dev/sda' isbootable should '/dev/hdc' fail under the following circumstance: '/dev/hdc' is removed, freeing BIOS device code 0x82. '/dev/sda' nowinstalls on the lowest code, 0x82, and will boot as long as partition1 is marked active.The same effect could be achieved with the configuration file havingthe extra line: raid-extra-boot = /dev/hdcFurther, the use of extra boot records could be extended as follows:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -