HPUX 11.31已经于2007年2月正式发布了,目前国内使用的还不多,但是很快就会我们要主要support的版本了。V3版本的一个最大的变化就是磁盘设备名(device special file-DSF)
的变化,采用简洁的称为永久设备名(Persistent device special files),即类似于Tru64及AIX的diskn的名称方式,尽管为了兼容性,还保留了传统的硬件路径式的命名方式(即cXtYdZ)。
V3以前的版本采用的是legacy DSF,翻译过来的中文系统管理里称为旧设备文件,总是感觉不那么贴切,只是字面意思,如果我们看了中文会以为英文原来可能是old DSF呢。这种名字是和硬件路径绑定的,如devdskc3t15d0,是Instance 3, SCSI ID 15,LUN 0。如果采用这种命名方式,对应每一条物理路径就会有一个设备名,对于XP磁盘阵列上的一个lun或者EVA上的Vdisk就可能有8条路径之多(对于V2系统一个LUN最多支持8个路径,V3可以32个),并且如果San环境变化,如换HBA卡,改变Switch Domain ID等还会引起设备名的改变。由于多路径,考虑IO问题,于是有了Secure Path或者Auto Path这样的软件。
V3采用永久设备名后,这些问题变得简单了,如devdiskdisk3,对于一个lun只有一个设备名,并且不再和物理路径绑定,而是和LUN的 WorldWide Identifier (WWID)绑定,只要WWID不变,设备名就不变,把物理设备拔掉再插回也不变,新加入的设备只会分配新的设备名。不再需要多路径软件了,能自动实现load balance功能,如果链路失败系统会取消该链路,当发现新链路时自动发现并加入load balance。下面介绍针对永久设备名的出现几个命令的使用。
ioscan的用法
# ioscan -N –fknCdisk 显示永久设备名
Class I HW Path Driver SW State HW Type Description
===================================================================
disk 2 640000xfa000x0 esdisk CLAIMED DEVICE TEAC DV-28E-
C
devdiskdisk2 devrdiskdisk2
disk 3 640000xfa000x1 esdisk CLAIMED DEVICE HP 36.4GST33675
3LC
devdiskdisk3 devrdiskdisk3
devdiskdisk3_p1 devrdiskdisk3_p1
devdiskdisk3_p2 devrdiskdisk3_p2
devdiskdisk3_p3 devrdiskdisk3_p3
disk 5 640000xfa000x5 esdisk CLAIMED DEVICE HP 36.4GST33675
3LC
devdiskdisk5 devrdiskdisk5
# ioscan -m lun 显示永久设备名
Class I Lun HW Path Driver SW State HW Type Health Description
======================================================================
disk 2 640000xfa000x0 esdisk CLAIMED DEVICE online TEAC
DV-28E-C
0020.0.0x0.0x0
devdiskdisk2 devrdiskdisk2
disk 3 640000xfa000x1 esdisk CLAIMED DEVICE online HP 36.4
GST336753LC
0110.0x1.0x0
devdiskdisk3 devrdiskdisk3
devdiskdisk3_p1 devrdiskdisk3_p1
devdiskdisk3_p2 devrdiskdisk3_p2
devdiskdisk3_p3 devrdiskdisk3_p3
disk 5 640000xfa000x5 esdisk CLAIMED DEVICE online HP 36.4
GST336753LC
0111.0x2.0x0
devdiskdisk5 devrdi
skdisk5
devdiskdisk5_p1 devrdiskdisk5_p1
devdiskdisk5_p2 devrdiskdisk5_p2
devdiskdisk5_p3 devrdiskdisk5_p3
# ioscan -m dsf 查看永久设备名和旧设备名之间的对应关系
Persistent DSF Legacy DSF(s)
========================================
devrdiskdisk2 devrdskc0t0d0
devrdiskdisk3 devrdskc2t1d0
devrdiskdisk3_p1 devrdskc2t1d0s1
devrdiskdisk3_p2 devrdskc2t1d0s2
devrdiskdisk3_p3 devrdskc2t1d0s3
devrdiskdisk5 devrdskc3t2d0
# ioscan -P health -C disk 检查磁盘online状态
Class I HW Path health
===============================
disk 2 640000xfa000x0 online
disk 3 640000xfa000x1 online
disk 5 640000xfa000x5 online
# rmsf –L 取消旧设备命
WARNING This command may be disruptive to the system.
Before running this command, make sure you have first run
iofind(1M) and migrated all applications using legacy device
special files. Plea refer to the man page of rmsf(1M) to
verify the possible side effects of the option '-L'.
Do you want to continue
(You must respond with 'y' or 'n'.) y
rmsf Legacy mode has been successfully disabled
# ioscan -funCdisk
# insf –L 恢复旧设备名
This command will re-install all legacy IO nodes and legacy DSFs.
Do you want to continue
(You must respond with 'y' or 'n'.) y
insf Legacy mode has been successfully enabled
# ioscan -funCdisk
Class I HW Path Driver SW State HW Type Description
=======================================================================
disk 1 0020.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
devdskc0t0d0 devrdskc0t0d0
disk 0 0110.1.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC
devdskc2t1d0 devrdskc2t1d0
devdskc2t1d0s1 devrdskc2t1d0s1
devdskc2t1d0s2 devrdskc2t1d0s2
devdskc2t1d0s3 devrdskc2t1d0s3
disk 4 0111.2.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC
devdskc3t2d0 devrdskc3t2d0
如果采用永久设备名,在做vgimport时,需要使用新参数N,否则将使用旧设备文件名。
# vgimport -s -m tmpvgdata.map -N vgdata
vgimport Volume group devvgdata has been successfully created.
Warning A backup of this volume group may not exist on this machine.
Plea remember to take a backup using the vgcfgbackup command after activating
the volume group.
# strings etclvmtab
devvg00
devdiskdisk3_p2
devvgdata
devdiskdisk5
# vgimport -s -m tmpvgdata.map vgdata
vgimport Volume group devvgdata has been successfully created.
Warning A backup of this volume group may not exist on this machine.
Plea remember to take a backup using the vgcfgbackup command after activating
the volume group.
# strings etclvmtab
devvg00
devdiskdisk3_p2
devvgdata
devdskc3t2d0