How to Extend Disk Space to Linux Without Rebooting Step by Step

As applications grow, disk space can become insufficient, necessitating the need to expand virtual disks. Is there any way to expand virtual disk space without restarting the VM?

Crystal

By Crystal / Updated on October 21, 2024

Share this: instagram reddit

Why You Need to Expand Disk Without Rebooting

Extending a disk is often necessary due to increased data storage needs. You may encounter warnings about low disk space or experience performance issues. By extending the disk, you can:

  • Accommodate new applications or services.
  • Improve system performance.
  • Prevent data loss from insufficient disk space.

💥Tips: You should always back up this virtual machine before proceeding.

Expand Disk Linux VMware

How to Extend Disk Size to Linux Without Rebooting on VMware

As your applications and data grow, you may find that your virtual machine (VM) is running out of disk space. Fortunately, you can extend the disk size without rebooting it. This section will walk you through the step-by-step process to achieve this.

Step 1: Increase the Disk Size in VMware

1. Start your VMware application and locate the VM you wish to modify.

2. Right-click on the VM and select "Settings".

3. In the hardware settings, choose the virtual hard disk you want to resize. Select Expand and enter the desired size. Ensure this is greater than the current disk allocation.

VMware Extend Disk Linux Without Reboot

Disk Size

4. Click "Expand" to save and exit the settings.

Step 2: Rescan the SCSI Bus

After increasing the disk size in VMware, the next step is to rescan the SCSI bus, allowing the operating system to recognize the changes.

1. Access the terminal in your Linux VM and run the following command to rescan the SCSI bus:

echo 1 > /sys/class/scsi_device/DEVICE_ID/device/rescan

2. Replace DEVICE_ID with the identifier of your disk (e.g., 0:0:0:0). You can find this using:

ls /dev/sd*

Step 3: Extend the Partition

Now that the SCSI bus is rescanned, you need to extend the partition that corresponds to the resized disk.

1. Use the command to list partitions:

lsblk

Identify the partition you want to extend (e.g., /dev/sda1).

2. Use parted or fdisk: For this example, we’ll use parted:

sudo parted /dev/sda

3. Inside parted, run:

resizepart PARTITION_NUMBER END

Step 4: Resize the Filesystem

After extending the partition, you need to resize the filesystem to take advantage of the new space.

1. For ext4 Filesystem, use the following command:

sudo resize2fs /dev/sda1

2. For XFS Filesystem:

sudo xfs_growfs /dev/sda1

However, it’s essential to ensure that your data is protected during this process.

✍Tips: If you have not enough disk space in Hyper-V virtual machine, you can expand Hyper-V disk by using Hyper-V Manager and PowerShell.

Free but Powerful VMware Backup Software

AOMEI Cyber Backup provides robust solutions for safeguarding your data by enabling reliable backups of your virtual machines. With features like automated backup schedules, incremental backups, and easy restoration options, AOMEI Cyber Backup allows you to focus on managing your VM’s storage needs while ensuring peace of mind. In the event of a failure, you can quickly restore your system without losing critical data.

Automated Backup Scheduling:
Set up VMware backup schedules to ensure your VMs are consistently protected without manual intervention.
💥Quick Recovery:
Restore entire VMware VMs quickly without re-creating and configurating a new VM, greatly reduce business downtime and possible financial loss.
Intuitive User Interface:
A user-friendly interface simplifies the centralized backup and restoration process, making it accessible even for those with limited technical expertise.
🎊Multi-Platform Support:
In addition to VMware, AOMEI Cyber Backup supports other virtual environments, providing a versatile backup solution for diverse infrastructures.

Free download and install this VMware backup and recovery software to protect your data in just a few clicks.

Download FreewareVMware ESXi & Hyper-V
Secure Download

Stepwise Guide to Backup VMware VMs for Free

Step 1. Bind VMware Host: Enter the IP address, username, and password for your ESXi host. Click Confirm.

Add VMware ESXi Host

Step 2. Create VMware Backup: Select VMware ESXi Backup and enter a special name for this task, then configure the VMware ESXi backup as the following:

VMware ESXi Backup

✔Specify where you want to store the backup files (local storage, network drive, etc.).

✔Enable Archive option to store VMware backups to Amazon S3.

✔If desired, set up a backup schedule to automate backups. For example, choose between full, incremental, or differential backup based on your needs and specify a time to run it as daily, weekly or monthly.

3. Click Start Backup to initiate the backup process. AOMEI Cyber Backup will begin backing up your selected VM.

Start VMware ESXi Backup for Free

Conclusion

Extending the disk size of a Linux VM in VMware without rebooting is a simple yet effective way to ensure your applications continue to run smoothly without interruption. By following the steps outlined in this guide, you can easily manage your VM’s storage needs.

Crystal
Crystal · Editor
Crystal is an editor from AOMEI Technology. She mainly writes articles about virtual machine. She is a positive young lady likes to share articles with peolpe. Off work she loves travelling and cooking which is wonderful for life.