Overview
Kerio Connect Virtual Appliance is using 8 GB of storage as a default disk space option. The existing storage can be expanded following the procedure below.
Process
Adding a New Disk to the Virtual Appliance
Note: Before you begin, run a backup first. Some of these commands are potentially destructive and may cause damage to your system if not carried out correctly.
-
Using your VM Hypervisor, add a new hard drive to your VM, and start the appliance.
-
Log in to the system console.
-
To check whether Debian installed and picked up your new hard drive, run the following command:
fdisk -l
-
Confirmation: The disk
/dev/sdb
is picked up, and there are no partitions.
Creating a New Partition on your New Drive
- Log in to the system console.
-
Run the following command:
cfdisk /dev/sdb
Note: 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:
-
New > Primary > Size in MB.
-
Select Write.
-
Select Quit. Your new partition is created at
/dev/sdb1
.
-
-
Format the new disk:
mkfs.ext3 /dev/sdb1
Note: This command formats the partition with the ext3 file system, which should work fine for your Debian system.
Mounting the Drive
- Log in to the system console.
-
Mount the drive to create a directory for the drive:
mkdir /store
-
Use the following command to mount the drive to a specific directory:
mount -t ext3 /dev/sdb1 /store
-
Use the following command to check if 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:
-
Open the fstab file:
vi /etc/fstab.
-
Add the following line to the end of the file:
/dev/sdb1 /store ext3 defaults,errors=remount-ro 0 1
-
Save the file.
Move the Existing Message Store to a New Disk
- Log in to the system console.
-
Stop the Kerio Connect server:
/etc/init.d/kerio-connect stop
-
Copy all data from the old message store:
cp -R -p /opt/kerio/mailserver/store/* /store
-
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
-
Start Kerio Connect:
/etc/init.d/kerio-connect start
Set Log Rotation
Due to the limited disk size in the virtual appliance, set log rotation for log files by size with a limited number of files.