ASMFD Installation & Configuration
Verify the ASM Filer Driver (AFD) Kernel module has been loaded.
$ lsmod | grep afd
oracleafd 226702 1
To confirm ASM Filter Driver has already been installed, loaded, is supported and versions, use afddriverstate installed | loaded | supported | version.
$ afddriverstate installed
AFD-9203: AFD device driver installed status: 'true'
$ afddriverstate loaded
AFD-9205: AFD device driver loaded status: 'true'
$ afddriverstate supported
AFD-9200: Supported
$ afddriverstate version
AFD-9325: Driver OS kernel version = 3.10.0-862.el7.x86_64.
AFD-9326: Driver build number = RELEASE.
AFD-9231: Driver build version = 19.0.0.0.0 (19.24.0.0.0).
AFD-9547: Driver available build number = RELEASE.
AFD-9232: Driver available build version = 19.0.0.0.0 (19.24.0.0.0).
To check the ASMFD filtering status:
$ asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'RACNODE1'
Check and list ASMFD disks.
$ asmcmd afd_lsdsk
Oracle ASM Thin Provisioned Attribute
The ASM Thin Provisioned attribute enables or disables the functionality to discard unused storage space after a diskgroup rebalance is completed.
Note: the ASM Thin Provisioned attribute only works with the ASM Filter Driver, setting it on non-ASMFD diskgroups has no effect.
The attribute value can be true to enable or false to disable the functionality. The default value is false.
Oracle ASM informs the storage array which space is no longer used and can be repurposed. If a rebalance is not running, a rebalance can be triggered manually with the ALTER DISKGROUP … REBALANCE SQL statement.
How to check ASM ‘thin_provisioned’ attribute ?
set linesize 250
column diskgroup heading 'Diskgroup' format a15
column name heading 'Attribute Name' format a25
column value heading 'Value' format a15
column read_only heading 'Read Only' format a15
SELECT
SUBSTR(dg.name,1,12) AS diskgroup, SUBSTR(a.name,1,24) AS name,
SUBSTR(a.value,1,24) AS value, read_only
FROM
V$ASM_DISKGROUP dg,
V$ASM_ATTRIBUTE a
WHERE
dg.group_number = a.group_number AND
a.name NOT LIKE '%template%' AND
a.name LIKE '%thin%'
/
Diskgroup Attribute Name Value Read Only
--------------- ------------------------- --------------- ---------------
DATA2 thin_provisioned true N
FRA thin_provisioned FALSE N
OCR thin_provisioned FALSE N
REDO thin_provisioned true N
OR
$ asmcmd lsattr -G FRA | grep thin
thin_provisioned
We can easily change the ‘thin_provisioned’ attribute using ASMCA or using ‘alter disk group <DISK_GROUP> set attribute ‘thin_provisioned’=’TRUE’;’
SQL> alter diskgroup FRA set attribute 'thin_provisioned'='TRUE';
Diskgroup altered.
Since Oracle 18c the phase option includes the keywords WITH or WITHOUT, removing the need to use the underscore parameters, check your version documentation for limitations.
SQL> ALTER DISKGROUP DATA REBALANCE WITHOUT COMPACT;
Diskgroup altered.
SQL > alter diskgroup data2 rebalance with balance compact;
Diskgroup altered.
SQL> ALTER DISKGROUP DATA REBALANCE WITH BALANCE COMPACT POWER 1024 WAIT;
Diskgroup altered.
SQL>select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES from gv$asm_operation;
INST_ID OPERA STAT POWER SOFAR EST_WORK EST_RATE EST_MINUTES
------- ----- ---- ----- ------ ---------- ---------- -----------
2 REBAL WAIT 1
2 REBAL WAIT 1
2 REBAL WAIT 1
1 REBAL RUN 1 1951 8634894 2475 3488
1 REBAL DONE 1 1017 1017 0 0
1 REBAL DONE 1 0 0 0 0
6 rows selected.