Perform the following steps to extend the root partition in the Linux-based Manager:
Before you begin
Take an ALL TABLES database backup of the Linux-based Manager and store it in a remote machine.
Note
The growpart RPM is required to extend the root partition in AWS. Thus, the below steps will not be applicable to Linux-based Manager in AWS. To extend the partition, see Root Partition extention in AWS Public Cloud.
Task
Log in to the Manager shell.
Shutdown the Manager virtual machine by executing shutdown command.
Log in to the ESXi server where the Linux-based Manager virtual machine is hosted.
Select the Linux-based Manager virtual machine and edit the machine setting to extend the disk space.
Note
Make a note of the memory size extended in gigabytes.
Power on the Linux-based Manager virtual machine.
Log in to the Manager shell.
Execute fdisk -l .
Note
Make a note of the output displayed on executing the above command.
Execute fdisk /dev/sda.
he fdisk utility opens.
Type p and press Enter.
Make a note of the end block of sda.
For example: In the below output, the end block is 419239935 .
Device Boot Start End Blocks Id System /dev/sda1 2048 780287 389120 83 Linux /dev/sda2 782336 419239935 209228800 83 LinuxCreate a new partition by executing n.
The console provides options for partition type. Type P to select Primary and press Enter.
Select the partition number and press Enter.
Note
Trellix recommends you to select the default partition number displayed.
Select the first sector for the extended partition and press Enter.
Note
Trellix recommends you to select the first block after the end of the available sda blocks as the first sector for the extended partition. That is, if the end location of the available sda is 419239935, then you must specify the first sector as 419239936 (i.e. 419239935+1).
Select the last sector of the extended partition and press Enter.
Note
Trellix recommends you to select the default location displayed.
Save the changes to the fdisk utility by executing w.
Reboot the Linux-based Manager by executing reboot command.
Log in to the Manager shell.
Execute fdisk -l.
Note
Make a note of the output displayed on executing the above command.
Compare the output of fdisk command in step 7 and step 18. Make a note of the new sda created.
Execute the below command block to extend the root partition:
vgextend fs /dev/<new_sda>Parameter
Description
new_sda
Specify the name of the newly created sda.
Execute the below command block:
lvextend -L+<memory_extended>G /dev/mapper/fs-rootParameter
Description
memory_extended
Mention the memory size extended in gigabytes as specified in step 4. For example, if you have increased the disk space of the Linux-based Manager virtual machine by 50 GB, the memory_extented value should be entered as 50.
Execute df -h and make a note of /dev/mapper/fs-root filesystem size.
Execute the below command block to resize the /dev/mapper/fs-root filesystem size.
resize2fs /dev/mapper/fs-rootExecute df -h and verify that the /dev/mapper/fs-root filesystem size is extended.