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.
-
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
The disk at /dev/sdb is picked up and there are no partitions.
-
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:
-
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
This commands formats the partition with the ext3 filesystem which should work fine for your Debian system.
-
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.
-
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.
Moving the existing message store to a new disk
-
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