Sunday, April 19, 2020

Reference: "How To Create An ACFS Filesystem (Standalone)” Author: Esteban D. Bernal"

Reference: "How To Create An ACFS Filesystem (Standalone)” Author: Esteban D. Bernal"


1) Connect to the ASM instance & create the ACFS diskgroup:


SQL> CREATE DISKGROUP ACFSTEST EXTERNAL REDUNDANCY

DISK 'ORCL:ASMDISK18' SIZE 4157 M

DISK 'ORCL:ASMDISK19' SIZE 4157 M

ATTRIBUTE 'compatible.asm' = '11.2', 'compatible.advm' = '11.2';

Diskgroup created.

2) Create the ACFS volume:

SQL> ALTER DISKGROUP ACFSTEST ADD VOLUME ACFSTESTVOL SIZE 7G;

Diskgroup altered.

3) Verify the volume was created and obtain the new volume name:

[grid@dbaasm grid]$ asmcmd

ASMCMD> volinfo -a

Diskgroup Name: ACFSTEST

Volume Name: ACFSTESTVOL

Volume Device: /dev/asm/acfstestvol-76

State: ENABLED

Size (MB): 7168

Resize Unit (MB): 256

Redundancy: UNPROT

Stripe Columns: 4

Stripe Width (K): 128

Usage:

Mountpath:

4) Connect as root OS user and create the mount point directory ( e.g. “/goldengate”):

[grid@dbaasm grid]$ su -

Password:

[root@dbaasm /]# mkdir /goldengate

5) Create the ACFS filesystem on the new volume ( e.g. “/dev/asm/acfstestvol-76”):

[root@dbaasm ~]# /sbin/mkfs -t acfs -b 4k /dev/asm/acfstestvol-76

mkfs.acfs: version = 11.2.0.1.0.0

mkfs.acfs: on-disk version = 39.0

mkfs.acfs: volume = /dev/asm/acfstestvol-76

mkfs.acfs: volume size = 7516192768

mkfs.acfs: Format complete

6) Register the ACFS filesystem on the new ACFS volume:

[root@dbaasm ~]# /sbin/acfsutil registry -f -a /dev/asm/acfstestvol-76 /goldengate

acfsutil registry: mount point /goldengate successfully added to Oracle Registry

7) Create the desired OS group (e.g. “ggate”):

[root@dbaasm ~]# groupadd ggate

[root@dbaasm ~]# grep ggate /etc/group

ggate:x:1302:

8) Create the desired OS user (e.g. “goldenguser”) and associated it with the desired

OS group(s) (e.g. “ggate”):

[root@dbaasm ~]# useradd -u 1150 -g ggate goldenguser

[root@dbaasm ~]# id goldenguser

uid=1150(goldenguser) gid=1302(ggate) groups=1302(ggate)

9) Mount the new mount point (“/goldengate”) on the new ACFS volume

(“/dev/asm/acfstestvol-76”):

[root@dbaasm ~]# /bin/mount -t acfs /dev/asm/acfstestvol-76 /goldengate

or

[root@dbaasm ~]# /sbin/mount.acfs -o all

10) Set the new OS ownership and set the new OS correct/desired permissions:

[root@dbaasm ~]# chown goldenguser:ggate /goldengate

[root@dbaasm ~]# chmod 775 /goldengate

[root@dbaasm ~]# ls -ld /goldengate

drwxrwxr-x 2 goldenguser ggate 4096 May 16 09:45 /goldengate

11) Verify the new filesystem (“/goldengate”) is mounted:

[root@dbaasm ~]# df -k /goldengate

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/asm/acfstestvol-76

7340032 51672 7288360 1% /goldengate

[grid@dbaasm grid]$ asmcmd

ASMCMD> volinfo -a

Diskgroup Name: ACFSTEST

Volume Name: ACFSTESTVOL

Volume Device: /dev/asm/acfstestvol-76

State: ENABLED

Size (MB): 7168

Resize Unit (MB): 256

Redundancy: UNPROT

Stripe Columns: 4

Stripe Width (K): 128

Usage: ACFS

Mountpath: /goldengate

12) Test files creation (permissions & ownership) on the new filesystem:

[root@dbaasm ~]# su - goldenguser

[goldenguser@dbaasm ~]$ pwd

/home/goldenguser

[goldenguser@dbaasm ~]$ cd /goldengate

[goldenguser@dbaasm goldengate]$ pwd

/goldengate

[goldenguser@dbaasm goldengate]$ touch test.txt

[goldenguser@dbaasm goldengate]$ ls -l

total 64

drwx------ 2 root root 65536 May 16 09:55 lost+found

-rw-r--r-- 1 goldenguser ggate 0 May 16 10:00 test.txt

No comments:

Post a Comment

student guide Dataguard: GLOBAL_DBNAME = <dbuniquename>_DGMGRL.example.com  Example: listener.ora on Primary Hosts Static listener ent...