Applies to VoipNow 3 and higher!
This article describes how to use a different partition from the one where VoipNow is installed to store your voicemails and call recordings.
How to partition a new hard disk
After adding a new hard disk to the server, you will have to partition it accordingly. In order to do so, you need to run:
This command should list all existing hard disks and partitions. If you already have a
/dev/sda (common for SATA devices), then whenever you add another device, it should be displayed as
STEP 1: If the device is present, you need to partition it using:
Command (m for help): n Command action e extended p primary partition (1-4) e Partition number (1-4): 1 First cylinder (1-2654, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-2654, default 2654): Using default value 2654 Command (m for help): w (Write and save partition table) The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
STEP 2: Then you need to format the partition as ext4 using the following command:
STEP 3: Create a directory for the new partition and mount it:
Check the How to Copy the Old Files to the New Location section in case you want to copy old recordings/voicemails to the new hard disk.
STEP 4: Bind the Recordings directories to a new directory by using the following command lines:
Now, all new voicemails and recordings will be written into the new directory called
To verify if the bind was done correctly, run
mount and check if
/var/spool/asterisk/voicemail are present.
To unmount the directories, run:
STEP 5: Make sure the new directories will be owned by Asterisk and their permissions are set to 750. For example:
How to make changes persistent after reboot
Add the following lines into
/dev/sdb1 /newdrive ext4 defaults 1 2 /newdrive/monitor /var/spool/asterisk//monitor bind defaults,bind 0 0 /newdrive/voicemail /var/spool/asterisk/voicemail bind defaults,bind 0 0
How to copy the old files to the new location
To copy old files to the new location, run:
This must be done before mounting the folders from newdrive to /var/spool/asterisk
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.