File System Extension
RHEL and Ubuntu
Expand the Disk Partition and Filesystem
1. SSH into the VM
2. Unmount the Disk (if necessary)
3. Use parted to Resize the Partition
- Launch
parted - View the current partition layout:
- The output should look as belows:
4. Resize the Partition
- Enter the partition number (e.g.,
1) and the new end size (e.g.,215GB)
5. Exit parted
6. Check Partition Consistency
7. Resize the Filesystem
8. Mount the Partition
9. Verify the Resize
- Look for
/dev/sdc1to confirm its new size.
Extend an LV When VG Has Available Space
To extend a logical volume (LV), follow these steps:
1. Check the Current Filesystem Size
2. Check Available VG Space
3. Identify the LV
4. Check Current LV Size
5. Extend the LV Size
- Use
-rto resize the filesystem online
6. Verify the New Sizes
and
Extend a Traditional LVM Volume by Adding a New PV
To increase VG size by adding a new physical volume (PV):
1. Check Current Filesystem Size:
2. Verify Current PV Configuration
3. Check VG Information
4. Identify Data Disks
5. Attach New Disk and Confirm
- Follow instructions to attach the new disk
6. Create New PV
7. Add New PV to VG
8. Check New VG Size
9. Extend the LV Size
10. Verify the New Sizes
Extend a Traditional LVM Volume by Resizing an Existing PV
If you need to resize an existing disk 1. Identify Encrypted Disks
2. Check PV and VG Information
3. List Disk Sizes
for disk in `ls -l /dev/disk/azure/scsi1/* | awk -F/ '{print $NF}'` ; do echo "fdisk -l /dev/${disk} | grep ^Disk "; done | bash
4. Check File System Utilization
5. Resize Data Disks
- Follow instructions to expand the Azure managed disk.
- Important: Deallocate the VM before resizing.
6. Restart VM and Check Sizes
or disk in `ls -l /dev/disk/azure/scsi1/* | awk -F/ '{print $NF}'` ; do echo "fdisk -l /dev/${disk} | grep ^Disk "; done | bash
7. Check Current PV Size
8. Resize the PV
9. Verify PV Size
10. Check VG Information
11. Resize the LV
12. Check File System Size
AIX
1. Identify the Filesystem: Determine the name of the filesystem associated with the directory in question.
Note
If the filesystem is as /dev/dbirptd03lv, then consider only dbirptd03lv
2. Locate the Volume Group (VG): Find out which Volume Group (VG) the filesystem is part of.
Note
Volume group would be shown in this output
3. Check VG Free Space: Verify the amount of free space available in the VG.
Note
Check the FREE PPs: That should show the free size available on the volume group
4. Extend the Filesystem: Use the chfs command to increase the size of the filesystem.
5. Confirm the Extension: Ensure that the filesystem has been successfully extended.