miércoles, 5 de abril de 2023

Increase part space on FreePBX and Digital Ocean

 yum install cloud-utils-growpart -y

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: epel.mirror.angkasa.id
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package cloud-utils-growpart.noarch 0:0.29-5.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
cloud-utils-growpart noarch 0.29-5.el7 base 27 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 27 k
Installed size: 61 k
Downloading packages:
cloud-utils-growpart-0.29-5.el7.noarch.rpm | 27 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : cloud-utils-growpart-0.29-5.el7.noarch 1/1
Verifying : cloud-utils-growpart-0.29-5.el7.noarch 1/1

Installed:
cloud-utils-growpart.noarch 0:0.29-5.el7

Complete!

NOTE:

Please note that growpart utility is available from EPEL Repository so before installing growpart package you need to make sure EPEL repo is installed and enabled. You can check more about this on How to Install and Enable EPEL Repository on RHEL/CentOS 7/8

Step 4: Install Growpart Command in Linux Using RPM Utility

The second way that you can use is by installing through rpm package. In this case you need to first download the appropriate rpm version of growpart tool and then install it by using rpm -ivh cloud-utils-growpart-0.29-5.el7.noarch.rpm command as shown below.

[root@localhost ~]# rpm -ivh cloud-utils-growpart-0.29-5.el7.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:cloud-utils-growpart-0.29-5.el7 ################################# [100%]

Step 5: Resize root partition Using Growpart Command in Linux

Once it is installed you can now go ahead and resize the root partition. As you can see in below output root partition currently lies on /dev/sda disk so we need to resize the /dev/sda2 partition.

[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 500G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 499G 0 part
├─centos_ymr--hrm--01-root 253:0 0 50G 0 lvm /
├─centos_ymr--hrm--01-swap 253:1 0 15.8G 0 lvm [SWAP]
└─centos_ymr--hrm--01-home 253:2 0 433.2G 0 lvm /home
sdb 8:16 0 1T 0 disk
sr0 11:0 1 1024M 0 rom
growpart /dev/vda 1
    xfs_growfs /dev/vda1
    df -h


https://www.cyberithub.com/install-growpart-command-resize-root-partition-in-linux-rhel-centos-7-8/

https://docs.digitalocean.com/products/droplets/how-to/resize/

No hay comentarios:

Publicar un comentario