- Add and remove asmdiskgroup in 12c using command line
[root@srv1 ~]# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x20717bf6.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1 dsdsdsd
First cylinder (1-1566, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1566, default 1566):
Using default value 1566
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@srv1 ~]# fdisk -l
Disk /dev/sda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00047a8e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 77 614400 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 77 599 4194304 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3 599 10444 79076352 83 Linux
Disk /dev/sdb: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb374f6ac
Device Boot Start End Blocks Id System
/dev/sdb1 1 1566 12578863+ 83 Linux
Disk /dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbf063e34
Device Boot Start End Blocks Id System
/dev/sdc1 1 2610 20964793+ 83 Linux
Disk /dev/sdd: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8af70889
Device Boot Start End Blocks Id System
/dev/sdd1 1 2610 20964793+ 83 Linux
Disk /dev/sde: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xff585e78
Device Boot Start End Blocks Id System
/dev/sde1 1 522 4192933+ 83 Linux
Disk /dev/sdf: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20717bf6
Device Boot Start End Blocks Id System
/dev/sdf1 1 1566 12578863+ 83 Linux
- Create ASM disk using raw partition
[root@srv1 ~]# oracleasm createdisk backup /dev/sdf1
Writing disk header: done
Instantiating disk: done
[root@srv1 ~]# oracleasm listdisks
BACKUP
CRS
DATA
FRA
[root@srv1 ~]# su grid
[grid@srv1 root]$ cd
[grid@srv1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base remains unchanged with value /u01/app/grid
[grid@srv1 ~]$ asmcmd
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 12284 7807 0 7807 0 Y CRS/
MOUNTED EXTERN N 512 4096 1048576 20473 17997 0 17997 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 20473 20142 0 20142 0 N FRA/
ASMCMD> exit
[grid@srv1 ~]$
- Add ASM disk group with EXTERNAL redundancy level.
- Drop diskgroup backup
- Delete at OS level
No comments:
Post a Comment