Linux extend file system after resize disk volume

Linux extend file system after resize disk volume

To extend a file system after resizing the disk volume in Linux, you can use the following steps:

  1. Check the disk volume size: Use the "fdisk" command to check the size of the disk volume. For example:
re‮al:ot ref‬utturi.com
fdisk -l /dev/sda

This will display the partition table for the disk "/dev/sda", including the size of each partition.

  1. Resize the partition: Use the "fdisk" command to resize the partition to use the additional space on the disk. For example:
fdisk /dev/sda

This will open the "fdisk" utility and allow you to modify the partition table for the disk. Follow the prompts to delete the existing partition and create a new one using the additional space on the disk.

  1. Check the file system type: Use the "lsblk" command to check the file system type of the partition. For example:
lsblk -f /dev/sda1

This will display the file system type for the partition "/dev/sda1".

  1. Resize the file system: Use the appropriate command to resize the file system to use the additional space on the partition. The specific command to use will depend on the file system type. For example:
  • For an ext2/ext3/ext4 file system, you can use the "resize2fs" command:
resize2fs /dev/sda1
  • For a XFS file system, you can use the "xfs_growfs" command:
xfs_growfs /dev/sda1

This will resize the file system to use the additional space on the partition.

Note: The steps above are just a few examples of how you can extend a file system after resizing the disk volume in Linux. The specific steps you need to take may vary depending on your system and the configuration of the disk and file system.

Created Time:2017-10-29 22:09:02  Author:lautturi