Following a discussion on the options on how to reclaim space (TRIM/Unmap) on Oracle database using flash storage I though this would make a good topic for a new Blog post.
If your Oracle database is using a modern file system it’s pretty straight forward, use the ‘discard’ option. However for the majority of us using Oracle Automatic Storage Management (ASM) we need to work a bit harder.
I have previously Blogged on how to set-up Oracle ASMFD at the command line, this time I will share how to do this with Oracle Grid Infrastructure.
Oracle Grid Infrastructure 19c Installer


As I plan to use the Oracle ASM Filter Driver I have selected ‘Configure Oracle ASM Filter Driver’, also as I have access to an All-Flash Pure Storage FlashArray I am able to set the Redundancy to ‘External’. The Pure Storage FlashArray will provide RAID data protection, if your storage platform is not able to provide RAID protection you will need to select ‘Normal’ 2-way or ‘High’ 3-way mirroring.







Oracle ASMCMD
We can now use ASMCMD to check that the ASM Filter Driver (ASMFD) is configured as expected.
afd_state – Returns the state of Oracle ASM Filter Driver.
[oracle@z-oracle ~]$ asmcmd afd_state ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'z-oracle.uklab.purestorage.com'
afd_lsdsk – Lists Oracle ASM Filter Driver disks.
[oracle@z-oracle ~]$ asmcmd afd_lsdsk ---------------------------------------------------------------------- Label Filtering Path ====================================================================== DATA1 ENABLED /dev/oracleasm/dg_oradata1 DATA2 ENABLED /dev/oracleasm/dg_oradata2 DATA3 ENABLED /dev/oracleasm/dg_oradata3 DATA4 ENABLED /dev/oracleasm/dg_oradata4
afd_lslbl – Lists the disks that contain Oracle ASM Filter Driver labels.
[oracle@z-oracle ~]$ asmcmd afd_lslbl /dev/oracleasm/ ---------------------------------------------------------------------- Label Duplicate Path ====================================================================== DATA1 /dev/oracleasm/dg_oradata1 DATA2 /dev/oracleasm/dg_oradata2 DATA3 /dev/oracleasm/dg_oradata3 DATA4 /dev/oracleasm/dg_oradata4
lsdsk – Lists Oracle ASM disks.
[oracle@z-oracle ~]$ asmcmd lsdsk -t -G DATA Create_Date Mount_Date Repair_Timer Path 12-OCT-19 12-OCT-19 0 AFD:DATA1 12-OCT-19 12-OCT-19 0 AFD:DATA2 12-OCT-19 12-OCT-19 0 AFD:DATA3 12-OCT-19 12-OCT-19 0 AFD:DATA4
lsattr – Lists the attributes of a disk group.
[oracle@z-oracle ~]$ asmcmd lsattr -lm -G DATA Group_Name Name Value RO Sys DATA access_control.enabled FALSE N Y DATA access_control.umask 066 N Y DATA appliance._partnering_type GENERIC Y Y DATA ate_conversion_done true Y Y DATA au_size 4194304 Y Y DATA cell.smart_scan_capable FALSE N N DATA cell.sparse_dg allnonsparse N N DATA compatible.advm 19.0.0.0.0 N Y DATA compatible.asm 19.0.0.0.0 N Y DATA compatible.rdbms 10.1.0.0.0 N Y DATA content.check FALSE N Y DATA content.type data N Y DATA content_hardcheck.enabled FALSE N Y DATA disk_repair_time 12.0h N Y DATA failgroup_repair_time 24.0h N Y DATA idp.boundary auto N Y DATA idp.type dynamic N Y DATA logical_sector_size 512 N Y DATA phys_meta_replicated true Y Y DATA preferred_read.enabled FALSE N Y DATA scrub_async_limit 1 N Y DATA scrub_metadata.enabled TRUE N Y DATA sector_size 512 N Y DATA thin_provisioned FALSE N Y DATA vam_migration_done false Y Y
As we can see from above the ASMFD thin_provisioned default value is FALSE
In my next Blog post I explore the impact of the ASMFD thin_provisioned setting on space management with flash storage.
[twitter-follow screen_name=’RonEkins’ show_count=’yes’]