1、查看机型:SUn的小型机的机型都在面板上写着有,如NETRA T 1125, 还有比如utra 5,utra 10等等。 2、查看cpu个数 (错误,不正确,因为sun中的top命令不能完全看到所有的cpu情况,与HP用法也不一样) #top CPU states: 99.3% idle, 0.1% user, 0.6% kernel, 0.0% iowait, 0.0% swap 表示只有一个cpu 正确方法: 用dmesg grep cpu 便可以看到正确的 cpu个数了。 3、查看内存 #dmesg grep mem mem = 2097152K (0x80000000) avail mem = 2087739392 4、查看磁盘的个数 #vxdisk list DEVICE TYPE DISK GROUP STATUS c0t0d0s2 sliced - - error c0t0d0s7 simple c0t0d0s7 rootdg online c1t0d0s2 sliced - - online c1t1d0s2 sliced smpdg2 smpdg online c1t2d0s2 sliced smpdbdg1 smpdbdg online c2t0d0s2 sliced - - online c2t1d0s2 sliced smpdg1 smpdg online c2t2d0s2 sliced smpdbdg2 smpdbdg online 5、如何查看文件系统 #df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s0 4032142 1050675 2941146 27% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd /dev/dsk/c0t0d0s6 7304977 29 7231899 1% /home /dev/dsk/c0t0d0s5 4032142 402929 3588892 11% /opt swap 3418392 32 3418360 1% /tmp /vol/dev/dsk/c0t6d0/informix 201730 201730 0 100% /cdrom/informix /dev/vx/dsk/smpdg/smpdg-stat 1055 9 941 1% /smpwork /dev/vx/dsk/smpdg/lv_smp 17336570 128079 17035126 1% /sms 6、查看卷组、逻辑卷的位置 #cd /dev/vx/dsk/ 比如smpdg等等都在该目录下了,然后再进入某个卷组目录就可以看到该卷组下面的逻辑卷了。 7、如何创建卷组、逻辑卷、文件系统 A、创建smpdg逻辑卷组(假设现在是将c1t1d0 和c1t2d0两块物理磁盘来创建smcpdg逻辑卷组) vxdisksetup -i c1t1d0 (格式化物理磁盘) vxdisksetup -i c2t1d0 vxdg init smpdg smpdg1=c2t1d0 (将物理磁盘加入到逻辑卷组smpdg) vxdg -g smpdg adddisk smpdg2=c1t1d0 然后再来创建逻辑卷、文件系统 vxassist -g smpdg -U fsgen make lv_smp 17200m layout=nolog smpdg1 vxassist -g smpdg mirror lv_smp layout=nostripe smpdg2 newfs -C -f /dev/vx/rdsk/smpdg/lv_smp 假设现在的一台机器上挂接到/sms mkdir /sms chown smp:smp /sms vxvol -g smpdg startall mount /dev/vx/dsk/smpdg/lv_smp /sms umount /sms vxvol -g smpdg stopall vxdg deport smpdg 然后再在第二台机器上挂接到/sms mkdir /sms chown smp:smp /sms vxdg import smpdg vxvol -g smpdg startall newfs -C -f /dev/vx/rdsk/smpdg/lv_smp mount /dev/vx/dsk/smpdg/lv_smp /sms umount /sms 备注:以上是创建一个共享的文件系统 往往由于smpdg要分配给某一个应用来使用,所以需要再来创建一个个逻辑机运行时挂接的文件系统: vxassist -g smpdg -U fsgen make smpdg-stat 2m layout=nolog smpdg1 vxassist -g smpdg mirror smpdg-stat layout=nostripe smpdg2 newfs /dev/vx/rdsk/smpdg/smpdg-stat B、创建smpdbdg逻辑卷组 创建卷组: vxdisksetup -i c1t2d0 vxdisksetup -i c2t2d0 vxdg init smpdbdg smpdbdg1=c1t2d0 vxdg -g smpdbdg adddisk smpdbdg2=c2t2d0 vxassist -g smpdbdg -U fsgen make smpdbdg-stat 2m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror smpdbdg-stat layout=nostripe smpdbdg2 newfs /dev/vx/rdsk/smpdbdg/smpdbdg-stat 创建逻辑卷: vxassist -g smpdbdg -U gen make lv_rootdbs 128m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_rootdbs layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_logdbs 300m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_logdbs layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_phydbs 100m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_phydbs layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_tempdbs 1000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_tempdbs layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_svcchunk1 2000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_svcchunk1 layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_svcchunk2 2000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_svcchunk2 layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_svcchunk3 2000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_svcchunk3 layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_recchunk1 2000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_recchunk1 layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_recchunk2 2000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_recchunk2 layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_recchunk3 2000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_recchunk3 layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_recchunk4 2000m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_recchunk4 layout=nostripe smpdbdg2 vxassist -g smpdbdg -U gen make lv_recchunk5 1700m layout=nolog smpdbdg1 vxassist -g smpdbdg mirror lv_recchunk5 layout=nostripe smpdbdg2 C、附逻辑卷的属性 vxedit -g smpdg -v set user=smp group=smp lv_smp vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_rootdbs vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_logdbs vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_phydbs vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_tempdbs vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_svcchunk1 vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_svcchunk2 vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_svcchunk3 vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_recchunk1 vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_recchunk2 vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_recchunk3 vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_recchunk4 vxedit -g smpdbdg -v set user=informix group=informix mode=660 lv_recchunk5 备注:在SUN的机器中在给逻辑卷付属性的时候,等于用chown、chmod来作。 8、如何删除卷组 其实也就是去激活和倒出的过程,然后再来对物理磁盘重新格式化就完了。 vxvol -g smpdbdg stopall vxdg deport smpdbdg vxdisksetup -i c1t0d0 vxdisksetup -i c2t1d0 ...... 这样做了之后就不会再有/dev/vx/smpdbdg目录了。 9、如何建立共享卷组 在第一台机器上先建立卷组,假设已经建设好卷组smpdg,现在要在第二台机器上建立共享卷组smpdg,则先在的一台机器上将smpdg去激活、并且倒出smpdg: smcp01>vxvol -g smpdg stopall smcp01>vxdg deport smpdg 再来在第二台机器上激活、导入smpdg: smcp02>vxdg import smpdg smcp02>vxvol -g smpdg startall 切换后对用以下三个命令进行查看是否切换成功: vxdg list //用于查看逻辑卷组的信息 vxdisk list //用于查物理磁盘的信息 vXPrint -vt //用于查看所有卷的信息 10、如何查看磁盘的大小 方法一: #format 然后选择盘的代号,回车进入下一级菜单,再选inquiry,就得到该盘的大小信息,比如: Vendor: FUJITSU ProdUCt: MAN3184M SUN18G Revision: 1502 注意:format是一个功能强大的磁盘诊断工具。 方法二: #cd /opt/SUNWexplo/bin/ 运行explorer得到磁盘的信息包,是一个目录,进入该目录,就发现有一个disks目录,进入该目录发现有一个diSKINfo文件,用如下命令看各个磁盘 的大小: 0: rmt/0ln HP C1537A L706 62#
[1] [2] 下一页
(出处:http://www.sheup.com)
上一页 [1] [2]