2018-09-04

Creating a file system for Oracle database

Environment: Oracle Linux 7.5

Steps:

1. Create Virtual Disk on VM.

List all disks.

lsblk

lsblk -o name,mountpoint,label,size,uuid,partlabel,partuuid,serial,wwn,fstype


2. Create a partition table and a GPT partition: mkpart <PART-LABEL> <START> <END>

parted /dev/xvdc

(parted) mktable gpt

(parted) mkpart OMR 0% 100%

(parted) quit


3. Create EXT4 file system

mkfs.ext4 -T largefile4 /dev/xvdc1

lsblk -o name,mountpoint,label,size,uuid,partlabel,partuuid,serial,wwn,fstype


4. Mount and set permissions

mkdir -p /data001/oradata/OEMDB

vi /etc/fstab

add the following:

UUID=xxxx /data001/oradata/OEMDB ext4 noatime,nodiratime,nobarrier 1 2


mount /data001/oradata/OEMDB

df -h

chown oracle:oinstall /data001/oradata/OEMDB

ls -ld /data001/oradata/OEMDB


5. Reducing reserved blocks

By default 5% of the space to be usable only by root. E.g. You can reduce it to 0.5% by doing:

tune2fs -m 0.5 /dev/xvdc1

tune2fs -l /dev/xvdc1


Documentation

Improve I/O Performance On ext3/ext4 File Systems With The "noatime" Mount Option (Doc ID 1561740.1)

Available Mount Options to Improve ext4 Filesystem Performance (Doc ID 1476869.1)

Supported and Recommended File Systems on Linux (Doc ID 236826.1)

Oracle Database - Filesystem & I/O Type Supportability on Oracle Linux 6 (Doc ID 1601759.1)


Create XFS file system

In similar way, create FRA 30GiB, XFS file system, /data001/oradata/fast_recovery_area

mkfs.xfs /dev/xvde1

mkdir -p /data001/oradata/fast_recovery_area

lsblk -o name,mountpoint,label,size,uuid,partlabel,partuuid,serial,wwn,fstype

vi /etc/fstab

UUID=xxxx /data001/oradata/fast_recovery_area  xfs  defaults 0 0

mount /data001/oradata/fast_recovery_area

chown oracle:oinstall /data001/oradata/fast_recovery_area

ls -ld /data001/oradata/fast_recovery_area


No comments:

Post a Comment