> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to resize partition in Linux

1. SSH to your server as root user

2. Run `df -Th | grep "^/dev"` to get the device name & also the filesystem type (ext4,XFS,etc)



![](https://storage.crisp.chat/users/helpdesk/website/30c43b4318b81000/dfpng_1axfc82.png)

3. Grow the partition by running `growpart /dev/sda X` (where X is the device name and with space)

4. Once done, use the following command according to your filesystem type to enlarge the partition

EXT4
`resize2fs /dev/sdaX`

XFS
`xfs_growfs /dev/sdaX`

5. Run `df -h` to determine if the resize is succesful 