当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > VxVM中的底层建卷

Unix/Linux
Linux系统下配置CVS服务器
Linux内核 Kernel 最新稳定版2.6.26发布
LINUX系统2.4内核升级到2.6内核
Linux系统下添加硬盘+分区+格式化详解
Linux下的安装和配置DNS服务器
自动备份Linux/Unix服务器的数据
Windows系统下通过xmanager远程桌面控制Linux
LINUX系统下JRE的安装
LINUX桌面环境 KDE 4.1 RC1发布下载
Linux系统下卸载自带Mysql、Apache、Php
Linux系统下监控和调整机器温度
Linux系统下生成引导盘与驱动程序盘的方法
Linux Mint 5 XFCE Community Edition RC1 (BETA 025) 本月17日开始发布
Linux下关闭不必要的系统服务以加快速度
Red Hat Enterprise Linux AS release 4 apache+MYsql+PHP的安装和优化
详解Linux系统日志管理
简单查看linux64位/32位的命令!
用rsync实现网站镜像和备份
以root身份telnet连接LINUX服务器
linux系统strace命令用法

Unix/Linux 中的 VxVM中的底层建卷


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 79 ::
收藏到网摘: n/a


vxmake从底层做卷,比起用vxassist直接卷,更具有挑战性,更能够帮助我们理解VxVM卷的结构! 例1:做镜像,步骤是先做两子磁盘和plex,再镜像两plex #vxassist make aaa 100m layout=mirror new01 new02 (raid0) #vxmake –g new sd new01-01 new01,0,100m (子磁盘) #vxmake –g new sd new02-01 new02,0,100m # vxmake -g new plex aaa-01 sd=new01-01 (plex) # vxmake -g new plex aaa-02 sd=new02-01 #vxmake –g new –U fsgen vol aaa plex=aaa-01 (关联vol) #vxplex att aaa aaa-01 #vxvol start aaa (起动vol) #newfs /dev/vx/dsk/new/aaa #mount /dev/vx/dsk/new/aaa /data 例2:做条带化,其中注意vxvm带的默认stwidth为64K,所以在做条带plex,一定要指定 #vxassist make aaa 100m layout=stripe new01 new02 #vxmake –g new sd new01-01 new01,0,100m (子磁盘) #vxmake –g new sd new02-01 new02,0,100m #vxmake -g new plex aaa-01 layout=stripe ncolumn=2 stwidth=64k sd=new01-01,new02-01 #vxmake –g new –U fsgen vol aaa plex=aaa-01 #vxvol start aaa 做个小试验,可以将stripe的子磁盘,全部打乱,再重新组合! #vxassist make aaa 100m layout=stripe new01 new02 new03 #vxsd –f dis new01-01 (RAID子磁盘的再组合) #vxsd –f dis new02-01 #vxsd –f dis new03-01 # vxsd -l 0 assoc aaa-01 new01-01 (结合stripe子磁盘) # vxsd -l 2 assoc aaa-01 new03-01 # vxsd -l 1 assoc aaa-01 new02-01 #vxplex att aaa aaa-01 #vxvol start aaa 例3:raid0+1和做两个stripe差不多 #vxassit make aaa 100m layout=mirror-stripe new01 new02 new03 new04 #vxmake –g new sd new01-01 new01,0,100m (子磁盘) #vxmake –g new sd new02-01 new02,0,100m #vxmake –g new sd new03-01 new03,0,100m #vxmake –g new sd new04-01 new04,0,100m #vxmake -g new plex aaa-01 layout=stripe ncolumn=2 stwidth=64k sd=new01-01,new02-01 #vxmake –g new plex aaa-02 layout=stripe ncolumn=2 stwidth=64k sd=new03-01,new04-01 #vxmake –g new –U fsgen vol aaa plex=aaa-01 (stripe卷) #vxplex att aaa aaa-02 #vxvol start aaa 小试验,位于卷aaa,两个条带的相对位子磁盘同时损坏,这时raid01就己经瘫痪了,唯一的办法就是把两个条带的子磁盘分离出来,再给合成一个新的卷,及时备份数据!这种操作有一定的危险性,有时重组后会无法起动卷,起动卷后卷只读,所以要格外小心! # vxassit make aaa 100m layout=mirror-stripe new01 new02 new03 new04 #new01 new04损坏 (RAID01子磁盘重组) #vxplex dis aaa-01 #vxsd –f dis new01-01 #vxsd –f dis new04-01 #vxmake –g new sd new01-01 new01,0,102400 #vxmake –g new sd new04-01 new04,0,103600 #vxsd –f dis new02-01 #vxsd –l 1 assoc aaa-02 new02-01 (残余子磁盘合成卷) #vxvol –f start aaa #vxsd mv new02-01 new04-01 (移动子磁盘) #vxsd –l 0 assoc aaa-01 new01-01 #vxsd –l 1 assoc aaa-01 new02-01 #vxplex att aaa aaa-01 (plex再结合) # vxassit make aaa 100m layout=mirror-stripe new01 new02 new03 new04 #vxplex dis aaa-01 #vxsd dis new02-01 (交换子磁盘) #vxsd dis new04-01 #vxsd –l 1 assoc aaa-01 new04-01 #vxsd –l 1 assoc aaa-02 new02-01 #vxplex att aaa aaa-01 #vxmake –g new –U fsgen vol bbb plex=aaa-01 #vxvol start bbb 例4:做raid5卷,raid5也就是特殊的条带化,子磁盘同样可以分离重组 #vxassist make aaa 200m layout=raid5 new01 new02 new03 new04 #vxmake –g new sd new01-01 new01,0,100m #vxmake –g new sd new02-01 new02,0,100m #vxmake –g new sd new03-01 new03,0,100m #vxmake –g new plex aaa-01 layout=raid5 ncolumn=3 stwidth=16k/ (默认16k) sd=new01-01,new02-01,new03-01 #vxmake –g new –U raid5 vol aaa plex=aaa-01 #vxvol start aaa #vxassist –g new addlog aaa #newfs /dev/vx/dsk/new/aaa #vxassist make aaa 200m layout=raid5 new01 new02 new03 new04 #vxsd –f dis new03-01 #vxsd –l 2 assoc aaa-01 new03-01