在某此情况下,HP-UX系统上ioscan后容易出现NO_HW状态的盘,比如:

RX2604[/#]ioscan -fNnkC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      1  64000/0xfa00/0x0   esdisk   CLAIMED     DEVICE       HP      IR Volume
                      /dev/disk/disk1      /dev/disk/disk1_p2   /dev/rdisk/disk1     /dev/rdisk/disk1_p2
                      /dev/disk/disk1_p1   /dev/disk/disk1_p3   /dev/rdisk/disk1_p1  /dev/rdisk/disk1_p3
disk      3  64000/0xfa00/0x1   esdisk   CLAIMED     DEVICE       TEAC    DVD-ROM DW-224EV
                      /dev/disk/disk3   /dev/rdisk/disk3
disk      9  64000/0xfa00/0xb   esdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/disk/disk9   /dev/rdisk/disk9
disk     11  64000/0xfa00/0xd   esdisk   CLAIMED     DEVICE       HITACHI DF600F
                      /dev/disk/disk11   /dev/rdisk/disk11
disk     15  64000/0xfa00/0x10  esdisk   CLAIMED     DEVICE       HITACHI DF600F
                      /dev/disk/disk15   /dev/rdisk/disk15
disk     23  64000/0xfa00/0x14  esdisk   CLAIMED     DEVICE       HITACHI DF600F
                      /dev/disk/disk23   /dev/rdisk/disk23
disk     28  64000/0xfa00/0x16  esdisk   NO_HW       DEVICE       HP      P2000 G3 FC
                      /dev/disk/disk28   /dev/rdisk/disk28
disk     29  64000/0xfa00/0x17  esdisk   NO_HW       DEVICE       HP      P2000 G3 FC
                      /dev/disk/disk29   /dev/rdisk/disk29
disk     34  64000/0xfa00/0x18  esdisk   CLAIMED     DEVICE       HP      P2000 G3 FC
                      /dev/disk/disk34   /dev/rdisk/disk34
disk     35  64000/0xfa00/0x19  esdisk   CLAIMED     DEVICE       HP      P2000 G3 FC
                      /dev/disk/disk35   /dev/rdisk/disk35
RX2604[/#]

这种情况的出现是因为,disk28和disk29这2块盘之前有使用,后来在HP p2000的存储上删除重新划掉过,而disk34和disk35是新盘,在这台服务器上以前未使用过,所以状态是正常的。继续阅读

一、HP-UX的文件系统:

HP-UX主要使用HFS和VXFS两种文件系统,而这两种文件系统的主要特性和区别如下:

1.1 HFS

HFS是一种分层文件系统,早期由苹果开发,用于mac系统(mac基于unix),后来引入到其他unix系统。主要特性如下:

分层文件系统把一个卷分为许多512字节的“逻辑块”。这些逻辑块被编组为“分配块”,这些分配块可以根据卷的尺寸包含一个或多个逻辑块。HFS对地址分配块使用16位数值,分配块的最高限制数量是65536。

组成一个HFS卷需要下面的五个结构:

  • 卷的逻辑块0和1是启动块,它包含了系统启动信息。例如,启动时载入的系统名称和壳(通常是Finder)文件。
  • 逻辑块2包含主目录块Master Directory Block,简称MDB)。
  • 逻辑块3是卷位图Volume Bitmap)的启动块,它追踪分配块使用状态。
  • 总目录文件Catalog File)是一个包含所有文件的记录和储存在卷中目录的B*-tree。
  • 扩展溢出文件Extent Overflow File)是当最初总目录文件中三个扩展占用后,另外一个包含额外扩展记录的分配块对应信息的B*-tree。

1.2 VXFS

VeritasFileSystem(VxFS)是首个商业日志记录文件系统。通过日志记录功能,元数据更改首先写入到日志,然后再写入到磁盘。由于无需在多处写入更改,且元数据是异步写入的,因此吞吐量的速度较快。VxFS也是基于扩展区的意向日志记录文件系统。VxFS设计用于要求高性能和高可用性,并且可以处理大量数据的操作环境。

1.3 HP-UX默认文件系统:

配置文件 /etc/default/fs定义了hp-ux的默认文件系统:

# cat /etc/default/fs
LOCAL=vxfs

继续阅读

1、插入新盘、扫盘

#ioscan

2、为新添加磁盘创建设备文件

#insf -e

也可以指定单个磁盘硬件路径

#insf -e -H 0/0/1/0.0×0.0x0

3、查看新盘的Persistent DSF 与Legacy DSF(s)的对应关系,Legacy DSF(s)是hpux11.31之前的磁盘表现方式,/dev/dsk/c0t0d0。hpux11.31之后为了兼容,所以仍然在系统中同时使用此种设备表现方式。

#ioscan -m dsf

Persistent DSF           Legacy DSF(s)
========================================

/dev/rdisk/disk1         /dev/rdsk/c0t0d0继续阅读

HP-UNIX连EMC CX4-480存储有2个需要特别注意的地方:

  1. HBA卡的WWN地址在EMC存储上注册时需注意:Initiater Type为HP No Auto Trespass或CLARiiON Open,Failover Mode为4(当HP-Unix 11.31上不安装powerpath时)
QQ图片20160128160104
2. 建PV时,设备符的选择
db2[/#]ioscan -fnkC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
==================================================================
disk      0  0/0/0/2/0/0/0.8.0             sdisk   CLAIMED     DEVICE       HP      EH0146FAWJB
                      /dev/dsk/c0t8d0     /dev/dsk/c0t8d0s2   /dev/rdsk/c0t8d0    /dev/rdsk/c0t8d0s2
                      /dev/dsk/c0t8d0s1   /dev/dsk/c0t8d0s3   /dev/rdsk/c0t8d0s1  /dev/rdsk/c0t8d0s3
disk      1  0/0/0/2/0/0/0.8.1             sdisk   CLAIMED     DEVICE       HP      EH0146FAWJB
                      /dev/dsk/c0t8d1     /dev/dsk/c0t8d1s2   /dev/rdsk/c0t8d1    /dev/rdsk/c0t8d1s2
                      /dev/dsk/c0t8d1s1   /dev/dsk/c0t8d1s3   /dev/rdsk/c0t8d1s1  /dev/rdsk/c0t8d1s3
disk      4  0/0/0/5/0/0/0.2.23.255.0.0.0  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c2t0d0   /dev/rdsk/c2t0d0
disk     14  0/0/0/5/0/0/0.2.23.255.0.0.1  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c2t0d1   /dev/rdsk/c2t0d1
disk     15  0/0/0/5/0/0/0.2.23.255.0.0.2  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c2t0d2   /dev/rdsk/c2t0d2
disk     21  0/0/0/5/0/0/0.2.23.255.0.0.3  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c2t0d3   /dev/rdsk/c2t0d3
disk     25  0/0/0/5/0/0/0.2.23.255.0.0.4  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c2t0d4   /dev/rdsk/c2t0d4
disk      7  0/0/0/5/0/0/1.2.23.255.0.0.0  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c5t0d0   /dev/rdsk/c5t0d0
disk     10  0/0/0/5/0/0/1.2.23.255.0.0.1  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c5t0d1   /dev/rdsk/c5t0d1
disk     11  0/0/0/5/0/0/1.2.23.255.0.0.2  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c5t0d2   /dev/rdsk/c5t0d2
disk     23  0/0/0/5/0/0/1.2.23.255.0.0.3  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c5t0d3   /dev/rdsk/c5t0d3
disk     27  0/0/0/5/0/0/1.2.23.255.0.0.4  sdisk   CLAIMED     DEVICE       DGC     RAID 5
                      /dev/dsk/c5t0d4   /dev/rdsk/c5t0d4
    
db2[/#]strings /etc/lvmtab
/dev/vg00
M6(^
/dev/disk/disk2_p2
/dev/dsk/c0t8d0s2
/dev/vgarch
/dev/dsk/c5t0d3
/dev/dsk/c3t0d3
/dev/dsk/c2t0d3
/dev/vglock
/dev/dsk/c5t0d1
/dev/vgdb
/dev/dsk/c5t0d0
/dev/dsk/c2t0d0
/dev/vgadd
/dev/dsk/c2t0d4
/dev/dsk/c5t0d4
/dev/dsk/c3t0d4
/dev/dsk/c4t0d4

db2[/#]ioscan -m dsf
Persistent DSF           Legacy DSF(s)
========================================
/dev/rchgr/autoch1       /dev/rac/c6t0d1
/dev/rdisk/disk2         /dev/rdsk/c0t8d1
/dev/rdisk/disk2_p1      /dev/rdsk/c0t8d1s1
/dev/rdisk/disk2_p2      /dev/rdsk/c0t8d1s2
/dev/rdisk/disk2_p3      /dev/rdsk/c0t8d1s3
/dev/rtape/tape1_BEST    /dev/rmt/c6t0d0BEST
/dev/rtape/tape1_BESTn   /dev/rmt/c6t0d0BESTn
/dev/rtape/tape1_BESTb   /dev/rmt/c6t0d0BESTb
/dev/rtape/tape1_BESTnb   /dev/rmt/c6t0d0BESTnb
/dev/rdisk/disk3         /dev/rdsk/c0t8d0
/dev/rdisk/disk3_p1      /dev/rdsk/c0t8d0s1
/dev/rdisk/disk3_p3      /dev/rdsk/c0t8d0s3
/dev/rdisk/disk3_p2      /dev/rdsk/c0t8d0s2
/dev/rdisk/disk9         /dev/rdsk/c5t0d0
                         /dev/rdsk/c2t0d0
/dev/rdisk/disk18        /dev/rdsk/c5t0d1
                         /dev/rdsk/c2t0d1
/dev/rdisk/disk19        /dev/rdsk/c5t0d2
                         /dev/rdsk/c2t0d2
/dev/rdisk/disk24        /dev/rdsk/c5t0d3
                         /dev/rdsk/c2t0d3
/dev/rdisk/disk26        /dev/rdsk/c5t0d4
                         /dev/rdsk/c2t0d4

可以看到连上存储后有两种设备符Persistent DSF和Legacy DSF(s),其中Persistent DSF聚合后的设备符,而Legacy DSF(s)指的是每根链路的设备符。

创建PV时应该使用Persistent DSF,但是要去掉r,如pvcreate /dev/disk/disk26

另外官方建议超时时间为180:

pvchange -t 180 /dev/disk/disk26