Create a partition of the disk
[root@ggtarget u01]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Be careful before using the write command.
Building a new DOS disklabel with disk identifier
0xb049a9bf.
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Using default response p
Partition number (1-4, default 1): 1
First sector (2048-62914559, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-62914559,
default 62914559):
Using default value 62914559
Partition 1 of type Linux and of size 30 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@ggtarget u01]# lsblk
NAME MAJ:MIN
RM SIZE RO TYPE MOUNTPOINT
sdb
8:16 0 30G 0
disk
└─sdb1
8:17 0 30G 0
part
sr0
11:0 1 1024M 0 rom
sdc
8:32 0 30G 0
disk
└─sdc1
8:33 0 30G 0
part /u02
sda
8:0 0 50G 0
disk
├─sda2 8:2 0
49G 0 part
│ ├─ol-swap 252:1 0 4G 0
lvm [SWAP]
│ ├─ol-tmp 252:2 0
7G 0 lvm /tmp
│ ├─ol-root 252:0 0 10G 0
lvm /
│ └─ol-u01
252:3 0 28G 0
lvm /u01
└─sda1
8:1 0 1G 0
part /boot
Create a Directory for GI home
[root@ggtarget u01]#
mkdir -p /u02/app/21c/grid
chown oracle:oinstall /u02/app/21c/grid
Unzip the 21c GI software
su - oracle
cd /u02/app/21c/grid
unzip -q /tmp/grid_home.zip
Create ASMFD disk label
su - root
[root@ggtarget u01]# export ORACLE_HOME=/u02/app/21c/grid
[root@ggtarget u01]# export ORACLE_BASE=/tmp
[root@ggtarget u01]# cd /u02/app/21c/grid/bin
[root@ggtarget bin]# ./asmcmd afd_label DATA1 /dev/sdb1 --init
Creating diag directory /tmp/diag
[root@ggtarget bin]# ./asmcmd afd_lslbl /dev/sdb1
----------------------------------------------------------------
Label
Duplicate Path
======================================
DATA1 /dev/sdb1
Update the SELinux
[root@ggtarget u02]# getenforce
Enforcing
[root@ggtarget u02]# setenforce 0
[root@ggtarget u02]# getenforce
Permissive
[root@ggtarget u02]#
These methods above will only work until the next reboot, therefore to disable SELinux permanently, move to the next section.
To permanently disable SELinux, to open the file /etc/sysconfig/selinux as follows:
vi /etc/sysconfig/selinux
SELINUX=disabled
Sestatus
Start the 21c Grid Infrastructure installation.
unset ORACLE_BASE
Log in as the Oracle Restart software owner user and run gridSetup.sh to start the Oracle Grid Infrastructure installation wizard
[root@ggtarget u02]# /u02/app/21c/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER=
oracle
ORACLE_HOME= /u02/app/21c/grid
The contents of "dbhome" have not changed. No
need to overwrite.
The file "oraenv" already exists in
/usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv
to /usr/local/bin ...
The file "coraenv" already exists in
/usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv
to /usr/local/bin ...
Database Configuration Assistant when a database is
created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file:
/u02/app/21c/grid/crs/install/crsconfig_params
2022-08-13 03:08:06: Got permissions of file
/u02/app/crsdata/ggtarget/crsconfig: 0775
2022-08-13 03:08:06: Got permissions of file
/u02/app/crsdata: 0775
2022-08-13 03:08:06: Got permissions of file
/u02/app/crsdata/ggtarget: 0775
The log of current session can be found at:
/u02/app/crsdata/ggtarget/crsconfig/roothas_2022-08-13_03-08-06AM.log
Redirecting to /bin/systemctl restart rsyslog.service
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node ggtarget successfully pinned.
2022/08/13 03:10:11 CLSRSC-330: Adding Clusterware
entries to file 'oracle-ohasd.service'
ggtarget
2022/08/13 03:11:46
/u02/app/crsdata/ggtarget/olr/backup_20220813_031146.olr 0
2022/08/13 03:11:49 CLSRSC-327: Successfully configured
Oracle Restart for a standalone server
[root@ggtarget u02]#
Verification
oracle 23455 10089 0 03:15 pts/3 00:00:00 grep --color=auto pmon
[oracle@ggtarget ~]$ ps -ef|grep tns
oracle 21098 1 0 03:12 ? 00:00:00 /u02/app/21c/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
oracle 23575 10089 0 03:16 pts/3 00:00:00 grep --color=auto tns
[oracle@ggtarget ~]$
[oracle@ggtarget ~]$ /u02/app/21c/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------Name Target State Server State details
--------------------------------------------------------------------------------
ora.DATA.dg ONLINE ONLINE ggtarget STABLE
ora.LISTENER.lsnr ONLINE ONLINE ggtarget STABLE
ora.asm ONLINE ONLINE ggtarget Started,STABLE
ora.ons OFFLINE OFFLINE ggtarget STABLE
--------------------------------------------------------------------------------Cluster Resources
--------------------------------------------------------------------------------
ora.cssd 1 ONLINE ONLINE ggtarget STABLE
ora.diskmon 1 OFFLINE OFFLINE STABLE
ora.driver.afd 1 ONLINE ONLINE ggtarget STABLE
ora.evmd 1 ONLINE ONLINE ggtarget STABLE
--------------------------------------------------------------------------------
[oracle@ggtarget ~]$
[oracle@ggtarget ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM
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 30716 30612 0 30612 0 N
DATA/
[oracle@ggtarget ~]$ $ORACLE_HOME/bin/asmcmd lsdsk
Path
AFD:DATA1
ASMCMD-9526: The AFD state is 'LOADED' and filtering is
'ENABLED' on host 'ggtarget.localdomain'
[oracle@ggtarget ~]$
[oracle@ggtarget ~]$ $ORACLE_HOME/bin/asmcmd dsget
parameter:/dev/sd*, AFD:*
profile:/dev/sd*,AFD:*
[oracle@ggtarget ~]$
Reference
No comments:
Post a Comment