前些天,在一台rx8640的HP小型机的两个虚拟分区上添加一块共享磁盘,用来建库用,不想出了点小问题,报错信息如下:
# hpvmmodify -p 10 -a disk:scsi::disk:/dev/rdsk/c7t2d0
hpvmmodify: WARNING (bjdb61): Device file '/dev/rdsk/c7t2d0' in use by server.
hpvmmodify: ERROR (bjdb61): Due to errors affecting the device database, the guest configuration file will not be updated.
hpvmmodify: Unable to modify the guest.
根据错误信息的提示,磁盘c7t2d0是被其他服务器给使用了。通过命令“hpvmstatus”对其他虚拟分区挨个查看,都不见这块磁盘,说明又没被占用。问题出在什么地方呢?问题出在设备数据库文件,根据错误信息提示:
Due to errors affecting the device database, the guest configuration file will not be updated.
这个设备数据库文件的路径位于/var/opt/hpvm/common/hpvm_mgmtdb,通过检查这个文件,可以发现磁盘c7t2d0的信息已经在数据库中存在,如下所示:
# cat /var/opt/hpvm/common/hpvm_mgmtdb
# HP Virtual Machine Management Database
# Created 06/13/10 18:05:56 by user root
# Version 3.50.0
#
# This file must not be modified by hand.
#
HPVM MANAGEMENT_DB START
rx8640-4:CONFIG=SERVER::WWID_NULL
/dev/rdsk/c7t2d0:CONFIG=rdev,EXIST=YES,DEVTYPE=DISK,SHARE=NO::5001-d380-0143-cce0
其中黑体字标注的部分算是一个警告,要求这个文件不能用手工编辑,可能容易导致数据库崩溃吧。但不在数据库中除去c7t2d0的消息,又无法将磁盘信息添加到其他分区。所以这里比较稳妥的办法是将这份文件copy一份以备不测,再进行手工编辑,删掉和c7t2d0相关的信息。
信息删除之后,再尝试将c7t2d0设置为共享盘添加到两个分区,就没有问题了:
# hpvmmodify -p 10 -a disk:scsi::disk:/dev/rdsk/c7t2d0
# hpvmdevmgmt -m gdev:/dev/rdsk/c7t2d0:attr:SHARE=YES
# hpvmmodify -p 11 -a disk:scsi::disk:/dev/rdsk/c7t2d0
在加好的分区中能通过命令“hpvmstatus”查看磁盘c7t2d0的信息:
# hpvmstatus -vp 10
Version A.03.50.00
[Virtual Machine Details]
Virtual Machine Name VM # OS Type State
==================== ===== ======= ========
bjdb61 10 HPUX Off
[Authorized Administrators]
Oper Groups:
Admin Groups:
Oper Users:
Admin Users:
[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
2 100.0% 100.0%
[Memory Details]
Total Reserved
Memory Memory
======= ========
4 GB 64 MB
[Storage Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
disk scsi 0 0 0 0 0 disk /dev/rdsk/c7t0d0
disk scsi 0 0 0 1 0 disk /dev/rdsk/c7t2d0
disk scsi 0 0 0 2 0 disk /dev/rdsk/c8t0d0
disk scsi 0 0 0 3 0 disk /dev/rdsk/c8t0d1
disk scsi 0 0 0 4 0 disk /dev/rdsk/c8t0d2
disk scsi 0 0 0 5 0 disk /dev/rdsk/c8t0d3
disk scsi 0 0 0 6 0 disk /dev/rdsk/c8t0d4
disk scsi 0 0 0 7 0 disk /dev/rdsk/c8t0d5
disk scsi 0 0 0 8 0 disk /dev/rdsk/c8t0d6
[Network Interface Details]
Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch lan vlan6 1 0 1 0 56-27-f7-54-4b-55
vswitch lan vlan7 1 0 2 0 56-cb-a4-dc-ec-c0
vswitch lan vlan8 4 0 4 0 be-15-d4-d1-95-99
[Misc Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
serial com1 tty console
# hpvmstatus -vp 11
Version A.03.50.00
[Virtual Machine Details]
Virtual Machine Name VM # OS Type State
==================== ===== ======= ========
bjdb62 11 HPUX Off
[Authorized Administrators]
Oper Groups:
Admin Groups:
Oper Users:
Admin Users:
[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
2 100.0% 100.0%
[Memory Details]
Total Reserved
Memory Memory
======= ========
4 GB 64 MB
[Storage Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
disk scsi 0 0 0 0 0 disk /dev/rdsk/c7t1d0
disk scsi 0 0 0 1 0 disk /dev/rdsk/c8t0d0
disk scsi 0 0 0 2 0 disk /dev/rdsk/c8t0d1
disk scsi 0 0 0 3 0 disk /dev/rdsk/c8t0d2
disk scsi 0 0 0 4 0 disk /dev/rdsk/c8t0d3
disk scsi 0 0 0 5 0 disk /dev/rdsk/c8t0d4
disk scsi 0 0 0 6 0 disk /dev/rdsk/c8t0d5
disk scsi 0 0 0 7 0 disk /dev/rdsk/c8t0d6
disk scsi 0 0 0 8 0 disk /dev/rdsk/c7t2d0
[Network Interface Details]
Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch lan vlan6 2 0 1 0 4a-b4-66-9b-3c-66
vswitch lan vlan7 2 0 2 0 5e-b9-a2-b3-78-6b
vswitch lan vlan8 5 0 4 0 0a-db-db-8d-50-e9
[Misc Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
serial com1 tty console
阅读(6868) | 评论(0) | 转发(0) |