Hello Friend's,
In this post we will discuss about how to add ACFS filesystem in oracle restart .
So lets get started,
Step 1 : Format the disk using fdisk
dm01db01:~ # fdisk /dev/sdh
Welcome to fdisk (util-linux 2.33.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x7ebab29d.
Command (m for help): u
Changing display/entry units to cylinders (DEPRECATED!).
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First cylinder (1-3263, default 1):
Last cylinder, +/-cylinders or +/-size{K,M,G,T,P} (1-3263, default 3263):
Created a new partition 1 of type 'Linux' and of size 25 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Step 2 : Export the env variable in root user
dm01db01:~ # export ORACLE_BASE=/oracle/app/grid
dm01db01:~ # export PATH=/oracle/app/grid/gr_home/bin:$PATH
dm01db01:~ # export LD_LIBRARY_PATH=/oracle/app/grid/gr_home/lib:$LD_LIBRARY_PATH
dm01db01:~ # export ORACLE_HOME=/oracle/app/grid/gr_home
dm01db01:~ #
Step 3 : Lable Disk for ORacle AFD or ASM Lib as per your configration
dm01db01:~ #
dm01db01:~ # $ORACLE_HOME/bin/asmcmd afd_label BACKUP /dev/sdh1
dm01db01:~ #
dm01db01:~ # asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
BACKUP ENABLED /dev/sdh1
DATAC1 ENABLED /dev/sde1
DATAC2 ENABLED /dev/sdd1
DATAC3 ENABLED /dev/sdf1
DATAC4 ENABLED /dev/sdb1
RECO1 ENABLED /dev/sdc1
RECO2 ENABLED /dev/sdg1
dm01db01:~ #
Step 4 : Create ASM Diskgroup
SQL> CREATE DISKGROUP BACKUP EXTERNAL REDUNDANCY
DISK 'AFD:BACKUP' SIZE 25594M
ATTRIBUTE 'compatible.asm' = '19.0.0.0.0',
'compatible.rdbms'='19.0.0.0.0' ,
'compatible.advm' = '19.0.0.0.0'; 2 3 4 5
Diskgroup created.
Step 5 : Check status of diskgroup :
SQL> col COMPATIBILITY for a25
SQL> col DATABASE_COMPATIBILITY for a25
SQL> col name for a25
SQL> set lines 200
SQL> set pages 200
SQL> select GROUP_NUMBER,NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from gv$asm_diskgroup;
GROUP_NUMBER NAME COMPATIBILITY DATABASE_COMPATIBILITY
------------ ------------------------- ------------------------- -------------------------
1 DATA 19.0.0.0.0 10.1.0.0.0
2 RECO 19.0.0.0.0 10.1.0.0.0
3 BACKUP 19.0.0.0.0 19.0.0.0.0
crsctl stat res ora.BACKUP.dg -t
dm01db01:~ # crsctl stat res ora.BACKUP.dg -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.BACKUP.dg
ONLINE ONLINE dm01db01 STABLE
--------------------------------------------------------------------------------
dm01db01:~ #
Step 7 : Create volume for ACFS abd get volinfo
volcreate -G BACKUP -s 25000M ACFSVOL01
ASMCMD> volcreate -G BACKUP -s 25000M ACFSVOL01
ASMCMD>
ASMCMD> volinfo --all
Diskgroup Name: BACKUP
Volume Name: ACFSVOL01
Volume Device: /dev/asm/acfsvol01-49
State: ENABLED
Size (MB): 25024
Resize Unit (MB): 64
Redundancy: UNPROT
Stripe Columns: 8
Stripe Width (K): 1024
Usage:
Mountpath:
ASMCMD>
dm01db01:~ # chown oracle:oinstall /backup
Step 8 : Format volume with ACFS MKFS
/sbin/mkfs.acfs -F /dev/asm/acfsvol01-49
grid@dm01db01:/sbin> /sbin/mkfs.acfs -f /dev/asm/acfsvol01-49
mkfs.acfs: version = 19.0.0.0.0
mkfs.acfs: on-disk version = 46.0
mkfs.acfs: volume = /dev/asm/acfsvol01-49
mkfs.acfs: volume size = 26239565824 ( 24.44 GB )
mkfs.acfs: Format complete.
Step 9 : Mount Filesystem to OS
For RAC :
$ORACLE_HOME/bin/srvctl add filesystem -d /dev/asm/acfsvol01-49 -m /backup -u oracle -fstype ACFS -autostart ALWAYS
crsctl stat res ora.BACKUP.acfsvol01-49.acfs -t
For Oracle Restart :
/bin/mount -t acfs /dev/asm/acfsvol01-49 /backup
Step 10 : Output After Mount :
dm01db01:~ # df -kh
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.8G 28K 3.8G 1% /dev
tmpfs 3.8G 641M 3.2G 17% /dev/shm
tmpfs 3.8G 11M 3.8G 1% /run
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/mapper/systemvg-rootlv 30G 3.9G 27G 13% /
/dev/sda1 2.0G 96M 1.9G 5% /boot
/dev/mapper/systemvg-optlv 10G 37M 10G 1% /opt
/dev/mapper/systemvg-varlv 20G 204M 20G 1% /var
/dev/mapper/systemvg-oraclelv 40G 37G 3.2G 93% /oracle
tmpfs 769M 20K 769M 1% /run/user/0
/dev/sr0 3.9G 3.9G 0 100% /run/media/root/SLE-12-SP5-Server-DVD-x86_640009
/dev/asm/acfsvol01-49 25G 359M 25G 2% /backup
Hope This Helps
Regards
Sultan Khan
ConversionConversion EmoticonEmoticon