VxVM基本应用Word文档下载推荐.docx
《VxVM基本应用Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《VxVM基本应用Word文档下载推荐.docx(13页珍藏版)》请在冰豆网上搜索。
_vxdiskadd——此命令用于向VolumeManager添加标准磁盘。
vxdiskadd通过显
示信息和提示,帮助您完成初始化新磁盘的过程。
_vxdisk——此命令管理受VxVM控制的磁盘。
vxdisk定义特殊磁盘设备,初始化
存储在磁盘上的信息(VolumeManager用此信息标识和管理磁盘),并执行其它的
特殊操作。
_vxdg——此命令在磁盘组上操作。
vxdg创建新磁盘组并管理现有的磁盘组。
1.初始化磁盘
bash-3.2#vxdiskinitdisk_0
bash-3.2#vxdisklist
DEVICETYPEDISKGROUPSTATUS
c0d0s2auto:
none--onlineinvalid
disk_0auto:
cdsdisk--online
disk_1auto:
disk_2auto:
disk_3auto:
disk_4auto:
2.创建磁盘组(DG)
bash-3.2#vxdginitdatadgdatadg01=disk_0
cdsdiskdatadg01datadgonline
必须先用(vxdiskinitdisk_1)初始化磁盘,才能将磁盘添加到创建的磁盘组中(vxdginitdatadgdatadg01=disk_0),否则报一下错误。
bash-3.2#vxdginitdata2dgdatadg02=disk_1
VxVMvxdgERRORV-5-1-6478Devicedisk_1cannotbeaddedtoaCDSdiskgroup
3.交互式初始化磁盘并创建(或加入)磁盘组
bash-3.2#vxdiskadddisk_1
Addorinitializedisks
Menu:
VolumeManager/Disk/AddDisks
Hereisthediskselected.Outputformat:
[Device_Name]
disk_1
Continueoperation?
[y,n,q,?
](default:
y)y
Youcanchoosetoaddthisdisktoanexistingdiskgroup,a
newdiskgroup,orleavethediskavailableforusebyfuture
addorreplacementoperations.Tocreateanewdiskgroup,
selectadiskgroupnamethatdoesnotyetexist.Toleave
thediskavailableforfutureuse,specifyadiskgroupname
of"
none"
.
Whichdiskgroup[<
group>
none,list,q,?
none)list
NAMESTATEID
datadgenabled,cds1422090775.11.teamsun
none)datadg//可以加入已有的磁盘组,也可以创建新的磁盘组
Useadefaultdisknameforthedisk?
Adddiskasasparediskfordatadg?
n)n
Excludediskfromhot-relocationuse?
Addsitetagtodisk?
Theselecteddiskswillbeaddedtothediskgroupdatadgwith
defaultdisknames.
Continuewithoperation?
Initializingdevicedisk_1.
Enterdesiredprivateregionlength
[<
privlen>
q,?
65536)
VxVMNOTICEV-5-2-88
Addingdiskdevicedisk_1todiskgroupdatadgwithdisk
namedatadg02.
Goodbye.
cdsdiskdatadg02datadgonline
也可以使用vxdiskadm中的菜单指示完成初始化
4.添加磁盘到磁盘组
bash-3.2#vxdiskinitdisk_2
bash-3.2#vxdg-gdatadgadddiskdatadg03=disk_2
cdsdiskdatadg03datadgonline
5.从磁盘组删除磁盘
A.直接删除
bash-3.2#vxdg-gdatadgrmdiskdatadg02
B.vxdiskadm操作
bash-3.2#vxdiskadm
VolumeManagerSupportOperations
VolumeManager/Disk
1Addorinitializeoneormoredisks
2Encapsulateoneormoredisks
3Removeadisk
4Removeadiskforreplacement
5Replaceafailedorremoveddisk
6Mirrorvolumesonadisk
7Movevolumesfromadisk
8Enableaccessto(import)adiskgroup
9Removeaccessto(deport)adiskgroup
10Enable(online)adiskdevice
11Disable(offline)adiskdevice
12Markadiskasaspareforadiskgroup
13Turnoffthespareflagonadisk
14Unrelocatesubdisksbacktoadisk
15Excludeadiskfromhot-relocationuse
16Makeadiskavailableforhot-relocationuse
17Preventmultipathing/SuppressdevicesfromVxVM'
sview
18Allowmultipathing/UnsuppressdevicesfromVxVM'
19Listcurrentlysuppressed/non-multipatheddevices
20Changethedisknamingscheme
21Getthenewlyconnected/zoneddisksinVxVMview
22Change/Displaythedefaultdisklayouts
listListdiskinformation
?
Displayhelpaboutmenu
?
Displayhelpaboutthemenuingsystem
qExitfrommenus
Selectanoperationtoperform:
3
Removeadisk
VolumeManager/Disk/RemoveDisk
Usethisoperationtoremoveadiskfromadiskgroup.This
operationtakes,asinput,adiskname.Thisisthesamename
thatyougavetothediskwhenyouaddedthedisktothedisk
group.
Enterdiskname[<
disk>
list,q,?
]list
Diskgroup:
datadg
DMNAMEDEVICETYPEPRIVLENPUBLENSTATE
dmdatadg01disk_0auto6553610403584-
dmdatadg02disk_1auto655364112128-
dmdatadg03disk_2auto655366213376-
]datadg03
VxVMNOTICEV-5-2-284Requestedoperationistoremovediskdatadg03fromgroupdatadg.
VxVMINFOV-5-2-268Removalofdiskdatadg03iscomplete.
Removeanotherdisk?
三.Vxmake创建卷
1.创建条带化卷
A.创建VMDisk(dm):
Vx控制下的磁盘被称为VMDisk
B.在VMDisk上面创建SubDisk(sd):
在两个磁盘上创建大小为1g的subdisk
bash-3.2#vxmake-gdatadgsddatadg01-01datadg01,0g,1g
-g-----------------------磁盘组的名称
Sd------------------------subdisk的名称
C.在SubDisk(sd)上创建plex(pl):
bash-3.2#vxmake-gdatadgplexvol-raid0-stripelayout=stripencolumn=2stwidth=32ksd=datadg01-01,datadg02-01
Layout-------------------RAID类型
Ncolumn---------------------磁盘的‘列’数,几块盘
Stwidth-----------------------------存放数据的宽度
Sd-----------------------------------------subdisk的个数
D.用plex组建vol并激活卷
bash-3.2#vxmake-gdatadg-Ufsgenvolvol01-raid0plex=vol-raid0-stripe
-g--------------磁盘组名称
-U-----------------
Vol-----------------卷名称
Plex-----------------组建卷的plex名称
E.激活所创建的条带卷
bash-3.2#vxvol-gdatadgstartvol01-raid0
F.创建文件系统
bash-3.2#newfs/dev/vx/rdsk/datadg/vol01-raid0
G.挂载所创建的条带卷
四.Vxassist创建卷
在数据同步过程中plex状态为TEMP,同步完成后会变为ACTIVE
1.创建简单卷
bash-3.2#vxassist-gdatadgmakesimplevol1g
-u---------------”-U”指定了两种类型的用法:
gen或fsgen。
”gen”是指rawvolume(裸设备卷-字符设备);
”fsgen”是指regularvolume(字符设备和块设备)。
-g----------------磁盘组
2.移除简单卷
bash-3.2#vxassist-gdatadgremovevolumesimplevol
volume----------要移除的卷名称
3.创建条带卷
bash-3.2#vxassist-gdatadg-Ufsgenmakestripevol1glayout=stripe
layout----------------指定raid类型
4.创建镜像卷
bash-3.2#vxassist-ufsgen-gdatadgmakemirrorvol3800mlayout=mirror-concat
layout----------------可以选择mirror-concatmirror-stripestripe-mirror,一般默认制作的镜像卷应该是mirror-concat
ncolumns-------------(subDisk的个数)
stwidth---------指定条带读写大小(如果涉及到条带,要加此参数)
nmirror--------指定镜像个数
5.创建raid5卷
至少需要3个vmdisk创建RAID5volume(4个更好)。
其中,3个subdisk用来构建volume本身,1个subdisk会被自动创建为RAID5日志plex。
RAID5日志用于volumemetadata(元数据)和parity(校验位)的日志。