On This Page
Increasing Partition Size
Overview
This procedure describes how to increase the size of /tmp, /opt and /var partitions on virtual machines after adding a new disk.
Partitions /tmp and /opt
-
Log into the TOS CLI as user with root privileges.
-
Perform a TOS Backup.
-
Run the following command to show the amount of space used by each partition.
# df -h
-
If not already done, add the new virtual disk to the virtual machine.
-
Stop all TOS services.
-
Run the command:
This process may take time.
- Check that all processes have been stopped successfully. Run the command:
-
Wait until all the pods, with the exception of the service controller, ps-proxy, and reportpack pods, have disappeared from the list or reached a status of Completed. The service controller, ps-proxy, and reportpack pods which can continue running.
All TOS processes are now stopped on all the data nodes in the cluster.
A list of all pods is displayed.
Example
-
-
Once all the pods have been terminated, verify the new disk is recognized by the operating system. If the new disk does not appear, you may need to reboot your system.
# ls -l /dev/sd*
-
Add the new disk to the LVM volume group.
# pvcreate /dev/sdb
# vgextend VolGroup01 /dev/sdb -
Locate the /tmp partition logical volume (see image above).
# df -h
Example Output:
-
Extend the LVM logical volume of the /tmp partition.
# lvextend -r -L +<additon>GB <vol>
where:
-
<addition> is the number of GB to add to the existing partition size
-
<tmpvol> is the logical volume name for /tmpvol e.g /dev/mapper/VolGroup01-LogVol06
-
-
Verify that the storage space was added to the /tmp partition.
# df -h | grep "[\t ]\+/tmp"
-
Locate the /opt partition logical volume (see image above).
# df -h
In this example the logical volume of /opt is /dev/mapper/VolGroup01-LogVol08
-
Extend the LVM logical volume of the /opt partition to use all remaining disk space
# lvextend -r -l +100%Free <optvol>
where:
-
<optvol> is the logical volume name for /opt e.g is /dev/mapper/VolGroup01-LogVol08
-
-
Check the new total storage space in the /opt partition.
# df -h | grep "[\t ]\+/opt"
-
Press
CTRL+C
to cancel the previous commands. -
Restart the TOS services.
[primary data node]# sudo tos start
These instructions are for sdb.
Partition /var
-
Add a new virtual disk with the desired size to the virtual machine.
-
Log into the TOS CLI as user with root privileges.
-
Perform a TOS Backup.
-
Stop all TOS services.
-
Run the command:
This process may take time.
- Check that all processes have been stopped successfully. Run the command:
-
Wait until all the pods, with the exception of the service controller, ps-proxy, and reportpack pods, have disappeared from the list or reached a status of Completed. The service controller, ps-proxy, and reportpack pods which can continue running.
All TOS processes are now stopped on all the data nodes in the cluster.
A list of all pods is displayed.
Example
-
-
Verify the new disk is recognized by the operating system.
# ls -l /dev/sd*
-
Add the new disk to the LVM volume group.
# pvcreate /dev/sdb
# vgextend VolGroup01 /dev/sdb -
Locate the /var partition logical volume.
# df -h
Example output:
In this example the logical volume of /var is /dev/mapper/VolGroup01-LogVol02
-
Extend the LVM logical volume of the /var partition by all the remaining free space on the disk.
# lvextend -r -l +100%FREE /dev/mapper/VolGroup01-LogVol02
-
Check the new total storage space in the /var partition.
# df -h | grep "/var[\t ]*$"
-
Restart the TOS services.
[primary data node]# sudo tos start
These instructions are for sdb.
Was this helpful?
Thank you!
We’d love your feedback
We really appreciate your feedback
Send this page to a colleague