Chinaunix

标题: 更改Instance Number [打印本页]

作者: 星坤    时间: 2007-10-15 15:43
标题: 更改Instance Number
##############################################################################
#
# Instance Number
#
##############################################################################
定义: "Card instance number" 是在IO Cards的各自分类中唯一标识I/O Cards的序号。
Card类型:具有相似属性的逻辑类型。可分为ext_bus,lan,tty
ext_bus: cards which support multiple remote devices(e.g. SCSI)
lan: LAN interfaces(e.g. 100BT, FDDI, Ethernet)
tty: cards wihch support terminal devices(e.g. multiplexers)
属性: Card属于哪一类型,取决于interface driver要声明的类型。
card到driver的捆定按instance number的顺序进行。
序号可以跳跃。
在同一类型中是唯一的。
存放位置:
kernel
/etc/ioconfig
/stand/ioconfig
备注: 只有card instance number才能保证启动过程的顺序。
##############################################################################
#
# ioconfig
#
##############################################################################
功能: 定义启动过程,系统IO配置。
内容: The ioconfig file contains two types of information:
- mappings of dynamically allocation major numbers to drivers (dyn_major_t)
- mappings of instance numbers to hardware paths (io_config_t)
位置:
/etc/ioconfig (Primary)
/stand/ioconfig (Second)
重建方式:
备份恢复
ioinit -c (从Kernel重建ioconfig)
##############################################################################
#
# change instance number
#
##############################################################################
PROCESS I
------------------------------------------------------------------------------
1. # ioscan -f | grep -e INTERFACE -e DEVICE | \
grep -v target | \
awk '{print $3, $1, $2}' > /infile
2. 编辑/infile,每类的instance number不能重复。
3. # init 1
4. # /sbin/ioinit -f /infile -r
The system will reboot immediately if the change is successful.
Warnings like 'Input is identical to kernel' can be ignored.
If unsuccessful, the most likely error to happen is:
"ioinit: Instance number X already exists for class XXX"
The problem is that your desired instance assignment conflicts with
an existing instance number. If that instance is bound to hardware
that is no longer visible in ioscan, then you are in trouble and
need to perform the Procedure II or III.
5. Once the system reboots, verify that all the instance numbers
were changed as expected. It may be necessary to re-import volume
groups to ensure that /etc/lvmtab contains the correct
entries. The lan configuration may need to be changed also.
------------------------------------------------------------------------------
PROCESS II
------------------------------------------------------------------------------
1. # ioscan -f | grep -e INTERFACE -e DEVICE | \
grep -v target | \
awk '{print $3, $1, $2}' > /infile
2. 编辑/infile,每类的instance number不能重复。
3. # mv /stand/ioconfig /stand/ioconfig.sav
# mv /etc/ioconfig /etc/ioconfig.sav
# shutdown -ry 0
4. Due to the missing ioconfig files the system will come to an
ioinitrc prompt. Now recreate new ioconfig files from scratch.
This prevents you from running into possible assignment conflicts.
(in ioinitrc)# /sbin/ioinit -c
5. (in ioinitrc)# /sbin/ioinit -f /infile -r
The system will reboot again now if the change was successful.
Warnings like 'Input is identical to kernel' can be ignored.
6. Once the system reboots, verify that all the instance numbers
were changed as expected. It may be necessary to re-import volume
groups to ensure that /etc/lvmtab contains the correct
entries. The lan configuration may need to be changed also.
------------------------------------------------------------------------------
PROCESS III
------------------------------------------------------------------------------
1. Extract a configuration template using ioconfig2infile:
# ioconfig2infile /etc/ioconfig >/infile
2. 编辑/infile,每类的instance number不能重复。
3. # init 1
4. # /sbin/ioinit -f /infile -r
The system will reboot immediately if the change is successful.
Warnings like 'Input is identical to kernel' can be ignored.
5. Once the system reboots, verify that all the instance numbers
were changed as expected. It may be necessary to re-import volume
groups to ensure that /etc/lvmtab contains the correct
entries. The lan configuration may need to be changed also.
------------------------------------------------------------------------------

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6683/showart_400973.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2