Perform the following steps to extend the root partition in the Linux-based Manager:
Prerequisite:
Take an ALL TABLES database backup of the Linux-based Manager and store it in a remote machine.
Steps:
Log in to the Manager shell.
Shutdown the Manager virtual machine by executing
shutdowncommand.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.The fdisk utility opens.
Type
pand pressEnter.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 Linux
Create a new partition by executing
n.The console provides options for partition type. Type
Pto selectPrimaryand pressEnter.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
rebootcommand.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_sdaSpecify the name of the newly created sda.
Execute the below command block:
lvextend -L+<memory_extended>G /dev/mapper/fs-root
Parameter
Description
memory_extendedMention 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_extentedvalue should be entered as 50.Execute
df -hand make a note of/dev/mapper/fs-rootfilesystem size.Execute the below command block to resize the
/dev/mapper/fs-rootfilesystem size.resize2fs /dev/mapper/fs-root
Execute
df -hand verify that the/dev/mapper/fs-rootfilesystem size is extended.