云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > [原创] veritas volume manager(常用命令集)

[原创] veritas volume manager(常用命令集)

  • 62 次阅读
  • 3 次下载
  • 2026/4/24 12:39:27

终于在春节前把veritas volume manager写完了.希望对要学习这个的朋友有一些帮助吧.最后一部分把常用命令给大家希望可以有一个帮助吧.(前面的一部分内容是我转贴过来的)做了一个组合吧.刚写好的,可能有些乱,还请大家不要介意.谢谢大家的支持!!! 二、添加License的命令 #vxlicense -c

三、查看License的命令 # vxlicense -p 四、名词解析

VRTSvxvm VxVM软件

VRTSlic VxVM licensing utilities VRTSvmdoc VxVM电子文档 VRTSvmman VxVM帮助手册

VRTSvmdev VxVM developer’s package VRTSvxsa VxVM图形管理界面 VRTSvxfs VxFS软件 VRTSfsdoc VxFS文档 五、添加VxVM和VxFS包

#mount -F hsfs -o ro /dev/dsk/c0t6d0s2 /mnt # pkgadd -d path_name product_packages

注意:要以超级用户权限登录系统,完了后还要重启系统。 六、安装VxFS后,修改/etc/system ,在里面添加一行: set lwp_default_stksize=0x4000 并将原始的文件拷贝一份。 七、检查安装包:

#pkginfo 列出所有安装的包

#pkginfo | grep VRTS 列出安装的VERITAS的包 #pkginfo -l pkckage 列出某个安装包的详细信息 八、用vxinstall来创建rootdg 。 选择Custom安装。

九、显示执行过的命令:

#tail -f /var/opt/vmsa/logs/command 十、命令行

在如下几个目录中,可以找到在命令行中使用的命令: /etc/vx/bin /usr/sbin

/usr/lib/vxvm/bin

注:把这些目录加入到PATH环境变量中去。 十一、几条常用命令:

vxassist 、vxprint 、vxdg 、vxdisk 、vxinfo 、vxdiskadm 十二、检查是否有别的VMSA版本存在: #pkginfo -l | grep vmsa 如果有则删除: #pkgrm VRTSvmsa 十三、启动VMSA

1.以root用户登录; 2.#./vmsa_server &

3.xhost + system_name (这一步有时需要做)

4.DISPLAY=’uname -n ‘:0.0 ;export DISPLAY(这一步有时需要做) 十四、启动VMSA客户端 1.本地启动:# vmsa

2.远程启动:# vmsa remote_machine_name 十五、几个命令

1.确定VMSA是否运行:# vmsa_server -q 2.停止VMSA服务: # vmsa_server -k 3.显示VMSA运行版本:# vmsa_server -v 4.启动自动模式:# autostart on

5.显示当前运行模式:# netstat -a | grep vmsa 6.改变自动模式:# autostart off

7.运行在只读模式下:# vmsa_server -r & 和# vmsa -r & 十六、添加磁盘的方法:(行命令)

1.vxdisksetup :configures a disk for VxVM 2.vxdg addisk :add a disk to a disk group

3.# /etc/vx/bin/vxdisksetup -i disk_address [attributes] 注:

The disk_address defines the controller , target , and SCSI logical unit number of the disk to be set up and takes the form c # t # d # . The -i option writes a disk header to the disk , making the disk derectly usable . 4.# vxdg -g diskgroup adddisk disk_name=device_name 十七、查看磁盘信息(命令行)

1.vxdisk list :list disk information 2.prtvtoc :Display VTOC configuration

3.vxdisk -o alldgs list :show all disk groups in the output . 4.# vxdisk list disk_name :显示某个磁盘的信息。 5.# prtvtoc physical_disk_path 6.# prtvtoc /dev/rdsk/c1t10d0s2

注:注意磁盘在卷中和不在卷中,prtvtoc命令结果显示的不同。 十八、Evacuating a disk // remove a disk(命令行) 1.vxevac -g diskgroup from_diskname to_diskname 2.例子:# vxevac -g datadg datadg02 datadg03

3.vxdg rmdisk :returns a disk to the free disk pool

4.vxdiskunsetup :returning a disk to an uninitialized state 5.vxdg -g diskgroup rmdisk disk_name 6.例子:# vxdg -g newdg rmdisk newdg02

7./etc/vx/bin/vxdiskunsetup -[C] disk_address 8.例子:# vxdiskunsetup c1t0d0 十九、给磁盘重命名(命令行)

1.# vxedit -g diskgroup rename old_diskname new_diskname 2.Using vxdg deport and vxdg import rename a disk group

二十、

The rootdg disk group cannot be destroyed and must exist on every system , because it is an essential part of the VxVM boot process . 二十一、创建磁盘组(命令行)

1.vxdg init diskgroup disk_name=device_name 2.# vxdg init newdg newdg01=c1t1d0s2 二十二、创建备用磁盘

# vxdg -g diskgroup set spare=on|off disk_media_name 二十三、Deporting a disk group(命令行)

1.# unmount /filesystem(先卸载磁盘组上的文件系统) 2.# vxdg deport diskgroup

3.# vxdg -n new_name deport old_name(deport and rename a disk group) 4.# vxdg -h hostname deport diskgroup(deport to a new host) 二十四、Importing a disk group(命令行) 1.# vxdg import diskgroup

2.# vxdg -n new_name import old_name(import and rename a disk group) 3.# vxdg -t -n temp_name import old_name(import and rename temporaily) 4.# vxdg -tC -n newerdg import newdg(clear import locks,add the -C option) 5.# vxdg -f import newdg(force an import) 二十五、Rename a disk group:CLI

1.# vxdg -n new_name deport old_name 2.# vxdg import new_name 以上是第一种方式

3.# vxdg deport old_name

4.# vxdg -n new_name import old_name

5.# vxvol -g diskgroup_newname startall(在命令行中重命名磁盘组后要重启volume)

二十六、Destroying a disk group # vxdg destroy diskgroup 二十七、查看磁盘组信息

1.vxdisk -s list 显示磁盘组名和ID

2.vxdisk -o alldg list 显示所有磁盘组的信息,包括已经destroy的。 3.vxdg -g diskgroup free 显示磁盘组中的free space 。 4.vxdg free

二十八、显示磁盘组的版本 1.# vxdg list diskgroup 2.# vxprint -l

二十九、升级磁盘组版本

1.vxdg [-T version] upgrade diskgroup

2.# vxdg -T 40 upgrade datadg(把datadg从20升级到40) 3.# vxdg upgrade datadg(把datadg升级到当前的版本90)

4.# vxdg -T 50 init newdg newdg01=c0t3d0s2(创建版本为50的磁盘组)

vxrootmir doesn't join the secondary boot disk into rootdg disk group and it only mirrors rootvol. The correct procedure to mirror your boot disk is:

1. install Veritas volume manager and license 2. vxinstall

3. choose \

4. answer yes to \t disk name

5. leave all the other disks alone 6. reboot your system

7. export PATH=$PATH:/etc/vx/bin

8. select a disk on a different controler as your secondary boot disk, for instance, c1t0d0

9. vxdisksetup -i c1t0d0

10. vxdg -g rootdg adddisk rootdisk02=c1t0d0

11. vxprint -hg rootdg | grep ^v and note down the volume names other than rootvol

12. nohup vxrootmir rootdisk02 &

13. nohup vxassist -g rootdg mirror volume_name rootdisk02 & 14. vxtask list to monitor the progress

15. eeprom | grep boot-device, normally it should be vx-rootdisk01 vx-rootdisk02

16. init 0

17. boot vx-rootdisk02 to verify

If you want to break the mirror, you'll have to detach and deassociate the mirrored plexes, and then remove them. Below is the example of how to remove the second plex for rootvol:

1> vxprint -g rootdg -ht rootvol | grep ^pl (the plex name should be rootvol-02)

2> vxplex -g rootdg det rootvol-02 3> vxplex -g rootdg dis rootvol-02

4> vxedit -g rootdg -rf rm rootvol-02 (this removes plex and the subdisk) 5> do 1-4 for other volumes in rootdg

6> vxprint -hg rootdg, you should see no subdisk nor plex should resides on rootdisk02

7> If you want to remove the second boot disk out of rootdg, do \ rmdisk rootdisk02\

8> vxdisk list (you should see the disk is online but not belong to any disk group)

我们可以从根盘(假设它是c0t0d0s2)“偷”出一点空间来,再做出一个slice,比如是c0t0d0s7,最好从swap的尾部分出,假设swap slice从柱面1000到3000,那么你可以把2900到3000分给slice7,具体要根据你的硬盘情况,但要保证slice7至少有10M的大小。用format命令完成这一步。

然后用以下步骤重新做一个rootdg:

搜索更多关于: [原创] veritas volume manager(常用 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

终于在春节前把veritas volume manager写完了.希望对要学习这个的朋友有一些帮助吧.最后一部分把常用命令给大家希望可以有一个帮助吧.(前面的一部分内容是我转贴过来的)做了一个组合吧.刚写好的,可能有些乱,还请大家不要介意.谢谢大家的支持!!! 二、添加License的命令 #vxlicense -c 三、查看License的命令 # vxlicense -p 四、名词解析 VRTSvxvm VxVM软件 VRTSlic VxVM licensing utilities VRTSvmdoc VxVM电子文档 VRTSvmman VxVM帮助手册 VRTSvmdev VxVM developer’s package VRTSvxsa VxVM图形管理界面

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com