Adding a new disk to the virtual appliance

 

Please run a backup first. Some of these commands are potentially destructive and may cause damage to your system if not carried out correctly.

To increase available disk space for the message store, you can add a second virtual hard disk to the appliance.

  1. Using your VM Hypervisor, add a new hard drive to your VM and start the appliance.

  2. Log in to the system console.

  3. To check whether Debian installed and picked up your new hard drive, run the following command:

    fdisk -l

    The disk at /dev/sdb is picked up and there are no partitions.

  4. Create a new partition on your new drive:

    cfdisk /dev/sdb

    The cfdisk controller will load up and here you can create a new partition on your drive. From the menus at the bottom select the following:

    1. New → Primary → Size in MB.

    2. Select Write.

    3. Select Quit.

    Your new partition is created at /dev/sdb1.

  5. Format the new disk:

    mkfs.ext3 /dev/sdb1

    This commands formats the partition with the ext3 filesystem which should work fine for your Debian system.

  6. Mount the drive:

    mkdir /store (to create a directory for the drive)

    mount -t ext3 /dev/sdb1 /store (to mount the drive to this directory)

    Check the drive is mounted — ls -lsa /store.

Everything is now up and running. However, you must add the new drive to /etc/fstab so that it is mounted automatically when the server reboots.

  1. Open the fstab file:

    vi /etc/fstab

  2. Add the following line to the end of the file:

    /dev/sdb1 /store ext3 defaults,errors=remount-ro 0 1

  3. Save the file.

Moving the existing message store to a new disk

  1. Stop the Kerio Connect server:

    /etc/init.d/kerio-connect stop

  2. Copy all data from the old message store:

    cp -R -p /opt/kerio/mailserver/store/* /store

  3. Change the message store directory path in the Kerio Connect configuration:

    sed -i -e "s/\/opt\/kerio\/mailserver\/store/\/store/" /opt/kerio/mailserver/mailserver.cfg

  4. Start Kerio Connect:

    /etc/init.d/kerio-connect start