1. 前言
为什么会有收缩根文件系统空间的这种需求呢,这主要是近期的一次Exadata升级项目遇到这种困境。一台11.2.3.3.0版本的Exadata,进行计算节点升级时,提示LVDbSys1的空间大于LVDbSys2的空间,无法进行操作系统备份,升级前的预检查工作失败。(LVDbSys1已经被扩展至1.1TB;而LVDbSys2还是默认的30GB)
打算在计算节点正式升级的过程中,跳过操作系统备份这个步骤。但发现,正式升级时,仍然会执行预检查工作,依旧提示LVDbSys1大于LVDbSys2。由于该VG的剩余空间不足以扩展LVDbSys2,所以只能想办法收缩LVDbSys1的大小。
2. Exadata计算节点,收缩(/)根文件系统的步骤
2.1 查阅Exadata官方手册,手册中,只提及如何扩展(/)根文件系统, 或者 如何收缩普通的文件系统。没有提及 如何收缩(/)根文件系统。
参考Exadata官方手册中“收缩普通的文件系统”的内容,可以发现:即使该文件系统支持在线扩展功能,但如果是收缩操作,也必须先将该文件系统umount下来,再进行操作。同样地,我们可以先用diag.iso引导启动该计算节点,然后把展(/)根文件系统当作普通的文件系统来处理即可。
2.2 用diag.iso引导启动该计算节点,
-
Restart the system in diagnostic mode as follows:
-
Copy the
/opt/oracle.SupportTools/diagostics.iso
file to a directory on the machine using the ILOM interface. -
Log in to the ILOM web interface.
-
Select the Remote Control tab.
-
Select the Redirection tab.
-
Click Launch Remote Console. The ILOM Remote Console window is displayed.
-
Select the Devices menu in the ILOM Remote Console window.
-
Click CD-ROM image.
-
Navigate to the location of the
diagnostics.iso
file on the local machine in the File Open dialog box. -
Select the
diagnostics.iso
file. -
Click Open. A message similar to the following will appear on the console.
-
Select Host Control from the Remote Control tab.
-
Select CDROM as the next boot device from the list of values.
-
Click Save. When the system is booted, the
diagnostics.iso
image is used. The system reverts to the default after the next restart. -
Log in as the
root
user in the ILOM Remote Console window. -
Restart the server using the following command:
# shutdown -r -y now
The system starts using the
diagnostics.iso
image.
-
-
Enter
e
to enter the diagnostic shell as follows:Choose from following by typing letter in '()': (e)nter interactive diagnostics shell. Must use credentials from Oracle support to login (reboot or power cycle to exit the shell), (r)estore system from NFS backup archive, Select:e
-
Log in to the system as the
root
user. You will be prompted for the password.localhost login: root Password: ********* -sh-3.1#
-
Copy the
/mnt/cell/sbin/resize2fs
file to the/sbin
directory using the following command:# cp /mnt/cell/sbin/resize2fs /sbin
-
Unmount the
root
file system using the following command.# cd / # umount /mnt/cell
-
Verify the logical volume name using the following command:
# lvm lvscan ACTIVE '/dev/VGExaDb/LVDbSys1' [1126.00 GB] inherit ACTIVE '/dev/VGExaDb/LVDbSwap1' [24.00 GB] inherit ACTIVE '/dev/VGExaDb/LVDbOra1' [100.00 GB] inherit
2.3 正式收缩文件系统空间
# e2fsck -f /dev/VGExaDb/LVDbSys1
# resize2fs /dev/VGExaDb/LVDbSys1 30G
# lvm lvreduce -L 30G --verbose /dev/VGExaDb/LVDbSys1
3. 重启操作系统,验证(/)根文件系统已经收缩至30GB。
标签:文件系统,system,iso,LVDbSys1,Exadata,节点,Select From: https://www.cnblogs.com/missyou-shiyh/p/18373760