[root@linuxidc1 ~]# df-h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 532G 34G 476G 7% /
tmpfs 16G 258M 16G 2% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/asm/testvol-347 30G 138M 30G 1% /u01/app/grid/acfsmounts/data_testvol
/dev/asm/linuxidcvol-347 25G 128M 25G 1% /u01/app/grid/acfsmounts/data_linuxidcvol
[root@linuxidc1 ~]#
[root@linuxidc2 ~]# df-h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 533G 24G 487G 5% /
tmpfs 16G 255M 16G 2% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/asm/testvol-347 30G 138M 30G 1% /u01/app/grid/acfsmounts/data_testvol
/dev/asm/linuxidcvol-347 25G 128M 25G 1% /u01/app/grid/acfsmounts/data_linuxidcvol
[root@linuxidc2 ~]#
再次看集群资源状态,新创建的ACFS文件系统被作为资源加入集群。
[grid@linuxidc1 ~]$crsctl stat res -t
---------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
---------------------------------------------------------------------
Local Resources
---------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.CRS.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.DATA.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.LISTENER.lsnr
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.asm
ONLINE ONLINE linuxidc1 Started
ONLINE ONLINE linuxidc2 Started
ora.data.linuxidcvol.acfs
ONLINE ONLINE linuxidc1 mountedon /u01/app
/grid/acfsmounts/dat
a_linuxidcvol
ONLINE ONLINE linuxidc2 mountedon /u01/app
/grid/acfsmounts/dat
a_linuxidcvol
ora.gsd
OFFLINE OFFLINE linuxidc1
OFFLINE OFFLINE linuxidc2
ora.net1.network
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.ons
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.registry.acfs
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
---------------------------------------------------------------------ClusterResources
---------------------------------------------------------------------ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE linuxidc2
ora.cvu
1 ONLINE ONLINE linuxidc2
ora.linuxidc.db
1 ONLINE ONLINE linuxidc1 Open
2 ONLINE ONLINE linuxidc2 Open
ora.linuxidc1.vip
1 ONLINE ONLINE linuxidc1
ora.linuxidc2.vip
1 ONLINE ONLINE linuxidc2
ora.oc4j
1 ONLINE ONLINE linuxidc2
ora.scan1.vip
1 ONLINE ONLINE linuxidc2
[grid@linuxidc1 ~]$
再次查看注册信息如下:
[root@linuxidc1 ~]#acfsutil info fs
/u01/app/grid/acfsmounts/data_testvol
ACFS Version: 11.2.0.4.0
flags: MountPoint,Available
mount time: Fri Oct 28 13:37:27 2016
volumes: 1
total size: 32212254720
total free: 32068386816
primary volume: /dev/asm/testvol-347
label:
flags: Primary,Available,ADVM
on-disk version: 39.0
allocation unit: 4096
major, minor: 251, 177665
size: 32212254720
free: 32068386816
ADVM diskgroup DATA
ADVM resize increment: 33554432
ADVM redundancy: unprotected
ADVM stripe columns: 4
ADVM stripe width: 131072
number of snapshots: 0
snapshot space usage: 0
replication status: DISABLED
/u01/app/grid/acfsmounts/data_linuxidcvol
ACFS Version: 11.2.0.4.0
flags: MountPoint,Available
mount time: Fri Oct 28 13:45:44 2016
volumes: 1
total size: 26843545600
total free: 26710327296
primary volume: /dev/asm/linuxidcvol-347
label:
flags: Primary,Available,ADVM
on-disk version: 39.0
allocation unit: 4096
major, minor: 251, 177666
size: 26843545600
free: 26710327296
ADVM diskgroup DATA
ADVM resize increment: 33554432
ADVM redundancy: unprotected
ADVM stripe columns: 4
ADVM stripe width: 131072
number of snapshots: 0
snapshot space usage: 0
replication status: DISABLED
[root@linuxidc1 ~]#
4. 删除ACFS文件系统
(1)、当前状态查看
[root@linuxidc1 ~]# df-h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 532G 34G 476G 7% /
tmpfs 16G 256M 16G 2% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/asm/linuxidcvol-347 30G 138M 30G 1% /u01/app/grid/acfsmounts/data_linuxidcvol
/dev/asm/testvol-347 15G 107M 15G 1% /u01/app/grid/acfsmounts/data_testvol
[root@linuxidc1 ~]#
[root@linuxidc2 ~]# df-h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 533G 24G 487G 5% /
tmpfs 16G 254M 16G 2% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/asm/linuxidcvol-347 30G 138M 30G 1% /u01/app/grid/acfsmounts/data_linuxidcvol
/dev/asm/testvol-347 15G 107M 15G 1% /u01/app/grid/acfsmounts/data_testvol
[root@linuxidc2 ~]#
[root@linuxidc1 ~]# su -grid
[grid@linuxidc1 ~]$crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.CRS.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.DATA.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.LISTENER.lsnr
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.asm
ONLINE ONLINE linuxidc1 Started
ONLINE ONLINE linuxidc2 Started
ora.data.linuxidcvol.acfs
ONLINE ONLINE linuxidc1 mountedon /u01/app
/grid/acfsmounts/dat
a_linuxidcvol
ONLINE ONLINE linuxidc2 mountedon /u01/app
/grid/acfsmounts/dat
a_linuxidcvol
ora.gsd
OFFLINE OFFLINE linuxidc1
OFFLINE OFFLINE linuxidc2
ora.net1.network
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.ons
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.registry.acfs
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE linuxidc1
ora.cvu
1 ONLINE ONLINE linuxidc2
ora.linuxidc.db
1 ONLINE ONLINE linuxidc1 Open
2 ONLINE ONLINE linuxidc2 Open
ora.linuxidc1.vip
1 ONLINE ONLINE linuxidc1
ora.linuxidc2.vip
1 ONLINE ONLINE linuxidc2
ora.oc4j
1 ONLINE ONLINE linuxidc2
ora.scan1.vip
1 ONLINE ONLINE linuxidc1
[grid@linuxidc1 ~]$
(2)、卸载磁盘
节点1
[root@linuxidc1 ~]#umount /dev/asm/testvol-347
[root@linuxidc1 ~]#umount /dev/asm/linuxidcvol-347
[root@linuxidc1 ~]# df-h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 532G 34G 476G 7% /
tmpfs 16G 257M 16G 2% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
[root@linuxidc1 ~]#
节点2
[root@linuxidc2 ~]#umount /dev/asm/testvol-347
[root@linuxidc2 ~]#umount /dev/asm/linuxidcvol-347
[root@linuxidc2 ~]# df-h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 533G 24G 487G 5% /
tmpfs 16G 254M 16G 2% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
[root@linuxidc2 ~]#
再次查看资源状态
[grid@linuxidc1 ~]$crsctl stat res -t
-------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
-------------------------------------------------------------------------------
Local Resources
-------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.CRS.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.DATA.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.LISTENER.lsnr
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.asm
ONLINE ONLINE linuxidc1 Started
ONLINE ONLINE linuxidc2 Started
ora.data.linuxidcvol.acfs
OFFLINE OFFLINE linuxidc1 admin unmounted /u0
1/app/grid/acfsmount
s/data_linuxidcvol
OFFLINE OFFLINE linuxidc2 admin unmounted /u0
1/app/grid/acfsmount
s/data_linuxidcvol
ora.gsd
OFFLINE OFFLINE linuxidc1
OFFLINE OFFLINE linuxidc2
ora.net1.network
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.ons
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.registry.acfs
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
-------------------------------------------------------------------------------
Cluster Resources
-------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE linuxidc2
ora.cvu
1 ONLINE ONLINE linuxidc1
ora.linuxidc.db
1 ONLINE ONLINE linuxidc1 Open
2 ONLINE ONLINE linuxidc2 Open
ora.linuxidc1.vip
1 ONLINE ONLINE linuxidc1
ora.linuxidc2.vip
1 ONLINE ONLINE linuxidc2
ora.oc4j
1 ONLINE ONLINE linuxidc1
ora.scan1.vip
1 ONLINE ONLINE linuxidc2
[grid@linuxidc1 ~]$
可以看出图形界面创建的linuxidcvol卷,卸载文件系统后,ora.data.linuxidcvol.acfs
资源自动offline,卷为umounted状态;testvol关联与ora.registry.acfs资源,该资源状态正常。
(3)、停止ora.registry.acfs资源
[grid@linuxidc1 ~]$crsctl stop resource ora.registry.acfs -n linuxidc1
CRS-2673: Attemptingto stop 'ora.registry.acfs' on 'linuxidc1'
CRS-2677: Stop of'ora.registry.acfs' on 'linuxidc1' succeeded
[grid@linuxidc1 ~]$crsctl stop resource ora.registry.acfs -n linuxidc2
CRS-2673: Attemptingto stop 'ora.registry.acfs' on 'linuxidc2'
CRS-2677: Stop of'ora.registry.acfs' on 'linuxidc2' succeeded
[grid@linuxidc1 ~]$crsctl stat res -t
-------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
-------------------------------------------------------------------------------
Local Resources
-------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.CRS.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.DATA.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.LISTENER.lsnr
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.asm
ONLINE ONLINE linuxidc1 Started
ONLINE ONLINE linuxidc2 Started
ora.data.linuxidcvol.acfs
OFFLINE OFFLINE linuxidc1 admin unmounted /u0
1/app/grid/acfsmount
s/data_linuxidcvol
OFFLINE OFFLINE linuxidc2 admin unmounted /u0
1/app/grid/acfsmount
s/data_linuxidcvol
ora.gsd
OFFLINE OFFLINE linuxidc1
OFFLINE OFFLINE linuxidc2
ora.net1.network
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.ons
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.registry.acfs
OFFLINE OFFLINE linuxidc1
OFFLINE OFFLINE linuxidc2
-------------------------------------------------------------------------------
Cluster Resources
-------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE linuxidc2
ora.cvu
1 ONLINE ONLINE linuxidc1
ora.linuxidc.db
1 ONLINE ONLINE linuxidc1 Open
2 ONLINE ONLINE linuxidc2 Open
ora.linuxidc1.vip
1 ONLINE ONLINE linuxidc1
ora.linuxidc2.vip
1 ONLINE ONLINE linuxidc2
ora.oc4j
1 ONLINE ONLINE linuxidc1
ora.scan1.vip
1 ONLINE ONLINE linuxidc2
[grid@linuxidc1 ~]$
(4)、删除注册信息
仅在一个节点执行
[root@linuxidc1 ~]#acfsutil registry -d /u01/app/grid/acfsmounts/data_testvol/
acfsutil registry: successfully removed ACFS mount point/u01/app/grid/acfsmounts/data_testvol from Oracle Registry
[root@linuxidc1 ~]#
上一步中已ora.data.linuxidcvol.acfs资源offline,移除注册信息报错正常。
[root@linuxidc1 ~]#acfsutil registry -d /u01/app/grid/acfsmounts/data_linuxidcvol/
acfsutil registry:ACFS-03143: The specified mount point does not exist and therefore cannot bedeleted.
[root@linuxidc1 ~]#
(5)、删除ACFS文件系统
仅在一个节点执行删除
[root@linuxidc1 ~]#acfsutil rmfs /dev/asm/testvol-347
[root@linuxidc1 ~]#acfsutil rmfs /dev/asm/linuxidcvol-347
(6)、禁用volume
需要在两节点执行
节点1禁止
[grid@linuxidc1 ~]$asmcmd
ASMCMD>voldisable -G data testvol
ASMCMD>voldisable -G data linuxidcvol
ASMCMD>
节点2禁止
[grid@linuxidc2 ~]$asmcmd
ASMCMD>voldisable -G data testvol
ASMCMD> voldisable-G data linuxidcvol
ASMCMD> exit
[grid@linuxidc2 ~]$
(7)、删除卷
仅在一个节点执行。
[grid@linuxidc1 ~]$asmcmd
ASMCMD> ls
ASMCMD> voldelete-G data testvol
ASMCMD> voldelete-G data linuxidcvol
(8)、删除资源对象
[root@linuxidc1~]#/u01/app/11.2.0/grid/bin/srvctl remove filesystem-d /dev/asm/linuxidcvol-347
[grid@linuxidc1 ~]$ crsctl stat res -t
---------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
---------------------------------------------------------------------
Local Resources
ora.ARCH.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.CRS.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.DATA.dg
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.LISTENER.lsnr
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.asm
ONLINE ONLINE linuxidc1 Started
ONLINE ONLINE linuxidc2 Started
ora.gsd
OFFLINE OFFLINE linuxidc1
OFFLINE OFFLINE linuxidc2
ora.net1.network
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.ons
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
ora.registry.acfs
ONLINE ONLINE linuxidc1
ONLINE ONLINE linuxidc2
---------------------------------------------------------------------ClusterResources
---------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE linuxidc2
ora.cvu
1 ONLINE ONLINE linuxidc2
ora.linuxidc.db
1 ONLINE ONLINE linuxidc1 Open
2 ONLINE ONLINE linuxidc2 Open
ora.linuxidc1.vip
1 ONLINE ONLINE linuxidc1
ora.linuxidc2.vip
1 ONLINE ONLINE linuxidc2
ora.oc4j
1 ONLINE ONLINE linuxidc2
ora.scan1.vip
1 ONLINE ONLINE linuxidc2
[grid@linuxidc1 ~]$