Exadata上本地盘的使用(reclaimdisks.sh)

联系:QQ(5163721)

标题:Exadata上本地盘的使用(reclaimdisks.sh)

作者:Lunar©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.]

Exadata出厂时,其计算节点本地有4块盘,两两做RAID 1,安装了双OS,一个是Linux,一个是Solaris X86(不是Sparc,O(∩_∩)O哈哈~)

X2是每块本地盘300G,从X3开始,每块本地盘600G。

多出一个没用的OS,这样就浪费了很多空间,因此,安装或者重装后,一般都做Reclaim的操作,将出厂时的双OS改为单独的Linux系统启动,并释放空间。

例如这里:

[root@dm01db02 ~]# /opt/oracle.SupportTools/reclaimdisks.sh -check
[INFO] This is SUN FIRE X4170 M2 SERVER machine
[INFO] Number of LSI controllers: 1
[INFO] Physical disks found: 4 (252:0 252:1 252:2 252:3)
[INFO] Logical drives found: 3
[INFO] Dual boot installation: yes
[INFO] Linux logical drive: 0
[INFO] RAID Level for the Linux logical drive: 1
[INFO] Physical disks in the Linux logical drive: 2 (252:0 252:1)
[INFO] Dedicated Hot Spares for the Linux logical drive: 0
[INFO] Global Hot Spares: 0
[INFO] Valid dual boot configuration found for Linux: RAID1 from 2 disks
[root@dm01db02 ~]#

这里显示当前4块本地盘,做了双启动系统,每两块盘做了RAID 1,没有Hot Spares盘

使用reclaimdisks.sh -free -reclaim可以更改为一个单独的系统,大部分客户会选择使用Linux,例如:

[root@dm01db02 ~]# /opt/oracle.SupportTools/reclaimdisks.sh -free -reclaim

Started from /opt/oracle.SupportTools/reclaimdisks.sh
[INFO] Free mode is set
[INFO] Reclaim mode is set
[INFO] This is SUN FIRE X4170 M2 SERVER machine
[INFO] Number of LSI controllers: 1
[INFO] Physical disks found: 4 (252:0 252:1 252:2 252:3)
[INFO] Logical drives found: 3
[INFO] Dual boot installation: yes
[INFO] Linux logical drive: 0
[INFO] RAID Level for the Linux logical drive: 1
[INFO] Physical disks in the Linux logical drive: 2 (252:0 252:1)
[INFO] Dedicated Hot Spares for the Linux logical drive: 0
[INFO] Global Hot Spares: 0
[INFO] Non-linux physical disks that will be reclaimed: 2 (252:2 252:3)
[INFO] Non-linux logical drives that will be reclaimed: 2 (1 2)
Remove logical drive 1

Adapter 0: Deleted Virtual Drive-1(target id-1)

Exit Code: 0x00
Remove logical drive 2

Adapter 0: Deleted Virtual Drive-2(target id-2)

Exit Code: 0x00
[INFO] Remove Solaris entries from /boot/grub/grub.conf
[INFO] Disk reclaiming started in the background with parent process id 110717.
[INFO] Check the log file /var/log/cellos/reclaimdisks.bg.log.
<strong>[INFO] This process may take about two hours.</strong>
<strong>[INFO] DO NOT REBOOT THE NODE.</strong>
<strong>[INFO] The node will be rebooted automatically upon completion.</strong>

reclaim的过程大概2小时左右,完成后的结果类似下面:

[root@dm01db02 ~]# /opt/oracle.SupportTools/reclaimdisks.sh -check
[INFO] This is SUN FIRE X4170 M2 SERVER machine
[INFO] Number of LSI controllers: 1
[INFO] Physical disks found: 4 (252:0 252:1 252:2 252:3)
[INFO] Logical drives found: 1
[INFO] Dual boot installation: no
[INFO] Linux logical drive: 1
[INFO] RAID Level for the Linux logical drive: 5

[INFO] Physical disks in the Linux logical drive: 3 (252:1 252:2 252:3)
[INFO] Dedicated Hot Spares for the Linux logical drive: 0
[INFO] Global Hot Spares: 1 (252:0)
[INFO] Valid single boot configuration found for Linux: RAID5 from 3 disks and 1 global hot spare disk
[root@dm01db02 ~]#

这里,我们看到,4块本地盘,一个做了Hot spare disk,其余3块做RAID5,只有一个Linux OS了。

这样就把以前Solaris X86 OS 的空间释放出来了,但是这部分空间缺省并没有自动mount上,你需要手工的mount上,或者自己使用LVM扩充到根目录(/)或者非根目录(比如/u01等等),或者扩到Swap区。
例如:

[root@dm01db01 ~]# lvs
 LV VG Attr LSize Origin Snap% Move Log Copy% Convert
 LVDbOra1 VGExaDb -wi-ao 100.00G
 LVDbSwap1 VGExaDb -wi-ao 24.00G
 LVDbSys1 VGExaDb -wi-ao 30.00G
[root@dm01db01 ~]#
[root@dm01db01 ~]# vgs
 VG #PV #LV #SN Attr VSize VFree
 VGExaDb 1 3 0 wz--n- 557.62G <strong>403.62G</strong>
[root@dm01db01 ~]#

这里我们看到做完reclaim后,释放出来400G左右的空间,这个是X2,每块本地盘300G。
如果是X3,每块本地盘600G,做完reclaim后释放出来600G左右的空间,就类似下面的样子:

[root@dm04db01 ~]# lvs
 LV VG Attr LSize Origin Snap% Move Log Copy% Convert
 LVDbOra1 VGExaDb -wi-ao 100.00G
 LVDbSwap1 VGExaDb -wi-ao 24.00G
 LVDbSys1 VGExaDb -wi-ao 30.00G
 LVDbSys2 VGExaDb -wi-a- 30.00G
 temp VGExaDb -wi-ao 50.00G
[root@dm04db01 ~]# vgs
 VG #PV #LV #SN Attr VSize VFree
 VGExaDb 1 5 0 wz--n- 834.89G<strong> 600.89G</strong>
[root@dm04db01 ~]#
[root@dm04db01 ~]#
[root@dm04db01 ~]#

现在你就可以使用lvm lvexten等命令,将这些空间扩到你需要的放了,O(∩_∩)O哈哈~。

此条目发表在 安装和升级, 日常运维 分类目录,贴了 , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注