Exadata计算节点,如何收缩(/)根文件系统的空间
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.isofile 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.isofile on the local machine in the File Open dialog box.
- 
Select the diagnostics.isofile.
- 
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.isoimage is used. The system reverts to the default after the next restart.
- 
Log in as the rootuser in the ILOM Remote Console window.
- 
Restart the server using the following command: # shutdown -r -y now The system starts using the diagnostics.isoimage.
 
- 
- 
Enter eto 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 rootuser. You will be prompted for the password.localhost login: root Password: ********* -sh-3.1# 
- 
Copy the /mnt/cell/sbin/resize2fsfile to the/sbindirectory using the following command:# cp /mnt/cell/sbin/resize2fs /sbin 
- 
Unmount the rootfile 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。
 
                    
                 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号