Sunday, August 6, 2023

ACFS Administration (Create, Increase, Delete)

ACFS Administration (Create, Increase, Delete)

For the pre-requisite please refer the below blog post:

1. Verify the ACFS Modules Installed:

lsmod |grep ora

2. Verify the diskgroup ACFS_DG mount on all the RAC cluster nodes

crsctl stat res ora.ACFS_DG.dg -t

3. Create 10G ACFS volume acfs_vol out of 40G ACFS_DG diskgroup

asmcmd -p lsdg ACFS_DG
asmcmd volcreate -G ACFS_DG -s 1G acfs_vol

4. Verify the ACFS volume information 

asmcmd volinfo -G ACFS_DG acfs_vol

5. Check acfs volume services at cluster side

crsctl stat res -t | grep -i "advm"
crsctl stat res ora.ACFS_DG.ACFS_VOL.advm -t

6. Create ACFS file system for ACFS devices created by ACFS Volume

mkfs -t acfs /dev/asm/acfs_vol-160
mkdir -p /acfs_test
chown oracle:oinstall /acfs_test_mount_point

7. Register the ACFS device to oracle as a owner 

/sbin/acfsutil registry -a  /dev/asm/acfs_vol-160 /acfs_test_mount_point -u oracle

crsctl stat res -t | grep -i "acfs_dg"
crsctl stat res ora.acfs_dg.acfs_vol.acfs -t

8. Use srvctl command to mount and unmount ACFS filesystem

srvctl status filesystem -d /dev/asm/acfs_vol-160
srvctl stop filesystem -d /dev/asm/acfs_vol-160
srvctl start filesystem -d /dev/asm/acfs_vol-160

df -h /acfs_test_mount_point

9. Verify the ACFS Volume information again which is mounted on OS filesystem

asmcmd volinfo -G ACFS_DG acfs_vol

10. Verify the configuration of ACFS filesystem

srvctl config filesystem

11. Increase the ACFS Volume and ACFS filesystem by 1G which will make total 11G 

acfsutil size +1G –d /dev/asm/acfs_vol-160 /acfs_test_mount_point
asmcmd volinfo -G ACFS_DG acfs_vol
asmcmd -p lsdg ACFS_DG
df -h /acfs_test_mount_point

12. Delete ACFS filesystem and ACFS volume created in case if you are not needed anymore

srvctl stop filesystem -d /dev/asm/acfs_vol-160
/sbin/acfsutil rmfs /dev/asm/acfs_vol-160
asmcmd voldisable -G ACFS_DG acfs_vol
asmcmd voldelete -G ACFS_DG acfs_vol

asmcmd -p lsdg ACFS_DG

crsctl stat res -t | grep -i "acfs_dg"
crsctl stat res ora.acfs_dg.acfs_vol.acfs -t

Logs:

[root@oranode1 ~]# ps -ef|grep smon|grep -v 'grep\|grid'
oracle   13259     1  0 13:46 ?        00:00:00 asm_smon_+ASM1
oracle   13817     1  0 13:46 ?        00:00:00 ora_smon_DEVDB1
[root@oranode1 ~]#
[root@oranode1 ~]# lsmod |grep ora
oracleacfs           5173248  0
oracleadvm           1146880  0
oracleoks             753664  2 oracleadvm,oracleacfs
oracleasm              61440  1
[root@oranode1 ~]# crsctl stat res ora.ACFS_DG.dg -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ACFS_DG.dg(ora.asmgroup)
      1        ONLINE  ONLINE       oranode1                 STABLE
      2        ONLINE  ONLINE       oranode2                 STABLE
      3        OFFLINE OFFLINE                               STABLE
--------------------------------------------------------------------------------
[root@oranode1 ~]#

[root@oranode1 ~]#su - oracle
[oracle@oranode1 ~]$ asmcmd -p lsdg ACFS_DG
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304     40956    40780                0           40780              0             N  ACFS_DG/
[oracle@oranode1 ~]$

[root@oranode1 ~]# asmcmd volcreate -G ACFS_DG -s 10G acfs_vol
[root@oranode1 ~]# su - oracle
[oracle@oranode1 ~]$ asmcmd volinfo -G ACFS_DG acfs_vol
Diskgroup Name: ACFS_DG

         Volume Name: ACFS_VOL
         Volume Device: /dev/asm/acfs_vol-160
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage:
         Mountpath:

[oracle@oranode1 ~]$

[root@oranode1 ~]# crsctl stat res -t | grep -i "advm"
ora.ACFS_DG.ACFS_VOL.advm
ora.proxy_advm
[root@oranode1 ~]#

[root@oranode1 ~]# crsctl stat res ora.ACFS_DG.ACFS_VOL.advm -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ACFS_DG.ACFS_VOL.advm
               ONLINE  ONLINE       oranode1                 STABLE
               ONLINE  ONLINE       oranode2                 STABLE
--------------------------------------------------------------------------------
[root@oranode1 ~]#

[root@oranode1 ~]# mkfs -t acfs /dev/asm/acfs_vol-160
mkfs.acfs: version                   = 19.0.0.0.0
mkfs.acfs: on-disk version           = 46.0
mkfs.acfs: volume                    = /dev/asm/acfs_vol-160
mkfs.acfs: volume size               = 10737418240  (  10.00 GB )
mkfs.acfs: Format complete.
[root@oranode1 ~]#

[root@oranode1 ~]# su - oracle
[root@oranode1 ~]# mkdir -p /acfs_test
[root@oranode1 ~]# chown oracle:oinstall /acfs_test_mount_point

[root@oranode2 ~]# su - oracle
[root@oranode2 ~]# mkdir -p /acfs_test
[root@oranode2 ~]# chown oracle:oinstall /acfs_test_mount_point

[root@oranode1 ~]# /sbin/acfsutil registry -a  /dev/asm/acfs_vol-160 /acfs_test_mount_point -u oracle
acfsutil registry: mount point /acfs_test_mount_point successfully added to Oracle Registry
[root@oranode1 ~]#

[root@oranode1 ~]# crsctl stat res -t | grep -i "acfs_dg"
ora.ACFS_DG.ACFS_VOL.advm
ora.acfs_dg.acfs_vol.acfs
ora.ACFS_DG.dg(ora.asmgroup)

[root@oranode1 ~]# crsctl stat res ora.acfs_dg.acfs_vol.acfs -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.acfs_dg.acfs_vol.acfs
               ONLINE  ONLINE       oranode1                 mounted on /acfs_tes
                                                             t_mount_point,STABLE
               ONLINE  ONLINE       oranode2                 mounted on /acfs_tes
                                                             t_mount_point,STABLE
--------------------------------------------------------------------------------
[root@oranode1 ~]#

[root@oranode1 ~]# srvctl status filesystem -d /dev/asm/acfs_vol-160
ACFS file system /acfs_test_mount_point is mounted on nodes oranode1,oranode2

[root@oranode1 ~]# srvctl stop filesystem -d /dev/asm/acfs_vol-160
[root@oranode1 ~]# srvctl start filesystem -d /dev/asm/acfs_vol-160

[root@oranode1 ~]# srvctl status filesystem -d /dev/asm/acfs_vol-160
ACFS file system /acfs_test_mount_point is mounted on nodes oranode1,oranode2
[root@oranode1 ~]#

[root@oranode1 ~]# df -h /acfs_test_mount_point
Filesystem             Size  Used Avail Use% Mounted on
/dev/asm/acfs_vol-160   10G  570M  9.5G   6% /acfs_test_mount_point
[root@oranode1 ~]#
[root@oranode2 ~]# df -h /acfs_test_mount_point
Filesystem             Size  Used Avail Use% Mounted on
/dev/asm/acfs_vol-160   10G  570M  9.5G   6% /acfs_test_mount_point
[root@oranode2 ~]#

[oracle@oranode1 ~]$ asmcmd volinfo -G ACFS_DG acfs_vol
Diskgroup Name: ACFS_DG

         Volume Name: ACFS_VOL
         Volume Device: /dev/asm/acfs_vol-160
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage: ACFS
         Mountpath: /acfs_test_mount_point

[oracle@oranode1 ~]$

[root@oranode1 ~]# srvctl config filesystem
Volume device: /dev/asm/acfs_vol-160
Diskgroup name: acfs_dg
Volume name: acfs_vol
Canonical volume device: /dev/asm/acfs_vol-160
Accelerator volume devices:
Mountpoint path: /acfs_test_mount_point
Mount point owner: oracle
Mount point group: oinstall
Mount permissions: owner:oracle:rwx,pgrp:oinstall:r-x,other::r-x
Mount users:
Type: ACFS
Mount options:
Description:
ACFS file system is enabled
ACFS file system is individually enabled on nodes:
ACFS file system is individually disabled on nodes:
[root@oranode1 ~]#

[root@oranode1 ~]# acfsutil size +1G -d /dev/asm/acfs_vol-160 /acfs_test_mount_point
acfsutil size: new file system size: 11811160064 (11264MB)
[root@oranode1 ~]#

[root@oranode1 ~]# su - oracle
[oracle@oranode1 ~]$ asmcmd volinfo -G ACFS_DG acfs_vol
Diskgroup Name: ACFS_DG

         Volume Name: ACFS_VOL
         Volume Device: /dev/asm/acfs_vol-160
         State: ENABLED
         Size (MB): 11264
         Resize Unit (MB): 64
         Redundancy: UNPROT
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage: ACFS
         Mountpath: /acfs_test_mount_point

[oracle@oranode1 ~]$ asmcmd -p lsdg ACFS_DG
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304     40956    29504                0           29504              0             N  ACFS_DG/
[oracle@oranode1 ~]$

[root@oranode1 ~]# df -h /acfs_test_mount_point
Filesystem             Size  Used Avail Use% Mounted on
/dev/asm/acfs_vol-160   11G  572M   11G   6% /acfs_test_mount_point
[root@oranode1 ~]#

[root@oranode2 ~]# df -h /acfs_test_mount_point
Filesystem             Size  Used Avail Use% Mounted on
/dev/asm/acfs_vol-160   11G  572M   11G   6% /acfs_test_mount_point
[root@oranode2 ~]#

[root@oranode1 ~]# srvctl stop filesystem -d /dev/asm/acfs_vol-160
[root@oranode1 ~]# /sbin/acfsutil rmfs /dev/asm/acfs_vol-160
[root@oranode1 ~]# su - oracle
[oracle@oranode1 ~]$ asmcmd voldisable -G ACFS_DG acfs_vol
[root@oranode1 ~]# asmcmd voldelete -G ACFS_DG acfs_vol
[root@oranode1 ~]# su - oracle
[oracle@oranode1 ~]$ asmcmd -p lsdg ACFS_DG
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304     40956    40772                0           40772              0             N  ACFS_DG/
[oracle@oranode1 ~]$

[root@oranode1 ~]# crsctl stat res -t | grep -i "acfs_dg"
ora.ACFS_DG.dg(ora.asmgroup)
[root@oranode1 ~]#

Regards,
Mallik

No comments:

Post a Comment

Automation Script | Archivelog Generation Hourly Monitoring

1. List out all the running databases and pic one database where we want to monitore the archive log generation from last 1 month. [oracle@o...