1、查看機型:Sun的小型機的機型都在面板上寫著有,如NETRA T 1125,
還有比如ultra 5,ultra 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/b