ASMCMD中有什么命令

54次阅读
没有评论

共计 4008 个字符,预计需要花费 11 分钟才能阅读完成。

这篇文章给大家分享的是有关 ASMCMD 中有什么命令的内容。丸趣 TV 小编觉得挺实用的,因此分享给大家做个参考,一起跟随丸趣 TV 小编过来看看吧。

md_backup: 将 disk group 中的 metadata 备份到文件; md_backup /tmp/backupfile -G DATAGP

md_restore: 将备份文件中的 metadata 恢复到 disk group;  md_restore -full -G data –silent /tmp/file

lsattr: 列出 disk group 的属性; lsattr -l -G DATAGP

setattr: 设置 disk group 的属性; setattr -G DATAGP compataible.asm 11.2.0.0.0

cd, cp, du, help, ls, makedir, pwd, rm

find: 查找; find –type CONTROLFILE +data/orcl *

lsct: 显示 v$asm_client 的信息, ASM client 的信息; lsct DATAGP

lsdg: 显示 disk group 的信息,v$asm_diskgroup and v$asm_diskgroup_stat; lsdg DATAGP

lsof: 显示 local clients 的 open files; lsof -G DATAGP

mkalias: 给文件取个别名; mkalias SYSAUX.235.34323 sysaux.f; ls –absolutepath 可以查看

rmalias: 删除别名; rmalias sysaux.f

chdg: 修改 disk group, add 或 drop disk; chdg DATAGP_config.xml

chkdg: check 或 repair disk group 的 metadata; chkdg –repair DATAGP

dropdg: drop disk group; dropdg -r -f DATAGP

iostat: 查看 I /O statics 通过 v$asm_disk_iostat; iostat -G DATAGP

lsdsk: list ASM disks; lsdsk -p -G DATAGP /dev/raw/* ; lsdsk –candidate -p

lsod: list open ASM disks; lsod -G DATAGP

mkdg: create disk group based on a xml file; mkdg DATAGP_config.xml

mount: mount a disk group; mount -f DATAGP; mount –restrict DATAGP; mount -a

offline: offline disks or failure groups that belong to disk group. offline -G DATAGP -F FG1

online: online disks or a failure group; online -G DATAGP -D data_0001 –power=3

rebal: rebalance a disk group; rebal –power 4 DATAGP

remap: mark blocks as unusable on the disk and relocates data; remap DATAGP data_0001 500-700

umount: dismount a disk group; unmount -f DATAGP

pwcopy: copy password file; pwcopy –asm +DG/mydir/mypwfile +DG1/mypwfile

pwcreate: create password file for sys; pwcreate –asm +DG/mdir/mypwfile welcome

pwdelete: delete password file; pwdelete –asm +DG/mydir/mypwfile

pwget: get the location of password file; pwget –asm

pwmove: move password file; pwmove –asm +DG/mydir/mypwfile +DG1/mypwfile

pwset: set the location of password file; pwset -dbuniquename aime1 +DG/mydir/mypwfile

dsget: get the discovery disk string;  dsget

dsset: set the discovery disk string;  dsset /dev/raw/*

lsop: list current operations on disk group from v$asm_operation; lsop

shutdown: shutdown ASM instance; shut immediate

spbackup: backup ASM Spfile; spbackup +DATA/asm/asmprameterfile/register.323.234
+DATA/spf.bak

spcopy: copy spfile; spcopy +DATA/asm/asmprameterfile/register.323.234 +DATA/spf.ora

spget: get the spfile location; spget

spmove: move spfile; spmove +DATA/spf.ora +DATA1/spf.ora

spset: set the location of spfile; spset +DATA/spf.ora

startup: start up ASM instance; startup –nomount –pfile asm.ora

chtmpl: 改变 template 的属性;chtmpl -G DATAGP –redundancy high –striping fine mytemplate

lstmpl: list templates; ls -l -G DATAGP

mktmpl: add template to disk group; mktmpl -G DATA –redundancy mirror –striping coarse
mytp

rmtmpl: remove template from disk group; rmtmpl -G DATAGP mytp

chgrp: change user group of files;  chgrp asm-data +data/mydir/a.f

chmod: change permissions of files; chmod 640 a.f; ls –permission a.f

chown: change owner of files; chown user:usergroup a.f

groups: list all user groups of a user; groups DATAGP user

grpmod: add or remove OS users to ASM user group; grpmod –add fra asm_fra oracle1 oracle2

lsgrp: list all ASM user groups; lsgrp -a

lspwusr: list users from ASM password file; lspwusr

lsusr: list users in a disk group; lsusr -G DATAGP

mkgrp: create new ASM user group; mkgrp DATAGP asm_data oracle1 oracle2

mkusr: add OS user to a disk group; mkusr DATA oracle1

orapwusr: add, drop, modify ASM password file user;  orapwusr –add –privilege sysdba hrusr

passwd: change password of a user; passwd oracle2

rmgrp: remove a user group from disk group; rmgrp DATAGP asm_data

rmusr: remove a OS user from disk group; rmusr DATAGP oracle2

rpusr: replace OS user1 with OS user2; rpusr DATAGP oracle1 oracle2

volcreate: create an ADVM volume in disk group; volcreate -G DATA -s 10G –width 64K –column 8 volume1

voldelete: delete an ADVM volume; voldelete -G DATAGP volume1

voldisable:
disable an ADVM volumes in mounted disk groups and remove the volume
device on the local node;  voldisable -G DATAGP volume1

volenable: enable ADVM volume in mounted disk groups; volenable -G DATAGP volume1

volinfo: display information of ADVM volumes; volinfo -G DATAGP volume1

volresize: resize an ADVM volume; volresize -G DATAGP -s 20G volume1

volset: set attributes of ADVM volume; volset -G DATA –usagestring no file system attached   volume1

volstat: report I/O statistics of ADVM volume; volstat -G DATAGP

感谢各位的阅读!关于“ASMCMD 中有什么命令”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-20发表,共计4008字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)