Knowledge Base Home

Call Support


Search the Knowledge Base

Skip to end of metadata
Go to start of metadata

Environment

Netmail 6.x and greater Index Servers

Synopsis

After the initial deployment of a Netmail system, overtime the Index DB(s) may begin to fill up. How can free space be added without have to move the data?

Well, since the index DBs are hosted on in CENTOS on a logical volume which allows volume expansion without having to "move" or "restore" Index DB data, the Index DB volumes can be grown fairly easily.

Note: The /var mount point where the Index DBs are held is part of the logical volume lv002 which in turn is part of volume group vg1.  New partitions can be added into lv002 by expanding the existing volume.  The steps are outlined below.

Solution

The following instructions are based off the following conditions

  • Only the default partitions exist "dev/sda1" and "dev/sda2"

  • Volume group holding the "/var" mount point is called "vg1".

  • LVM holding the "/var" mount point is called "lv002"

Check the existing disk usage:

  • Connect to the server using PuTTY and login as the "netmail" account. In the console enter the command "sudo su".
  • Enter the command "fdisk -l" to report the current size disk i.e. "/dev/sda" and existing disk partition information
  • Enter the df -h to show the existing disk allocation and usage on each of the mount points

Expand the virtual machine disk:

  • In the VMWare vCenter client, right click the Index VM, then click "Edit Settings".
  • Select the HDD, then modify the "Provisioned Size" value to increase disk space as desired, then click OK.
  • Reboot the Index server so the additional space is visible to the Operating System
  • Connect to the server using PuTTY and login as the "netmail" account. In the console enter the command "sudo su".
  • Enter the command "fdisk -l" then press enter. The size of the disk sda should have increased by the space added

Create new partition

  • Enter "service netmail stop" to stop the Netmail Service
  • Enter the command "parted" and then press "p" to show the list of existing partitions
  • Record the ending GB value of the last partition. Note: The default partition number has a value of 2.
  • If the ending value of the last partition is 215GB then enter "mkpart ext4 215 100%" to create a partition starting at 215GB and continuing with the remaining space of the drive
  • Once the partition is created then enter "p" to show the new list of partitions including the newly created partition
  • Enter "q" to exit the parted utility

Initialize the new partition

Enter "pvcreate /dev/sda3".  This will initialize the partition so it is formated and ready to be added to a logical volume.

Extend the volume group to include the new partition

Enter "vgextend vg1 /dev/sda3" 

Extend the volume with the new parition

Enter "lvextend /dev/mapper/vg1-lv002 /dev/sda3"

Resize the volume to reflect the newly added space

Enter "resize2fs /dev/mapper/vg1-lv002"

Start the Netmail Service

Enter "service netmail start"

Restart all netmail services with depandancies on the Netmail Index Service

Notes


Help us improve!
Is this article helpful?
Is it well written?
Is the content complete?

  • No labels