How do I increase the disk space on VMware's guest OS?

Asked 2 years ago, Updated 2 years ago, 450 views

How do I increase the disk space of /dev/sda3 in CentOS 7?

●Background
In a CentOS 7+ Oracle 19c environment, the Oracle create database statement fails with an error such as ora-00200, which determines that there is not enough disk space.

The df command results are as follows:

[root@localhost~]#df-m
File System 1M - Block Enabled % Mount Location
devtmpfs1399013990%/dev
tmpfs1414014140%/dev/shm
tmpfs14141114041%/run
tmpfs14140 14140%/sys/fs/cgroup
/dev/sda3 18121 17889 23399% /
/dev/sda1297 163 13455% /boot
tmpfs283 1283 1%/run/user/42
tmpfs2830 2830%/run/user/0

I believe that the create database command failed because there is no space in /dev/sda3.

addition:
This is the df result of allocating 20GB of disk space to Cent OS on VMware Player for more than 150GB of free disk space on the host machine.

The disk space on the VM has since increased to 20GB → 40GB.
I would like /dev/sda3 to expand to around 10GB to 20GB.

I tried to execute the command you mentioned in the comment section.

[root@localhost~]#cat/proc/swaps
Filename Type Size Used Priority
/dev/sda2partition20971480-2

[root@localhost~] #cat/proc/partitions
major minor#blocks name

   80 41943040 sda
   81 307200 sda1
   82 2097152 sda2
   83 18566144 sda3
  110 1048575 sr0

centos filesystems vmware

2022-09-30 21:59

2 Answers

Disk expansion in a virtual environment is relatively simple.

/dev/sda The total disk space seems to be already 40GB, so you can resize the /dev/sda3 partition using the unallocated space.

There are several ways, but I recommend using GParted because it is easy to understand.

Installation/Startup Method:

Installing the gparted Package

$sudo yum install gparted

Launch GParted

$sudogparted

Examples of operations:

パーティIt is recommended that you get a backup if necessary before partitioning.

reference:
How to use "GParted"


2022-09-30 21:59

If you are using it with VMware,
How did I install CentOS 7?

Prepare yourself by downloading the CentOS 7 ISO image (if any) or another distribution of Live Disk ISO image or GParted Live

You can edit the current virtual disk space by temporarily booting from that ISO image file with priority.
(If you can specify the boot from the CD/DVD image, is that where you can specify it?)

Also, if necessary, it would be good to expand the partition and move the partition in GParted


2022-09-30 21:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.