RENAMEDISK & DELETEDISK through ASMLIB in 11gR2

ASM

RENAME/DELETE DISKLABEL through ASMLIB

We can rename a DISKLABEL in asm through two ways

1)      RENAMING BY PROVIDING  DISKLABEL NAME

In the below example, we are rename a disk label by providing the CURRENT DISKLABEL name to NEW DISKLABEL name

[[email protected]]#  /etc/init.d/oracleasm force-renamedisk TEMP5 TEMP6

Renaming disk “TEMP5” to “TEMP6”:                          [  OK  ]

[[email protected]]# oracleasm querydisk /dev/mapper/VOTE_05

Device “/dev/mapper/VOTE_05” is marked an ASM disk with the label “TEMP6”

2)      RENAMING BY PROVIDING THE DISK

In the below example, we are rename a disk label by providing the disk and new name to be allocated for the disk

[[email protected]]#  /etc/init.d/oracleasm force-renamedisk /dev/mapper/VOTE_05 TEMP5

Renaming disk “/dev/mapper/VOTE_05” to “TEMP5”:            [  OK  ]

[[email protected]]# oracleasm querydisk /dev/mapper/VOTE_05

Device “/dev/mapper/VOTE_05” is marked an ASM disk with the label “TEMP5”

We can DELETE a DISKLABEL in asm through two ways

1)      DELETE ASM DISK LABEL BY PROVIDING  DISKLABEL NAME

In below example we are check the disk to find the DISKLABEL and we are deleting a disklabel by providing the disklabel name

[[email protected]]# oracleasm querydisk /dev/mapper/VOTE_05

Device “/dev/mapper/VOTE_05” is marked an ASM disk with the label “TEMP5”

[[email protected]]# oracleasm deletedisk TEMP5

Clearing disk header: done

Dropping disk: done

2)      DELETE ASM DISK LABEL BY PROVIDING THE DISK

In below example, we are deleting a disklabel by providing the disk and we are check the disk status after deleting the disklabel

[[email protected]]# oracleasm deletedisk /dev/mapper/VOTE_05

Clearing disk header: done

Dropping disk: done

[[email protected]]#  oracleasm querydisk /dev/mapper/VOTE_05

Device “/dev/mapper/VOTE_05” is not marked as an ASM disk