Bu yazımızda Oracle VM for SPARC’da guest domainlerin ve servislerin nasıl kaldırılacağından bahsedeceğiz. Gelin kısaca anlatalım.
1. Control domain’e bağlanıp domain’leri listeliyoruz
# ldm ls-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 14 4128M 0.2% 8h 7m ldom01 active -t---- 5000 2 6G 50% 4m ldom02 active -n---- 5001 8 8G 0.1% 7h 26m
2. Guest domaini init 5 ile kapatıyoruz veya aşağıdaki komut ile zorla kapatma işlemini yapabilirsiniz.
# ldm stop-domain ldom02 LDom ldom02 stopped
3. Guest domaini un-bind ediyoruz.
# ldm unbind-domain ldom02 # ldm ls-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 14 4128M 6.8% 8h 8m ldom01 active -t---- 5000 2 6G 50% 5m ldom02 inactive ------ 8 8G #
4. Guest inactive konumuna getirdiğimiz guest domain’i kaldırıyoruz.
# ldm remove-domain ldom02 # ldm ls-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 14 4128M 0.2% 8h 10m ldom01 active -t---- 5000 2 6G 50% 7m #
ldom02 guest domain’inin kaldırıldığını görebilirsiniz. Eğer guest domain’den herhangi bir kaynağı kaldırmak isterseniz uygulayacağımız komutları aşağıda bulabilirsiniz.
1. Guest domaine ait kaynaklar listelenir. (ldom01)
# ldm list-bindings ldom01 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME ldom01 active -t---- 5000 2 6G 50% 8m UUID f2aa98a4-ddae-6d93-948f-9e2e9e81ff40 MAC 00:14:4f:fb:b6:94 HOSTID 0x84fbb694 CONTROL failure-policy=ignore DEPENDENCY master= CORE CID CPUSET 1 (8, 9) VCPU VID PID CID UTIL STRAND 0 8 1 100% 100% 1 9 1 0.0% 100% MEMORY RA PA SIZE 0x10000000 0x10000000 4G 0x480000000 0x390000000 2G VARIABLES auto-boot?=false boot-device=disk:a disk net keyboard-layout=US-English NETWORK NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP vnet0 primary-vds0@primary 0 network@0 00:14:4f:f9:53:57 1 1500 PEER MAC MODE PVID VID MTU LINKPROP primary-vds0@primary 00:14:4f:fb:e2:f3 1 1500 DISK NAME VOLUME TOUT ID DEVICE SERVER MPGROUP vdisk1_dom2 vol1@primary-vds0 1 disk@1 primary iso_ldom01 iso0@primary-vds0 2 disk@2 primary uavdisk uavol1@primary-vds0 0 disk@0 primary VCONS NAME SERVICE PORT ldom01 primary-vcc0@primary 5000
2. Guest domain’den hernangi bir virtual disk’in kaldırılması
# ldm remove-vdisk uavdisk ldom01 Please perform the operation while the LDom is bound or inactive # ldm remove-vdisk -f uavdisk ldom01 Please perform the operation while the LDom is bound or inactive
Bir virtual diski guest domain açıkken kaldırmazsınız.
3.Bu nedenle önce Guest domaini kapatıp sonra virtual diski kaldrımalısınız.
# ldm stop-domain ldom01 LDom ldom01 stopped # ldm remove-vdisk uavdisk ldom01 # # ldm list-bindings ldom01 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME ldom01 bound ------ 5000 2 6G UUID f2aa98a4-ddae-6d93-948f-9e2e9e81ff40 MAC 00:14:4f:fb:b6:94 HOSTID 0x84fbb694 CONTROL failure-policy=ignore DEPENDENCY master= CORE CID CPUSET 1 (8, 9) VCPU VID PID CID UTIL STRAND 0 8 1 100% 1 9 1 100% MEMORY RA PA SIZE 0x10000000 0x10000000 4G 0x480000000 0x390000000 2G VARIABLES auto-boot?=false boot-device=disk:a disk net keyboard-layout=US-English NETWORK NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP vnet0 primary-vds0@primary 0 network@0 00:14:4f:f9:53:57 1 1500 PEER MAC MODE PVID VID MTU LINKPROP primary-vds0@primary 00:14:4f:fb:e2:f3 1 1500 DISK NAME VOLUME TOUT ID DEVICE SERVER MPGROUP vdisk1_dom2 vol1@primary-vds0 1 disk@1 primary iso_ldom01 iso0@primary-vds0 2 disk@2 primary VCONS NAME SERVICE PORT ldom01 primary-vcc0@primary 5000 #
4. Device’ların vds servisinden kaldırılması
# ldm list-services VCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100 VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vds0 primary 00:14:4f:fb:e2:f3 nxge0 0 switch@0 1 1 1500 primary-vsw0 primary 00:14:4f:fa:bf:27 nxge1 1 switch@1 1 1 1500 VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary vol1 /dev/zvol/dsk/pool1/vol1 iso0 /export/home/sol-10-u10-ga2-sparc-dvd.iso clonevol1 /dev/zvol/dsk/pool1/clonevol1 vol0 /dev/dsk/c3t600144F0B8E706DA00005300F4270004d0s2 vol2 /dev/dsk/c3t600144F0C1135B490000530383D70006d0 uavol1 /dev/zvol/dsk/pool1/uavol1 # ldm remove-vdsdev uavol1@primary-vds0 # ldm list-services VCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100 VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vds0 primary 00:14:4f:fb:e2:f3 nxge0 0 switch@0 1 1 1500 primary-vsw0 primary 00:14:4f:fa:bf:27 nxge1 1 switch@1 1 1 1500 VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary vol1 /dev/zvol/dsk/pool1/vol1 iso0 /export/home/sol-10-u10-ga2-sparc-dvd.iso clonevol1 /dev/zvol/dsk/pool1/clonevol1 vol0 /dev/dsk/c3t600144F0B8E706DA00005300F4270004d0s2 vol2 /dev/dsk/c3t600144F0C1135B490000530383D70006d0 #
Şu ana kadar virtual disk kaldırmaktak ve diskin virtual disk server’dan kaldırılmasını anlattık.
Gelin bir servisi servis domainden nasıl kaldırıcağımızı anlatalım.
1. Bir virtual switch servisi servis domain’den kaldırma
# ldm remove-vsw primary-vsw0 Service is active and being used by bound client(s) Failed to remove virtual switch
2. Yukarıdaki komutu verdiğinizde hata alırsınız; çünkü virtual service bazı guest domainler tarafından kullanılıyor olabilir. Öncelikle bu servisi kullanan guest domainlerden kaldırıp ondan sonra deneyin. Sonra kolaylıkla kaldırma işlemini yapabilirsiniz.
# ldm remove-vsw primary-vsw0 # ldm list-services VCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100 VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vds0 primary 00:14:4f:fb:e2:f3 nxge0 0 switch@0 1 1 1500 VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary vol1 /dev/zvol/dsk/pool1/vol1 iso0 /export/home/sol-10-u10-ga2-sparc-dvd.iso clonevol1 /dev/zvol/dsk/pool1/clonevol1 vol0 /dev/dsk/c3t600144F0B8E706DA00005300F4270004d0s2 vol2 /dev/dsk/c3t600144F0C1135B490000530383D70006d0
Diğer guest domainleri ve servisleri yukarıda anlattığımız komutlar ile kaldırabilirsiniz.