Introduction to Aix rootvg & BOOT zone Principles & fault recovery

Source: Internet
Author: User

Special volume group rootvg

AIX also uses the logical volume management technology to manage its own code and configuration files. This special volume group is rootvg, which means that all AIX operating systems have a rootvg (except for diskless workstation, but there is also a virtual rootvg), that is to say, all AIX operating systems have a rootvg (except for diskless workstation, but also a virtual rootvg ). Generally, the logical volume (content) contained in rootvg is as follows:

 

LV name type size (MB) Mount type
Hd5 boot 32 N/A-> boot Zone
Hd6 paging 512 N/A-> system swap Zone
Lg_dumplv sysdump 512 N/A-> is used to save the system dump.
Hd8 jfslog 32 N/A-> logs of all file systems in rootvg
Hd4 JFS 64/
Hd2 JFS 64/usr
Hd9var JFS 128/var
Hd3 JFS 128/tmp
Hd1 JFS 32/home
Usrlocallv JFS 128/usr/local
Hd10pt JFS 256/OPT

The/usr File System (directory) stores the software installed on AIX. When the Smit installp command is used for installation, the size of the software can be automatically expanded based on the size of the required space; /OPT File System (directory) Stores Linux toolbox CD software (including software installed through RPM only) and other commercial software (not mandatory, varies with the software's own requirements );

Hd5 is a boot partition and contains the Boot Image command. Therefore, after installing the core software of the operating system or key device drivers (such as the drivers of disks and tape drives), you need to re-generate the Boot Record:
# Bosboot-a-d hdiskx
Hdiskx is a disk containing hd5. The command to view the disk where hd5 is located is:
$ Lslv-l hd5
The disk (including the hd5 disk) must also be listed as a bootable disk. The command is:
# Bootlist-M normal hdiskx

NOTE: If hd5 is mirrored, you must perform the preceding operations on both disks that contain hd5 images.

Hd6 is the system's paging space. For more information about swap areas, see the memory chapter in this book.

Lg_dumplv is the dump area of the system. For more information about dump, see the CPU chapter in this book.

Hd8 is the JFS log of rootvg, which usually occupies a PP space (regardless of the size of the PP ). Each volume group has at least one log. You can also create one log for each file system in the same volume group, it is used to improve performance (stored on different disks/PVs from the file system ). When there are a large number of file operations, JFS log will also be frequently accessed, so it is best to put this logical volume on a high-speed disk (only within the same VG ), or the high-speed location on the disk (the disk's outer angle out of Edger ). If it is a jfs2 file system, you can also create an inline log. The size of the inline JFS log is generally set to 1/1000, And the size is limited to 256 MB. You can use the Smit command to create an inline log. When you use the Smit menu command to create a jfs2 file system, the default log is stored on the log device shared by the VG, and the "inline log" option is set to "yes ", then a jfs2 file system using inline log is established.

Disk boot
AIX can be guided through disks, CDs, disks, or networks, and the boot sequence can be controlled through the bootlist command.
# Bootlist-M normal-o-> show normal boot guide Sequence
# Bootlist-M normal hdisk0 hdisk1-> the boot sequence is hdisk0 first. If it fails, hdisk1
# Bootlist-M Service cd0 rmt0-> CD-ROM first in maintenance mode, then tape

The structure of the disk boot area is as follows:
Boot Record | vgda | softros | bootexpand | compressed kernel | compressed Ram filesystem | base ODM | rest of the root disk (hd2, hd4, hd9var, etc)

Boot Record: Boot Record. Is a 512-byte record that records the size and location of the boot image program. The ROS (ROM Operation System) program gives control to softros (the program pointed to by the Boot Record) to complete more complex boot tasks.

Softros: Continue to complete system initialization and load bootexpand in sequence. Boot Program, compressed kernel, compressed virtual/Temporary File System (compressed Ram filesystem), base ODM (Basic ODM data)

Bootexpand: bootexpand is responsible for extracting the kernel and RAM File System (these two records are called Blv, boot logical volume ). By compressing Blv, you can reduce the BLV size to accommodate more content. After decompression, the control continues to be passed to the (extracted) kernel program. You can also create a non-compressed BLV (if it is installed, it is almost impossible to not compress BLV after the aix5 version), then bootexpand is not required.

Kernel: the kernel completes initialization and runs/etc/init In the RAM file system. This kernel will not be Jacquard even after the boot is completed, and will be executed in the system as the system's kernel program. Therefore, the kernel linked to/Unix is only for the convenience of system management, but not for BLV. If the system kernel is changed, it must be re-executed.
Bosboot-AD/dev/ipldevice and recreate BLV.

RAM File System: a minimal root file system image that is directly restored to the memory for use by the initial kernel. Kernel uses this file system to initialize the device.
The content in Ram FS varies slightly with different boot methods, as shown in Table 4-21.

Ram FS content in different boot Modes
Guide mode Ram FS content
Hard Drive boot contains the programs and data required to access rootvg, and other AIX boot programs
Installation of CD includes programs necessary for installing Aix or performing software maintenance
Diagnostic CD contains the programs and data required to execute a single user diagnosis program

Base ODM: This is a simplified version of the operating system ODM, which contains the most basic device information of the current system. These device information is used to access the root disk. When the file system in rootvg is mounted, kernel directly uses the ODM in rootvg.

Create a boot image:

The bosboot command can be used to create a boot image. It completes the following work:
(1) create a boot image from the disk file. The specific operation is to generate base ODM from the current system's ODM, create Ram FS, and compress the kernel and ram FS;
(2) copy the boot image (the preceding content) to the corresponding BLV region.
(3) softros uses the/usr/lib/boot/aixmon_rspc code;
(4) The kernel placed into the BLV is the image compressed by/UNIX files;
(5) generate base ODM from the current ODM:
(6) programs (such as Device Drivers) that must be loaded into ram fs ). Bosboot selects a device based on a prototype file. Use different prototype files for different startup devices
Disk boot:/usr/lib/boot/CHRP. disk. proto
CD-ROM boot:/usr/lib/boot/CHRP. CD. proto
Disk boot:/usr/lib/boot/RSPC. Tape. proto
(7) Update Boot Record
Although the bosboot command does many things, the execution is very simple:
# Bosboot-ad hdisk0

In some versions of Aix, BLV is too large (with too many device drivers added ). If the BLV size exceeds 12 Mb, softros and bootexpand cannot be started because the BLV cannot be correctly processed, it must be patched, upgrade softros and bootexpand (start with a CD, patch it, and then re-create a boot image for bosboot). If the root password is forgotten in single-user mode or the rootvg fails, the system cannot be booted, repair can be performed only when a single user or maintenance mode is enabled through a cd (or tape) boot.
After starting the disc or tape, select start maintainance mode for system recovery from the installation/Maint menu and select the following options.

1. Access this volume group and start a shell
If this option is selected, the system will activate rootvg and mount the file system on rootvg. Since the original CD system creates Ram FS, the new mount file system will overwrite Ram FS. With this option, you can:
Change Root Password
Modify the/etc/inittab File
Recreate BLV

2. Access this volume group and start a shell before mounting filesystems
If this option is selected, Ram FS is still used and rootvg is not activated, so it can be used:
Use the fsck command to repair the file system on the faulty rootvg
Fix the JFS log of the faulty rootvg (causing the file system on the rootvg to fail to mount ).
Repair of faulty ODM

To complete the repair, you may need to activate the rootvg file system first.
Fix the JFS log of the faulty rootvg (causing the file system on the rootvg to fail to mount)
Repair of faulty ODM

To complete the repair, you may need to activate an empty directory of Mount ramfs in the file system of rootvg and then fix it. The specific repair command is the same as the normal management command:
Change Root Password
# Password

Modify inittab

# Vi inittab
Note: You may not be able to use VI commands (Other unexecutable commands are handled in a similar way). In this case, use an absolute path. For example, mount the rootvg cup directly to/MNT, when the/usr file system is mounted to/mnt/usr (pay attention to the sequence), you need to knock/mnt/usr/bin/VI/mnt/etc/inittab

Create BLV
# Bosboot-ad hdisk0

File System Repair

# Fsck-y/dev/hd2

Fix JFS log
# Logform/dev/jfslog

Repair ODM
# Savebase

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.