How to Expand the MySQL Partition Size from the Console

Use these instructions to expand size of the partition used for MySQL database operations. using the vCenter Client.
  1. View the amount of free disk space available.
    [root@localhost cpn_service]# df -h
  2. Signal to the OS that there has been a hardware change to the disk.
    [root@localhost cpn_service]# echo ‘1’ > /sys/class/scsi_disk/2\:0\:1\:0/device/ rescan
  3. Expand the physical volume.
    [root@localhost cpn_service]# pvresize /dev/sdb -v
  4. Extend the size of the logical volume for MySQL operations.
    This example shows that we are extending the size of the logical volume by adding 25GB.
    [root@localhost cpn_service]# lvextend -L +25G /dev/mapper/application_vg-mysql
  5. Resize the file system.
    This example resizes the file system, writes your changes to disk, and completes the partition expansion process.
    [root@localhost cpn_service]# resize2fs /dev/mapper/application_vg-mysql
  6. Verify the amount of free disk space available.
    [root@localhost cpn_service]# df -h
    The output should indicate the increased partition size.