您的位置:首页 > 电脑网络 > 电脑配件 > 在HPUX上配置emc存储

在HPUX上配置emc存储

luyued 发布于 2011-02-05 12:36   浏览 N 次  

1、在客户端安装EMC host base Agent

mount -F cdfs -o cdcase /dev/dsk/c0t0d0 /cdrom

(只有这样的mount才可以读到正确的emc碟)

swinstall -s /cdrom

2、在EMC Manager Server上建Raid Group(group 3)

3、在Raid Group上建LUN(lun 8)

4、建一个新的Storage Group (js-wap01)

5、在Storage Group (js-wap01)中把js-wap01加入hosts(右键js-wap01-->属性)

6、在Storage Group (js-wap01)中把lun 8加入luns

7、在Hosts(最上面tab)中可以看到js-wap01,打开luns,可看到硬件号为c8t0d0

8、在EMC上做failover,菜单为tools-->failover setup wizard

参数为Configuration Summary

=====================

Host: js_wap01

Initiator Type: HP Auto Trespass

Failover Mode: 0

Array CommPath: true

Storage System(s):

CK200041400381

如下图:

9、在js-wap01使用ioscan -fnC disk

# ioscan -fnC disk

Class I H/W Path Driver S/W State H/W Type Description

===========================================================================

disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C

/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0

disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 36.4GMAS3367NC

/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0

disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 36.4GMAS3367NC

/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0

disk 8 0/3/1/0.1.15.0.0.0.0 sdisk CLAIMED DEVICE DGC CX400WDR5

/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0

disk 4 0/3/1/0.1.31.0.0.0.0 sdisk CLAIMED DEVICE DGC CX400WDR5

/dev/dsk/c9t0d0 /dev/rdsk/c9t0d0

disk 6 0/4/1/0.1.15.0.0.0.0 sdisk CLAIMED DEVICE DGC CX400WDR5

/dev/dsk/c10t0d0 /dev/rdsk/c10t0d0

disk 5 0/4/1/0.1.31.0.0.0.0 sdisk CLAIMED DEVICE DGC CX400WDR5

/dev/dsk/c11t0d0 /dev/rdsk/c11t0d0

10、创建物理卷:

#pvcreate /dev/rdsk /c8t0d0

11、创建卷组

11.1、用卷组名在/dev下创建一目录。

如果卷组名为vg_miscfile则目录为:/dev/vg_miscfile

#mkdir /dev/vg_miscfile.

11.2、在此目录下为该卷组创建一组设备文件。

#mknod /dev/vg_miscfile/group c 64 0x010000

12、创建卷组(以物理卷为参数):

#vgcreate /dev/vg_miscfile /dev/dsk/c8t0d0.

建完后,可以用命令:vgdisplay来检查设置是否正确。

13、创建逻辑卷。

创建逻辑卷时,相应的字符设备和块设备会在卷组目录下生成。

现在,我们在卷组vg_miscfile中创建以下逻辑卷:

一个512MB,名为lv_miscfile的逻辑卷。

#lvcreate -L 512 -n lv_miscfile /dev/vg_miscfile

参数:-L 以MB为单位表示逻辑卷的大小。

-n 指定逻辑卷名称,缺省为:lvol1,lvol2…..。

【hpux】如果涉及多个卷组,最好加上卷组名称比如:

#lvcreate -n lvname vgname

14、創建文件系統。

文件系统建在/dev/vg00/lvoldb01上创建JFS文件系统,如下命令:

#newfs –F vxfs /dev/vg_miscfile/r lv_miscfile

注:一定要有字母r

#newfs -o largefiles -F vxfs /dev/vg_cdrlog/rlv_cdrlog

创建大文件系统

#fsadm -F vxfs -o largefile /oralce

修改文件系统为大文件系统

15、挂载文件系统。

15.1、创建挂载点:

#mkdir /miscfile

15.2、用mount实现挂载:

#mount -F vxfs /dev/vg_miscfile/lv_miscfile /miscfile。

现在可用bdf显示所有挂起的卷。

16、针对EMC存储做VG的容错处理

# vgextend vg_miscfile /dev/dsk/c10t0d0

Volume group "vg_miscfile" has been successfully extended.

Volume Group configuration for /dev/vg_miscfile has been saved in /etc/lvmconf/vg_miscfile.conf

# vgextend vg_miscfile /dev/dsk/c9t0d0

Current path "/dev/dsk/c10t0d0" is an alternate link, skip.

Volume group "vg_miscfile" has been successfully extended.

Volume Group configuration for /dev/vg_miscfile has been saved in /etc/lvmconf/vg_miscfile.conf

# vgextend vg_miscfile /dev/dsk/c11t0d0

Current path "/dev/dsk/c10t0d0" is an alternate link, skip.

Current path "/dev/dsk/c9t0d0" is an alternate link, skip.

Volume group "vg_miscfile" has been successfully extended.

Volume Group configuration for /dev/vg_miscfile has been saved in /etc/lvmconf/vg_miscfile.conf

# vgdisplay -v /dev/vg_miscfile

--- Volume groups ---

VG Name /dev/vg_miscfile

VG Write Access read/write

VG Status available

Max LV 255

Cur LV 1

Open LV 1

Max PV 16

Cur PV 1

Act PV 1

Max PE per PV 1016

VGDA 2

PE Size (Mbytes) 4

Total PE 255

Alloc PE 128

Free PE 127

Total PVG 0

Total Spare PVs 0

Total Spare PVs in use 0

--- Logical volumes ---

LV Name /dev/vg_miscfile/lv_miscfile

LV Status available/syncd

LV Size (Mbytes) 512

Current LE 128

Allocated PE 128

Used PV 1

--- Physical volumes ---

PV Name /dev/dsk/c8t0d0

PV Name /dev/dsk/c10t0d0 Alternate Link

PV Name /dev/dsk/c9t0d0 Alternate Link

PV Name /dev/dsk/c11t0d0 Alternate Link

PV Status available

Total PE 255

Free PE 127

Autoswitch On

16、编辑/etc/fstab文件,以便在机器启动时自动Mount上刚建的文件系统

# cat /etc/fstab

# System /etc/fstab file. Static information about the file systems

# See fstab(4) and sam(1M) for further details on configuring devices.

/dev/vg00/lvol3 / vxfs delaylog 0 1

/dev/vg00/lvol1 /stand hfs defaults 0 1

/dev/vg00/lvol4 /tmp vxfs delaylog 0 2

/dev/vg00/lvol5 /home vxfs delaylog 0 2

/dev/vg00/lvol6 /opt vxfs delaylog 0 2

/dev/vg00/lvol7 /usr vxfs delaylog 0 2

/dev/vg00/lvol8 /var vxfs delaylog 0 2

/dev/vg00/lvol9 /oracle vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2

/dev/vg_miscfile/lv_miscfile /miscfile vxfs rw,suid,largefiles,delaylog,datainlog 0 2

#

注:EMC配置是出现的错误

在配置EMC时没有做步骤8(8、在EMC上做failover)时出现如下现象:

1、在HP UX上无法扩展VG,实现FailOver

# vgextend vg_miscfile /dev/dsk/c9t0d0

vgextend: Couldn't open physical volume "/dev/dsk/c9t0d0":

I/O error

# pvcreate /dev/dsk/c9t0d0

pvcreate: Couldn't open physical volume "/dev/dsk/c9t0d0":

I/O error

# pvcreate /dev/rdsk/c9t0d0

# vgextend vg_miscfile /dev/dsk/c9t0d0

vgextend: Couldn't open physical volume "/dev/dsk/c9t0d0":

I/O error

说明EMC配置上还没有做Failover功能,HP UX可以通过ioscan看到,但不可控制

# pvcreate /dev/rdsk/c10t0d0

pvcreate: The physical volume already belongs to a volume group

说明c10t0d0为VG中PV的可替换连接,为/dev/rdsk/c8t0d0,也说明了可替换连接是不用pvcreate创建的

注解1:在hp unix没有安装emc host base agent时,ux是可以看到四个disk(ioscan -fnCdisk),实际上是一个LUN,不同的连接路径,但不可以读写。

注解2:安装完agent后,ux一样可以看到,但不可读写。

注解3:在emc上配置lun、raid group、storage group后,ux可以读写c8t0d0、c10t0d0(主要看lun是由那个SP控制的),c9t0d0、c11t0d0不可读写

注解4:在emc上配置完failover后,ux就可以读写所有四个路径了

# strings /etc/lvmtab

/dev/vg00

/dev/dsk/c2t0d0

/dev/dsk/c2t1d0

/dev/vg_miscfile

/dev/dsk/c8t0d0

/dev/dsk/c10t0d0

/dev/dsk/c9t0d0

/dev/dsk/c11t0d0

#

游戏结束了!在这祝大家开心快乐每一天!

图文资讯
广告赞助商