Managing ADVM & ACFS using CLI

Create an Oracle ASM volume

ASMCMD [+] > volcreate -G datadg -s 10G datavol1

Which is equivalent to  alter diskgroup datadg add volume datavol1 size 10G;

Checking volume information

ASMCMD [+] > volinfo -G datadg  datavol1
ASMCMD [+] > volinfo -a

How to automatically mount the filesystem, after reboots

#  acfsutil registry -a /dev/asm/datavol1-316 /data
acfsutil registry: mount point /data successfully added to Oracle Registry

This command will add this filesystem in the Grid registry & will mount it after reboot or grid restart.
To unregister a file system from the Oracle Automatic Storage Management volume registry

# acfsutil registry -d /data

Create file system

# mkfs -t acfs /dev/asm/datavol1-316 (Linux)
# mkfs -V acfs /dev/asm/datavol1-316 (AIX)
# mkfs -F acfs /dev/asm/datavol1-316 (Solaris)

Mounting file system

# mount -t acfs /dev/asm/datavol1-316  /data (linux)
# mount -V acfs /dev/asm/datavol1-316  /data (AIX)
# mount -F acfs /dev/asm/datavol1-316  /data (Solaris)

 Remove the file system

# acfsutil rmfs /dev/asm/datavol1-316

Disable the volume

ASMCMD> voldisable -G datadg datavol1

Delete the volume

ASMCMD> voldelete -G datadg datavol1

Check and repair an Oracle ACFS file system.

# fsck -a -v -y -t acfs /dev/asm/datavol1-316 (Linux)
# fsck -a -v -y -V acfs /dev/asm/datavol1-316 (AIX)
# fsck -a -v -y -F acfs /dev/asm/datavol1-316 (Solaris)

 Dismount all ACFS filesystems on the node

# umount -a -t acfs (Linux Only)
# unmountall -F acfs (Solaris, AIX)

Creating ACFS Snapshots

Another feature of ACFS is called snapshots, which is an online, read-only, point in time copy. Snapshots work at the block level instead of the file level, which means significant saving in storage space. When a file is modified, only the changed blocks are copied over to the new location. It uses Copy-On-Write functionality. Up to 63 snapshot views supported for each file system. 

# acfsutil snap create data_bkp  /data
acfsutil snap create: Snapshot operation is complete.

This operation creates a directory structure /data/.ACFS/snaps/data_bkp.
When the snapshots are first created on the file system, nothing is actually stored (Copy-on-Write), so there is no space consumption.
To delete the snapshots

# acfsutil snap delete data_bkp  /data
This entry was posted in ACFS, ADVM, Oracle Automatic Storage Management and tagged . Bookmark the permalink.

One Response to Managing ADVM & ACFS using CLI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s