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

Unix/Linux
Linux系统下如何监视系统资源使用率
怎样在Red Hat Linux上使用BIND建立DNS服务器
多点触控技术终于在Linux中实现
中科红旗Linux桌面7.0版引入QtSDK组件
系统启动管理器与GRUB
Linux系统下配置CVS集成cvstrac
解析Linux操作系统下usr的目录结构
Linux系统与Windows系统的线程有何不同
黑客怎样入侵Linux系统
维护inittab配置文件时需要注意的事项
FreeBSD为powerd设置cpu最小工作频率
如何配置Linux才能保证其系统的安全
光驱的软开关与限速简介
新手教程之创建锁文件的方法
双系统计算机怎样卸载其中一个?
运行Linux时的快捷键使用
phpMyAdmin安装方法及介绍
Wine中中文存在很多的乱码怎么解决?
Linux教程:tail命令的巧妙应用
Wget命令来浏览网页的方法

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 25 ::
收藏到网摘: 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