运维联盟俱乐部

 找回密码
 立即注册
查看: 36502|回复: 1

exadata-管理-db节点-本地磁盘套件扩容

[复制链接]

该用户从未签到

发表于 2022-1-17 14:37:39 | 显示全部楼层 |阅读模式

通常,数据库服务器上的本地存储由 4 个 1.2TB 硬盘驱动器组成,配置为 RAID5,使用 RAID HBA 设备来确保冗余和可用性。
扩展套件也是 4 个 1.2TB 硬盘驱动器。 添加新驱动器会自动用额外的磁盘重建 RAID5(当然都是在线的),并且需要几个小时才能完成。

但是,在 Exadata X9M 中,我们使用 NVMe SSD 驱动器、标准 2x 驱动器和扩展套件中的 2x 驱动器。 RAID5 显然已经过时了,硬件材料清单中也没有提到 RAID HBA。
下面以X9M-2 和X8M-2 两个型号的扩容进行说明

1.X9M-2 数据库服务器的磁盘套件扩容

exadata-x9m-face.png


在开始之前,必须打开服务器电源,以便磁盘控制器能够感应到新驱动器的添加。
1)卸下覆盖空置驱动器托架的塑料填充面板,然后插入磁盘扩展套件中包含的驱动器
驱动器可以按任何顺序安装。 两个驱动器必须同时安装(在 30 分钟内),以便磁盘控制器可以在其中任何驱动器进入省电模式之前检测到新驱动器。
当磁盘控制器检测到新驱动器时,会自动发生以下情况:
>新驱动器被配置到位于 /dev/md26 的新镜像 (RAID1) 物理卷 (PV) 中。
>新创建的 PV 将添加到名为 VGExaDb 的卷组 (VG)。

这些自动配置步骤通常在插入磁盘后一分钟内完成

2)确认添加磁盘扩展套件已经完成
a.运行pvs命令确认定的pv已生成 PV at /dev/md26
# pvs
  PV         VG      Fmt  Attr PSize PFree
  /dev/md25  VGExaDb lvm2 a--  3.48t 39.75g
  /dev/md26  VGExaDb lvm2 a--  3.49t  3.49t

b.运行vgs显示vg空间已发生变化
# vgs
  VG      #PV #LV #SN Attr   VSize  VFree
  VGExaDb   2  11   0 wz--n- <6.98t 3.53t

您现在可以使用额外的空间来创建或扩展 LVM 分区及其关联的文件系统。

2.X8M-2 and Prior数据库服务器的磁盘套件扩容
注意下面的限制和前提:
仅从 Oracle Exadata Database Machine X5-2 开始系统支持磁盘扩展套件。
需要 Oracle Exadata 系统软件版本 12.1.2.3.0 或更高版本。
如果要将磁盘扩展套件添加到 Oracle Exadata Database Machine X7-2 系统,并且您使用的是 18.1.11 之前的 Oracle Exadata System Software 版本,请确保数据库服务器上存在以下符号链接,然后再继续:
# ls -l /opt/MegaRAID/MegaCli/MegaCli64
lrwxrwxrwx 1 root root 31 Jun  4 03:40 /opt/MegaRAID/MegaCli/MegaCli64 -> /opt/MegaRAID/storcli/storcli64

如果上面的符号链接不存在,则用下面命令进行创建
# mkdir -p /opt/MegaRAID/MegaCli
# ln -s /opt/MegaRAID/storcli/storcli64 /opt/MegaRAID/MegaCli/MegaCli64

扩容套件的大致过程如下:
1.卸下覆盖空置驱动器托架的塑料填充面板,然后插入磁盘扩展套件中包含的四个驱动器。
服务器应开机,以便磁盘控制器可以检测到新驱动器。
驱动器可以按任何顺序安装。 所有四个驱动器必须同时安装(在 30 分钟内),以便磁盘控制器可以在新驱动器中的任何一个进入省电模式之前检测到它们。
当磁盘控制器检测到新驱动器时,RAID 重建过程会自动开始

2.监控重配的进度,保证扩容的状态完好
RAID 重建过程可能需要几个小时才能完成(以下示例中为 7 小时)。 注意清楚的消息(下面的消息 1_2),它表示 RAID 重建过程已完成。
# dbmcli -e list alerthistory

         1_1     2016-02-15T14:01:00-08:00       warning         "A disk
expansion kit was installed. The additional physical drives were automatically
added to the existing RAID5 configuration, and reconstruction of the
corresponding virtual drive was automatically started."

         1_2     2016-02-15T21:01:01-08:00       clear           "Virtual drive reconstruction due to disk expansion was completed."
在 RAID 重建过程结束时,位于 /dev/sda 的虚拟驱动器包括来自磁盘扩展套件的额外存储空间。

3.如果您要在部署新系统的过程中添加磁盘扩展套件,请继续执行此步骤。 否则,跳到下一步。
本节使用 reclaimdisks.sh 扩展 VGExaDb 卷组,以便它使用磁盘扩展套件提供的额外存储空间。
reclaimdisks.sh 仅在安装数据库软件之前的初始部署期间有效。

a.Run /opt/oracle.SupportTools/reclaimdisks.sh -extend-vgexadb to extend the VGExaDb volume group.
# /opt/oracle.SupportTools/reclaimdisks.sh -extend-vgexadb
Model is ORACLE SERVER X6-2
Number of LSI controllers: 1
Physical disks found: 8 (252:0 252:1 252:2 252:3 252:4 252:5 252:6 252:7)
Logical drives found: 1
Linux logical drive: 0
RAID Level for the Linux logical drive: 5
Physical disks in the Linux logical drive: 8 (252:0 252:1 252:2 252:3 252:4 252:5 252:6 252:7)
Dedicated Hot Spares for the Linux logical drive: 0
Global Hot Spares: 0
Valid. Disks configuration: RAID5 from 8 disks with no global and dedicated hot spare disks.
Valid. Booted: Linux. Layout: Linux + DOM0.
[INFO     ] Size of system block device /dev/sda: 4193GB
[INFO     ] Last partition on /dev/sda ends on: 1797GB
[INFO     ] Unused space detected on the system block device: /dev/sda
[INFO     ] Label of partition table on /dev/sda: gpt
[INFO     ] Adjust the partition table to use all of the space on /dev/sda
[INFO     ] Respond to the following prompt by typing 'F'
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 4679680000 blocks) or
continue with the current setting?
Fix/Ignore? F
Model: LSI MR9361-8i (scsi)
Disk /dev/sda: 4193GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
1      32.8kB  537MB   537MB   ext4         primary  boot
2      537MB   123GB   122GB                primary  lvm
3      123GB   1690GB  1567GB               primary
4      1690GB  1797GB  107GB                primary  lvm

[INFO     ] Check for Linux with inactive DOM0 system disk
[INFO     ] Valid Linux with inactive DOM0 system disk is detected
[INFO     ] Number of partitions on the system device /dev/sda: 4
[INFO     ] Higher partition number on the system device /dev/sda: 4
[INFO     ] Last sector on the system device /dev/sda: 8189440000
[INFO     ] End sector of the last partition on the system device /dev/sda: 3509759000
[INFO     ] Unmount /u01 from /dev/mapper/VGExaDbOra-LVDbOra1
[INFO     ] Remove inactive system logical volume /dev/VGExaDb/LVDbSys3
[INFO     ] Remove xen files from /boot
[INFO     ] Remove logical volume /dev/VGExaDbOra/LVDbOra1
[INFO     ] Remove volume group VGExaDbOra
[INFO     ] Remove physical volume /dev/sda4
[INFO     ] Remove partition /dev/sda4
[INFO     ] Remove device /dev/sda4
[INFO     ] Remove partition /dev/sda3
[INFO     ] Remove device /dev/sda3
[INFO     ] Create primary partition 3 using 240132160 8189439966
[INFO     ] Set lvm flag for the primary partition 3 on device /dev/sda
[INFO     ] Add device /dev/sda3
[INFO     ] Primary LVM partition /dev/sda3 has size 7949307807 sectors
[INFO     ] Create physical volume on partition /dev/sda3
[INFO     ] LVM Physical Volume /dev/sda3 has size 3654340511 sectors
[INFO     ] Size of LVM physical volume less than size of device /dev/sda3
[INFO     ] Remove LVM physical volume /dev/sda3
[INFO     ] Reboot is required to apply the changes in the partition table


b.如果需要重启,则重启系统
# shutdown -r now
重启后
# /opt/oracle.SupportTools/reclaimdisks.sh -extend-vgexadb

c.运行reclaimdisks.sh 脚本,不带任何参数
# /opt/oracle.SupportTools/reclaimdisks.sh
Model is ORACLE SERVER X6-2
Number of LSI controllers: 1
Physical disks found: 8 (252:0 252:1 252:2 252:3 252:4 252:5 252:6 252:7)
Logical drives found: 1
Linux logical drive: 0
RAID Level for the Linux logical drive: 5
Physical disks in the Linux logical drive: 8 (252:0 252:1 252:2 252:3 252:4 252:5 252:6 252:7)
Dedicated Hot Spares for the Linux logical drive: 0
Global Hot Spares: 0
Valid. Disks configuration: RAID5 from 8 disks with no global and dedicated hot spare disks.
Valid. Booted: Linux. Layout: Linux.

您现在可以继续部署系统并使用磁盘扩展套件提供的额外存储空间。 不要执行下一步。

4.如果要将磁盘扩展套件添加到先前部署的系统,请继续执行此步骤。
a)Run parted to view the sector information for /dev/sda
# parted /dev/sda
GNU Parted 2.1Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s
(parted) print
Warning: Not all of the space available to /dev/sda appears to be used, you can
fix the GPT to use all of the space (an extra 4679680000 blocks) or continue
with the current setting? Fix/Ignore? F  

Model: LSI MR9361-8i (scsi)
Disk /dev/sda: 8189440000s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start       End           Size         File system  Name     Flags
1       64s         1046591s      1046528s     ext3         primary  boot
4       1046592s    1048639s      2048s                     primary  bios_grub
2       1048640s    240132159s    239083520s                primary  lvm

(parted) q

检查输出并记下磁盘大小。 还要注意最大的结束扇区值,它应该是最后一个分区的结束扇区。 在前面的示例中,磁盘大小为 8189440000 个扇区,最大结束扇区值为 240132159。您将在下一步中使用这些值。


b)在/dev/sda 创建一个新的分区
该命令需要一个起始扇区和一个结束扇区,您必须从您之前记下的值派生它们。
对于起始扇区,将上一步的最大结束扇区值加 1。 例如:240132159 + 1 = 240132160。
对于结束扇区,从磁盘大小值中减去 34。 例如:8189440000 - 34 = 8189439966。

# parted -s /dev/sda mkpart primary 240132160s 8189439966s

c)查看更新的分区表并记下新分区的分区号。
在此示例中,新分区号为 3。您将在以下命令中使用此值。
# parted -s /dev/sda unit s print
Model: LSI MR9361-8i (scsi)
Disk /dev/sda: 8189440000s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start        End          Size         File system  Name     Flags
1       64s         1046591s      1046528s     ext4         primary  boot
4       1046592s    1048639s      2048s                     primary  bios_grub
2       1048640s    240132159s    239083520s                primary  lvm
3       240132160s  8189439966s   7949307807s               primary  

d)为新分区设置LVM flag (这里注意为3)
# parted -s /dev/sda set 3 lvm on
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or
resource busy).  As a result, it may not reflect all of your changes until after reboot.

e)在新创建的分区上创建一个 LVM 物理卷 (PV)。
在这个例子中,新的分区号是 3,所以物理卷是 /dev/sda3。 根据您之前观察到的分区号调整命令。

# lvm pvcreate --force /dev/sda3

f)扩容vg:VGExaDb
# lvm vgextend VGExaDb /dev/sda3
  Volume group "VGExaDb" successfully extended

现在可根据需求进行lvm和文件系统的扩容。






回复

使用道具 举报

  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2022-1-17 14:52:28 | 显示全部楼层
    good
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-23 21:57 , Processed in 0.053508 second(s), 24 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表