我对bosboot和bootlist的理解
(2011-11-22 19:28:00)
标签:
杂谈 |
先说去了解这个问题的源头:我在执行alt_disk_copy克隆rootvg这个命令时,会出现如下报错:
Calling mkszfile to create new /image.data file.
0301-168 bosboot: The current boot logical volume,
/dev/hd5,
0301-168 bosboot: The current boot logical volume,
/dev/hd5,
0505-121 alt_disk_install: Error.
Cleaning up.
我rootvg两块盘hdisk0和hdisk2
我想把rootvg克隆到hdisk1和hdisk3上面去,问题分析:
bootinfo -b返回如下结果:
hdisk0
但是现在hd5是在hdisk2上面,也就是说上一次系统是从hdisk0启动的,所以系统认为hd5应该是在hdisk0上面,而现在在hdisk0上找不到hd5,系统就认为这个rootvg是有问题的,基本保护系统完整性的目的就不允许克隆rootvg。我试过将hdisk0上的启动信息清除掉:
chpv -c hdisk0
但是还是会报出同样的错,因此我执行了如下命令:
bosboot -ad hdisk2
bootlist -m normal -o hdisk2
shutdown -Fr
预料之内,系统重启之后可以执行alt_disk_copy命令。我因此得出的结论是在做unmirrorvg时一定要心里有数,最好避免移动hd5。
顺便我也研究了一下bosboot、bootlist、hd5、blv、IPL等概念:
hd5是LVM里逻辑卷的概念,里面有boot image
blv全程boot logical volume不是LVM的概念,是一个普适的启动逻辑卷的概念,里面也是boot image。位置与hd5重叠
boot image内容有:AIX的kernel、rc.boot、reduced ODM、一些启动系统的命令
IPL record位置在硬盘的第一扇区,作用是定位BLV,启动时IPL(他是一个程序、固件)读bootlist里指定设备的0扇区,然后通过IPL record定位BLV,用BLV里的内容引导系统,此后IPL就将控制权移交给kernel来完成后面的启动
bosboot是重建BLV,刷新IPL record
要说明的是因为IPL完全没有LVM的概念,所以就没有PP的概念,虽然hd5都是在hdisk的第一个LP上面,但是IPL还是必须依赖IPL record提供的BLV的PSN来找到BLV