Cloud Photo

Azure Data Architect | DBA

UPDATE: Azure VMs and CouchDB

After experimenting with the limits of Azure VMs and CouchDB based on my articles, I determined that the best practice should be to create disks to attach to the VM. The CouchDB data files should be stored on the
attached disks. A terabyte of storage costs just over $50/month. (

Attaching a new storage disk can be done in the Azure portal by navigating to the All Settings link for a VM, clicking on the Disks entry and selecting Attach New in the Disks blade. Once the new disk is attached
as a device, the following link contains directions on mounting the new storage device:

The commands are essentially as follows:
sudo fdisk -l
sudo grep SCSI /var/log/messages
sudo fdisk /dev/sdc
sudo mkfs -t ext4 /dev/sdc1
sudo mkdir /data
sudo mount /dev/sdc1 /data
sudo -i blkid
sudo nano -w /etc/fstab
sudo umount /data
sudo mount /data

After the new disk is mounted, the CouchDB files can be moved from the default storage location of /var/lib/couchdb to the new disk. Run chown and chmod on the new directories and files to ensure they are owned by the user couchdb in the couchdb group and have 755 permissions. CouchDB should be stopped for this procedure and restarted once the datafiles are moved.

Next update the /etc/couchdb/local.ini to include the new database_directory location. See the documentation at the following link for details:


Leave a Reply