Create and remove the ASM disk in Oracle

Create and Remove the ASM disk with Oracle ASM libraries

ORACLEASM command utility is used the Oracle ASMLib libraries for configuring and managing the ASM disks.

Following are the commands used by ASM lib:

List the disk of ASM

# /etc/init.d/oracleasm listdisk

# /etc/init.d/oracleasm scandisks

Create the ASM Disk

#/etc/init.d/oracleasm createdisk DISK_NAME PARTITION_NAME
# /etc/init.d/oracleasm createdisk data /dev/sdc1

Remove the ASM disk

#/etc/init.d/oracleasm deletedisk DISK_NAME PARTITION_NAME
# /etc/init.d/oracleasm deletedisk data /dev/sdc1

Start and stop the asm

-- Start the asm
#/etc/init.d/oracleasm start
-- Stop the asm
#/etc/init.d/oracleasm stop
-- Restart the asm
#/etc/init.d/oracleasm restart

Check the status of ASM

#/etc/init.d/oracleasm status

Enable or disable the ASM

-- Enable the ASM
#/etc/init.d/oracleasm enable
-- Disable the ASM
#/etc/init.d/oracleasm disable

Check configuration

/etc/init.d/oracleasm configure

Query to disk for more information

#/etc/init.d/oracleasm querydisk DISK_NAME
#/etc/init.d/oracleasm querydisk -d LABEL
#/etc/init.d/oracleasm querydisk /dev/sdc6
#/etc/init.d/oracleasm querydisk -d VOL6
#/etc/init.d/oracleasm querydisk -p VOL1

Rename the ASM Disk

#/etc/init.d/oracleasm renamedisk PARTITION_NAME DISK_NAME
#/etc/init.d/oracleasm renamedisk /dev/sdc1 VOL2

Delete the ASM disk

#/etc/init.d/oracleasm deletedisk DISK_NAME
#/etc/init.d/oracleasm deletedisk /dev/sdc2

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.