# Installation do not use whole of disk

**URL:** <https://forums.rockylinux.org/t/installation-do-not-use-whole-of-disk/16732>\
**Category:** Rocky Linux Help & Support\
**Created:** [December 4, 2024, 10:52am UTC](https://forums.rockylinux.org/t/installation-do-not-use-whole-of-disk/16732 "2024-12-04T10:52:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hs303](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@hs303](https://forums.rockylinux.org/u/hs303)\
**Post date:** [December 4, 2024, 4:54pm UTC](https://forums.rockylinux.org/t/installation-do-not-use-whole-of-disk/16732/2 "2024-12-04T16:54:07Z")

</div>

Basically you can expand it with those three commands (adjust the size with the `-L` argument):

1. `growpart /dev/sda 3`
2. `lvextend -L +60G /dev/mapper/rl-root`
3. `xfs_growfs /`

You can check out this topic for more info and context:

> [@Azure vm image disk size issues](https://forums.rockylinux.org/t/azure-vm-image-disk-size-issues/15803):
>
> Using the latest rockylinux-x86\_64 9-lvm image from the Azure marketplace spun up a vm with the OS disk size at 8.9 GB. It seems most of the space is residing on another disk though the Azure vm only has one 128 GB disk. How can I extend the /dev/rocky/root logical volume to use this space in the root mountpoint? Here’s what I’m looking at: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 128G 0 disk ├─sda1 8:1 0 99M 0 part /boot/efi ├─sda2 …

Expanding the disk always comes with little risk, so the best practice is to make a backup before expanding.  
You can also consider expanding the root by only the amount you need for it. `LVM` gives you the possibility to create more partitions and expand every partion independently. `xfs` cannot be shrunk, so if you take all the space for `/` now, you won’t be able to create another partition at some point in the future.

---

_[View the full topic](https://forums.rockylinux.org/t/installation-do-not-use-whole-of-disk/16732)._
