手工修改HP主机Instance Number三招

有时我们需要更改设备的instance number,(例如配置MC的时候),本文给出WTEC的最权威步骤。

其中procedure I比较简单,但并不总是好用,最彻底的还是procedureII。 另外,建议大家先做一个系统备份,这些方法还是有一点危险性的。

Procedure I
-----------
Default procedure, requires one reboot and works without additional tools.

1. Extract a configuration template from the current ioscan output.
Execute the following command:

# ioscan -f | grep -e INTERFACE -e DEVICE |
grep -v target |
awk '{print $3, $1, $2}' > /infile

2. Edit /infile and change the ext_bus and lan instances as desired.
No class is allowed to get more than one line for the same instance!

3. Bring down the system gracefully to run level 1.

# init 1

4. Apply the ioconfig change:

# /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.


Procedure II
------------
Reliable, requires two reboots and works without additional tools.

1. Extract a configuration template from the current ioscan output.
Execute the following command:

# ioscan -f | grep -e INTERFACE -e DEVICE |
grep -v target |
awk '{print $3, $1, $2}' > /infile

Make sure to store infile to the root file system!

2. Edit /infile and change the ext_bus and lan instances as desired.
No class is allowed to get more than one line for the same instance!

3. Move away the current ioconfig files and Shutdown/Reboot:

# 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. Apply the ioconfig change with your prepared infile:

(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.


Procedure III
-------------
Reliable, requires one reboot and needs the unsupported ioconfig2infile tool.
Since the infile is directly extracted from the current ioconfig you get all
mappings, even for hardware that is not longer visible in ioscan.

1. Extract a configuration template using ioconfig2infile:

# ioconfig2infile /etc/ioconfig >/infile

2. Edit /infile and change the ext_bus and lan instances as desired.
No class is allowed to get more than one line for the same instance!

3. Bring down the system gracefully to run level 1.

# init 1

4. Apply the ioconfig change:

# /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.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9134/viewspace-166510/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9134/viewspace-166510/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值