您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 项目/工程管理 > Solaris系统维护命令大全
1、查看机型:SUn的小型机的机型都在面板上写着有,如NETRAT1125,还有比如utra5,utra10等等。2、查看cpu个数(错误,不正确,因为sun中的top命令不能完全看到所有的cpu情况,与HP用法也不一样)#topCPUstates:99.3%idle,0.1%user,0.6%kernel,0.0%iowait,0.0%swap表示只有一个cpu正确方法:用dmesg|grepcpu便可以看到正确的cpu个数了。3、查看内存#dmesg|grepmemmem=2097152K(0x80000000)availmem=20877393924、查看磁盘的个数#vxdisklistDEVICETYPEDISKGROUPSTATUSc0t0d0s2sliced--errorc0t0d0s7simplec0t0d0s7rootdgonlinec1t0d0s2sliced--onlinec1t1d0s2slicedsmpdg2smpdgonlinec1t2d0s2slicedsmpdbdg1smpdbdgonlinec2t0d0s2sliced--onlinec2t1d0s2slicedsmpdg1smpdgonlinec2t2d0s2slicedsmpdbdg2smpdbdgonlinefile:///C|/DocumentsandSettings/Administrator/桌面/Solaris系统维护命令大全.txt[2009-4-1316:19:40]5、如何查看文件系统#df-kFilesystemkbytesusedavailcapacityMountedon/dev/dsk/c0t0d0s040321421050675294114627%//proc0000%/procfd0000%/dev/fd/dev/dsk/c0t0d0s673049772972318991%/home/dev/dsk/c0t0d0s54032142402929358889211%/optswap34183923234183601%/tmp/vol/dev/dsk/c0t6d0/informix2017302017300100%/cdrom/informix/dev/vx/dsk/smpdg/smpdg-stat105599411%/smpwork/dev/vx/dsk/smpdg/lv_smp17336570128079170351261%/sms6、查看卷组、逻辑卷的位置#cd/dev/vx/dsk/比如smpdg等等都在该目录下了,然后再进入某个卷组目录就可以看到该卷组下面的逻辑卷了。7、如何创建卷组、逻辑卷、文件系统A、创建smpdg逻辑卷组(假设现在是将c1t1d0和c1t2d0两块物理磁盘来创建smcpdg逻辑卷组)vxdisksetup-ic1t1d0(格式化物理磁盘)vxdisksetup-ic2t1d0file:///C|/DocumentsandSettings/Administrator/桌面/Solaris系统维护命令大全.txt[2009-4-1316:19:40]vxdginitsmpdgsmpdg1=c2t1d0(将物理磁盘加入到逻辑卷组smpdg)vxdg-gsmpdgadddisksmpdg2=c1t1d0然后再来创建逻辑卷、文件系统vxassist-gsmpdg-Ufsgenmakelv_smp17200mlayout=nologsmpdg1vxassist-gsmpdgmirrorlv_smplayout=nostripesmpdg2newfs-C-f/dev/vx/rdsk/smpdg/lv_smp假设现在的一台机器上挂接到/smsmkdir/smschownsmp:smp/smsvxvol-gsmpdgstartallmount/dev/vx/dsk/smpdg/lv_smp/smsumount/smsvxvol-gsmpdgstopallvxdgdeportsmpdg然后再在第二台机器上挂接到/smsmkdir/smschownsmp:smp/smsvxdgimportsmpdgvxvol-gsmpdgstartallnewfs-C-f/dev/vx/rdsk/smpdg/lv_smpmount/dev/vx/dsk/smpdg/lv_smp/smsumount/sms备注:以上是创建一个共享的文件系统往往由于smpdg要分配给某一个应用来使用,所以需要再来创建一个个逻辑机运行file:///C|/DocumentsandSettings/Administrator/桌面/Solaris系统维护命令大全.txt[2009-4-1316:19:40]时挂接的文件系统:vxassist-gsmpdg-Ufsgenmakesmpdg-stat2mlayout=nologsmpdg1vxassist-gsmpdgmirrorsmpdg-statlayout=nostripesmpdg2newfs/dev/vx/rdsk/smpdg/smpdg-statB、创建smpdbdg逻辑卷组创建卷组:vxdisksetup-ic1t2d0vxdisksetup-ic2t2d0vxdginitsmpdbdgsmpdbdg1=c1t2d0vxdg-gsmpdbdgadddisksmpdbdg2=c2t2d0vxassist-gsmpdbdg-Ufsgenmakesmpdbdg-stat2mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorsmpdbdg-statlayout=nostripesmpdbdg2newfs/dev/vx/rdsk/smpdbdg/smpdbdg-stat创建逻辑卷:vxassist-gsmpdbdg-Ugenmakelv_rootdbs128mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_rootdbslayout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_logdbs300mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_logdbslayout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_phydbs100mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_phydbslayout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_tempdbs1000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_tempdbslayout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_svcchunk12000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_svcchunk1layout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_svcchunk22000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_svcchunk2layout=nostripesmpdbdg2file:///C|/DocumentsandSettings/Administrator/桌面/Solaris系统维护命令大全.txt[2009-4-1316:19:40]vxassist-gsmpdbdg-Ugenmakelv_svcchunk32000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_svcchunk3layout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_recchunk12000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_recchunk1layout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_recchunk22000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_recchunk2layout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_recchunk32000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_recchunk3layout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_recchunk42000mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_recchunk4layout=nostripesmpdbdg2vxassist-gsmpdbdg-Ugenmakelv_recchunk51700mlayout=nologsmpdbdg1vxassist-gsmpdbdgmirrorlv_recchunk5layout=nostripesmpdbdg2C、附逻辑卷的属性vxedit-gsmpdg-vsetuser=smpgroup=smplv_smpvxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_rootdbsvxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_logdbsvxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_phydbsvxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_tempdbsvxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_svcchunk1vxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_svcchunk2vxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_svcchunk3vxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_recchunk1vxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_recchunk2vxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_recchunk3vxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_recchunk4vxedit-gsmpdbdg-vsetuser=informixgroup=informixmode=660lv_recchunk5备注:在SUN的机器中在给逻辑卷付属性的时候,等于用chown、chmod来作。file:///C|/DocumentsandSettings/Administrator/桌面/Solaris系统维护命令大全.txt[2009-4-1316:19:40]8、如何删除卷组其实也就是去激活和倒出的过程,然后再来对物理磁盘重新格式化就完了。vxvol-gsmpdbdgstopallvxdgdeportsmpdbdgvxdisksetup-ic1t0d
本文标题:Solaris系统维护命令大全
链接地址:https://www.777doc.com/doc-6206512 .html