Exadata Interleaved GridDisk 2

原文链接: http://www.dbaleet.org/exadata_interleaved_griddisk_2

下面简单对比一下普通的griddisk和interleaving griddisk的区别:

首先创建普通的celldisk:

CellCLI> create celldisk all
CellDisk FD_00_cell1 successfully created
CellDisk FD_01_cell1 successfully created
CellDisk FD_02_cell1 successfully created
CellDisk FD_03_cell1 successfully created
CellDisk CD_disk01_cell1 successfully created
CellDisk CD_disk02_cell1 successfully created
CellDisk CD_disk03_cell1 successfully created
CellDisk CD_disk04_cell1 successfully created
CellDisk CD_disk05_cell1 successfully created
CellDisk CD_disk06_cell1 successfully created
CellDisk CD_disk07_cell1 successfully created
CellDisk CD_disk08_cell1 successfully created
CellDisk CD_disk09_cell1 successfully created
CellDisk CD_disk10_cell1 successfully created
CellDisk CD_disk11_cell1 successfully created
CellDisk CD_disk12_cell1 successfully created

查看任意一块celldisk的详细属性:

CellCLI> list celldisk CD_disk01_cell1 detail
	 name:              	 CD_disk01_cell1
	 comment:           	 
	 creationTime:      	 2013-05-22T14:16:59+08:00
	 deviceName:        	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 devicePartition:   	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 diskType:          	 HardDisk
	 errorCount:        	 0
	 freeSpace:         	 944M
	 freeSpaceMap:      	 offset=48M,size=944M
	 id:                	 03a9c752-0553-4f06-82e0-4adb017e04d2
	 interleaving:      	 none
	 lun:               	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 physicalDisk:      	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 raidLevel:         	 "RAID 0"
	 size:              	 992M
	 status:            	 normal

在我的测试环境下,每块celldisk的空间为992M。

注意正常情况下其freespace,freepaceMap和interleaving的值:

freespace为一块celldisk实际可用的空间,计算方式为:992M-48M=944M;

因为默认情况下interleaving的属性没有指定,所以其属性为none。

 

然后创建interleaving为normal冗余的celldisk:

[root@cell ~]# cellcli -e create celldisk all  interleaving='normal_redundancy'
CellDisk FD_00_cell1 successfully created
CellDisk FD_01_cell1 successfully created
CellDisk FD_02_cell1 successfully created
CellDisk FD_03_cell1 successfully created
CellDisk CD_disk01_cell1 successfully created
CellDisk CD_disk02_cell1 successfully created
CellDisk CD_disk03_cell1 successfully created
CellDisk CD_disk04_cell1 successfully created
CellDisk CD_disk05_cell1 successfully created
CellDisk CD_disk06_cell1 successfully created
CellDisk CD_disk07_cell1 successfully created
CellDisk CD_disk08_cell1 successfully created
CellDisk CD_disk09_cell1 successfully created
CellDisk CD_disk10_cell1 successfully created
CellDisk CD_disk11_cell1 successfully created
CellDisk CD_disk12_cell1 successfully created

在没有创建任何griddisk之前,来看一下其信息:

CellCLI> list celldisk CD_disk01_cell1 detail
	 name:              	 CD_disk01_cell1
	 comment:           	 
	 creationTime:      	 2013-05-22T14:30:58+08:00
	 deviceName:        	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 devicePartition:   	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 diskType:          	 HardDisk
	 errorCount:        	 0
	 freeSpace:         	 944M
	 freeSpaceMap:      	 offset=48M,size=944M
	 id:                	 bfec4ef8-faaa-482b-b925-9030ac27423c
	 interleaving:      	 normal_redundancy
	 lun:               	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 physicalDisk:      	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 raidLevel:         	 "RAID 0"
	 size:              	 992M
	 status:            	 normal

注意这里的interleaving属性变为:normal_redundancy;

另外freespace显示还有944M的空间可用。 可用地址空间为(offset 48M, offset 992M), 合计944M。

接下来我们在celldisk CD_disk01_cell1创建一块大小为500M的interleaving griddisk:

CellCLI> create griddisk data_CD_disk01_cell1 celldisk=CD_disk01_cell1, size=500M
GridDisk data_CD_disk01_cell1 successfully created

再次查看celldisk:

CellCLI> list celldisk CD_disk01_cell1 detail
	 name:              	 CD_disk01_cell1
	 comment:           	 
	 creationTime:      	 2013-05-22T14:30:58+08:00
	 deviceName:        	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 devicePartition:   	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 diskType:          	 HardDisk
	 errorCount:        	 0
	 freeSpace:         	 448M
	 freeSpaceMap:      	 offset=288M,size=224M
	                    	 offset=768M,size=224M
	 id:                	 bfec4ef8-faaa-482b-b925-9030ac27423c
	 interleaving:      	 normal_redundancy
	 lun:               	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 physicalDisk:      	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 raidLevel:         	 "RAID 0"
	 size:              	 992M
	 status:            	 normal

可以看到在使用了500M空间以后,celldisk CD_disk01_cell1的可用空间只剩下448M,这部分剩余空间为(offset 228M,offset 512M)以及(offset 768M, offset 992M)这两段地址空间,每段可用分别为224M,合计448M。

继续在创建一块大小为300M的griddisk:

CellCLI> create griddisk data_CD_disk01_cell2 celldisk=CD_disk01_cell1, size=300M
GridDisk data_CD_disk01_cell2 successfully created

然后再来查看celldisk中的可用空间信息:

CellCLI> list celldisk CD_disk01_cell1 detail
	 name:              	 CD_disk01_cell1
	 comment:           	 
	 creationTime:      	 2013-05-22T14:30:58+08:00
	 deviceName:        	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 devicePartition:   	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 diskType:          	 HardDisk
	 errorCount:        	 0
	 freeSpace:         	 160M
	 freeSpaceMap:      	 offset=432M,size=80M
	                    	 offset=912M,size=80M
	 id:                	 bfec4ef8-faaa-482b-b925-9030ac27423c
	 interleaving:      	 normal_redundancy
	 lun:               	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 physicalDisk:      	 /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/disk01
	 raidLevel:         	 "RAID 0"
	 size:              	 992M
	 status:            	 normal

在创建了一块500M和一块300M的griddisk以后。celldisk  CD_disk01_cell1的可用空间为160M,这160M分别分布在(offset 432M, offset 512M)以及(offset 912M, offset 992M)这两端地址空间,同时也可以推测到griddisk data_CD_disk01_cell2所占用的空间分布在(offset 288, offset 432M)以及(offset 768M, offset 912M).

interleaving griddisk支持对其进行resize,我们可以使用以下方式对interleaving griddisk的大小进行调整:

CELLCLI> alter griddisk  griddisk_name size=actualsize

例如我要将data_CD_disk01_cell2的大小调整为400M, 就可以使用如下命令进行调整:

CELLCLI> alter griddisk  data_CD_disk01_cell2 size=400M

不过执行此命令前端命令行会挂起,直到resize完成。也可以加上nowait选项,命令行会立刻返回,但是实际的resize过程会放在后台来完成:

CELLCLI> alter griddisk  data_CD_disk01_cell2 size=400M nowait

执行过程中查看griddisk的lastResizeStatus: 如果正在这行则为working

CellCLI> list griddisk data_CD_disk01_cell2 attributes lastResizeStatus
                             working

如果执行完成,则状态变为complete:

CellCLI> list griddisk data_CD_disk01_cell2 attributes lastResizeStatus
                              complete

同时可以使用如下命令来查看resize的完成时间:

CellCLI> list griddisk data_CD_disk01_cell2 attributes lastResizeTime

如果失败,则可用如下命令来查看错误信息:

CellCLI> list griddisk  data_CD_disk01_cell2  attributes resizeError

并且每一次resize都会在cell的alert中有一条对应的记录,如果发生错误会记录对应的错误信息。

常见的错误信息一般都是空间不足导致无法resize:

CellCLI>  alter griddisk   data_CD_disk01_cell2 size=100G

CELL-02661: The grid disk resize operation has failed for data_CD_disk01_cell2: actual griddisk size is different from requested ( may be because of insufficient  space for the specified allocation).

 

以上

Comment

*

沪ICP备14014813号

沪公网安备 31010802001379号