I. background
As the business continues to mature, more and more data is accumulated in the database. A few days ago, I found that the server's disk was about to be full. Therefore, apply to the virtualization administrator to increase disk space.
Because the system is built on the vSphere platform of VUI, the virtualization administrator simply expands the disk space through the VMware vSphere Client, and the remaining work is mine.
II. Environment
The system environment is RHEL6.3. To ensure scalability, LVM is used for the root directory/at the initial stage of implementation. In addition, in order to minimize the unavailable time, the system is always running when the virtual hard disk space is expanded.
Iii. Process
After the virtualization administrator expanded the disk, I found that the system did not immediately identify the disk size change. I have executed partprobe several times and it does not work. Therefore, the server is restarted first.
After the restart is completed, fdisk-l is used to identify the disk as a new capacity.
At this point, adjust the disk according to the LVM method.
Because the new hard disk is recognized as unpartitioned space in the system, fdisk is used to partition the disk first.
Fdisk/dev/sda
The prompt is "n" (create a new partition), select the partition type and serial number, enter the start position and size.
Then, press w to exit and save the changes to the partition. At this time, the system cannot identify the newly added partition. To execute
Partx-a/dev/sda
Make the partition take effect. If an error is reported, it is recommended that you restart the system.
Create a new partition as a physical volume (PV)
1 pvcreate/dev/sda5
Then add the physical volume to the volume group (VG ).
Vgextend vg_rhel/dev/sda5
In this case, you can use vgdisplay to view the status of the volume group.
Now we can adjust the logical volume size
Lvextend-L + 20G/dev/vg_rhel/lv_root
After that, the file system cannot identify the new size. You need to adjust the file size.
Resize2fs/dev/vg_rhel/lv_root
Since the Oracle database is used online, after completing the above steps, you need to start Oracle
Sqlplus/as sysdba
Execute startup at the Oracle prompt
After the prompt is successful, exit sqlplus and start the listening service
Lsnrctl start
The entire process ends.
Recommended reading:
Install VMtools in openfilter Linux
Install VMware Workstation 9.0 Virtual Machine in Windows 7
Download the official version of VMware Workstation 9.0 (with the registration machine + Serial Number activation code ):