Step-by-Step Guide to Resize Disk Partition in Ubuntu without LVM
In this Blog post, you’ll train Using without LVM Resize a Disk Partition in Ubuntu. Following steps, you’ll very helpful. Resizing a disk partition in Ubuntu without using LVM. (Logical Volume Management) can be a straightforward process, but it requires careful steps to ensure data integrity. In this guide, we walk you through the process of resizing disk partitions using built-in tools like GParted
and command-line utilities. Whether you’re looking to expand or shrink your partitions, this tutorial covers everything you need to know, from preparing your system to executing the changes. Perfect for Ubuntu users who prefer not to use LVM, this guide ensures a smooth and safe resizing experience.
1.Backup Your Data
- Important: Always backup your data before performing disk operations.
2.Use fdisk
- Using fdisk (command-line):
1.Open a terminal in the live environment.
2.List your partitions using:
sudo fdisk -l
3.Start fdisk on your disk (e.g., /dev/sda):
sudo fdisk /dev/sda
4.Check the existing partitions:
Press P,
5.Delete the existing partition:
Press d, Select the partition number that you want to resize.
6.Recreate the partition with the new size:
- To create a new partition, use the n key.
- Select the same partition number.
- Choose the starting sector as the same as the original partition (usually suggested by default).
- Set the new size by specifying the last sector (or simply press enter to use the remaining space).
7.Write changes and exit:
To write the modifications to the disk, press w.
3.Check Filesytem
Using the mount Command
The mount command without any options will list all mounted filesystems and their types.
mount | grep “^/dev”
Example Output
Here’s what you might see:
For ext4 Filesystem:
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /home type ext4 (rw,relatime,data=ordered)
For XFS Filesystem:
/dev/sda1 on / type xfs (rw,relatime,attr2,inode64,noquota)
/dev/sdb1 on /home type xfs (rw,relatime,attr2,inode64,noquota)
4.Resize the Filesystem
• After resizing the partition, you need to resize the filesystem to fill the new partition size.
• For ext4 Filesystem:
sudo resize2fs /dev/sda1
Replace /dev/sda1 with the appropriate partition name.
• For XFS Filesystem:
sudo xfs_growfs /dev/sda1
(Note: XFS requires the partition to be mounted during resizing.)
5.Reboot Your System
• If you were working from a live environment, reboot your system back into the installed OS:
sudo reboot
6.Verify the Changes
• After rebooting, verify the new size of the filesystem:
df -h
Read Related Tutorials; How to Install aaPanel On Ubuntu
-Written By Vishwanath