Start a conversation

Increasing Debian disk partition space

Overview

Kerio Connect can be configured as a Virtual Machine (Linux-based) in the VMware environment. The default disk space setting is 8 GB, which might be not enough to run the system smoothly.

100_free_space.png

The partition size of a Debian virtual appliance can be expanded by adjusting partition size. Due to the risks associated with this operation, consider using a separate partition rather than increasing the size of an existing partition.

 

Prerequisites

SSH (root) access to Kerio Connect:

  1. Access Kerio Connect Virtual console.
    connect_va1.png
  2. Enter the Administrator password. Default is kerio
    connect_va2.png
  3. Navigate to SSH settings and choose SSH enabled.
    connect_va3.pngconnect_va4.png

Process

IMPORTANT: Use with extreme caution. Some of these commands are potentially destructive and may cause damage to the system. Backup the server before attempting the procedure below.

  1. Add a new disk drive to the virtual machine.
    • For example, in the below screenshot, we are adding a 20 GB hard disk drive to a VMware appliance.

      User-added image
  2. Connect to the virtual machine console using the root account.
  3. View the list of mounted disks on the VM and take note of the label of the newly mounted hard drive.
    • In the below screenshot, the newly added hard drive is labeled as sdc.

      User-added image
  4. Create a new partition in LVM (Logical Volume Management) to use this additional space.
    • To do this, run the command fdisk /dev/<drive label> with replacing <drive label> with the label of the newly added drive.
    • For example, in this case, the command is: fdisk /dev/sdc.
    • Note: Users may enter fdisk -L to show more detailed information about drives in the VM.
  5. When prompted for Command (enter m for help) enter n to add a new partition.
  6. When prompted for Select (default p), enter p which means primary.
    • When prompted for Partition Number leave it in the default value of 1, to create the first partition.
    • Leave the First sector and Last sector values as default to create the first and last sectors of the disk.
  7. Change the type of partition by entering t when prompted for Command.
  8. When prompted for Hex Code, enter 8e to select the Linux LVM.
  9. Run w when prompted for Command to write changes.

    debian01.jpg
  10. Use the physical volume creator to initialize the disk for use. Use command pvcreate /dev/<partition name>
    • For example, in this case, the command is: e pvcreate /dev/sdc1

      User-added image
  11. Verify the attributes of the volume group by using the command vgdisplay and taking note of the VG Name value.

    User-added image
  12. Extend the new path to the existing volume group using the command vgextend <volume group name> /dev/<partition name>
    • For example, in this case, the command is: vgextend debian-8-vg /dev/sdc1.

      User-added image
  13. Run the vgdisplay command once again and confirm that the VG size value has expanded by the size of the newly added drive.

    User-added image
  14. Run pvscan to scan all disks for physical volumes.

    User-added image
  15. Extend the size of the logical volume by running the command lvextend -l +100%FREE /dev/<volume group name>/root
    • Which for this example will become: lvextend -l +100%FREE /dev/debian-8-vg/root

      User-added image
  16. Resize the file system by running resize2fs /dev/<volume group name>/root
    • Which for this example will become: resize2fs /dev/debian-8-vg/root.
    • This command is used for operations related to ext2/ext3/ext4 file system resizes.

      User-added image

Confirmation

Run the command df -h and confirm that the primary disk size has increased.

User-added image

Related Article

Using Kerio Connect Virtual Appliance

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments