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

Unix/Linux
Fedora Core 5(FC-5)正式版下载
Fedora 7.0 中文输入法
Fedora Core 8中yum设置
官方发布 Fedora 9 Re-Spin
防止SSH暴力破解密码的方法(DenyHosts)
让Fedora6 支持超过4G的内存
Fedora 9官方最终版下载
重装Windows系统,修复Fedora Linux启动
Fedora linux启动时网卡eth0激活慢
Fedora 9.0 Apache+PHP+MYSQL 环境安装
Fedora 4升级到Fedora 9
Linux x86_64下安装Flash Player 9
Fedora 9.0下触摸板不能点击的解决方案
fedora 系统下grub修复
Fedora 9 texlive + vim-latex + kile安装配置
运行fedora 9下的3D特效
装完Fedora 9后系统的简单设置
Fedora系统下检测声卡的命令
Fedora 9 系统下ALSA声卡驱动下载及安装方法
Fedora环境下快速建立chroot环境的方法

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


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