Oracle管理监控之为11g asm磁盘组添加磁盘

1、物理机挂在要添加的磁盘,虚拟机格式化虚拟硬盘

2、登录服务器:fdisk -l

[root@node2 ~]# fdisk -l

Disk /dev/sda: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 10965 88076331 83 Linux

/dev/sda2 10966 13054 16779892+ 82 Linux swap / Solaris

Disk /dev/sdb: 3221 MB, 3221225472 bytes

255 heads, 63 sectors/track, 391 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 1 391 3140676 83 Linux

Disk /dev/sdc: 3221 MB, 3221225472 bytes

255 heads, 63 sectors/track, 391 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdc1 1 391 3140676 83 Linux

Disk /dev/sdd: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdd1 1 13054 104856223+ 83 Linux

Disk /dev/sde: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sde1 1 13054 104856223+ 83 Linux

Disk /dev/sdf: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdf1 1 13054 104856223+ 83 Linux

Disk /dev/sdg: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdg1 1 13054 104856223+ 83 Linux

Disk /dev/sdh: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdh doesn't contain a valid partition table

Disk /dev/sdi: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdi doesn't contain a valid partition table

3、格式化/dev/sdh和/dev/sdi

[root@node2 ~]# fdisk /dev/sdh

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

The number of cylinders for this disk is set to 13054.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-13054, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-13054, default 13054):

Using default value 13054

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@node2 ~]#

4、创建asm磁盘

[root@node1 ~]# oracleasm listdisks

VOL1

VOL2

VOL3

VOL4

VOL5

VOL6

[root@node2 ~]# oracleasm createdisk VOL7 /dev/sdh1

Writing disk header: done

Instantiating disk: done

[root@node2 ~]# oracleasm createdisk VOL8 /dev/sdi1

Writing disk header: done

Instantiating disk: done

[root@node2 ~]#

[root@node2 ~]#

[root@node2 ~]#

[root@node2 ~]# oracleasm listdisks

VOL1

VOL2

VOL3

VOL4

VOL5

VOL6

VOL7

VOL8

[root@node2 ~]#

[root@node1 ~]# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

Instantiating disk "VOL7"

Instantiating disk "VOL8"

[root@node1 ~]# oracleasm listdisks

VOL1

VOL2

VOL3

VOL4

VOL5

VOL6

VOL7

VOL8

5、asmca添加磁盘到磁盘组data

6、asm自平衡

Oracle管理监控之为11g asm磁盘组添加磁盘

Oracle管理监控之为11g asm磁盘组添加磁盘

上一篇:SQL中的declare用法


下一篇:NYOJ:题目860 又见01背包