Symptoms
After expanding your disk, the df command and WHM do not reflect the added disk space.
Description
Warning: If managed incorrectly, partitioning a disk may result in data loss or system instability. Always ensure you have a full backup before proceeding. If you're unsure about any step, consult a qualified system administrator.
You can use tune2fs and resize2fs to check for reserved space and expand the file system after increasing the partition size.
Workaround
Please note, you will need to verify the partition is not in use before making any changes, and is not a primary system partition. If it is, you may need to take additional steps not covered by this guide.
- If the partition is currently mounted, unmount it first. Ensure it is not actively in use and is not a primary system partition. Run the following, where sdX is your partition.
umount /dev/sdX
- Use
e2fsckto verify the integrity of the unmounted file system.e2fsck /dev/sda
Example output:
e2fsck 1.41.12 (06-Aug-2020) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information ext4-1: 11/131072 files (0.0% non-contiguous), 27050/524128 blocks - Run
resize2fsto expand the file system to use the newly available space. Again, replace sdX with the actual partition.resize2fs /dev/sdX
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/sda to 524128 (1k) blocks.
The filesystem on /dev/sda is now 524128 blocks long. -
Once resized, remount the partition:
mount /dev/sdX /home
Comments
0 comments
Article is closed for comments.