I want to create a mongodb replicaset. I am using the following template to deploy a mongodb replicaset.
The above template used 4 data disks for every MongoDB instance. But I want only one data disk for every MongoDB instance.
Is there a way to get it?
Update 1:
I have removed the 3 data disks from dataDisks from primary-resources.json and looks like the following after removal of datadisks.
"storageProfile": {
"imageReference": "[parameters('osSettings').imageReference]",
"dataDisks": [
{
"name": "datadisk1",
"diskSizeGB": "[parameters('sizeOfDataDiskInGB')]",
"lun": 0,
"vhd": {
"uri": "[concat('http://', variables('storageAccountName'),'.blob.core.windows.net/vhds/', 'datadisk1.vhd')]"
},
"createOption": "Empty",
"caching": "ReadWrite"
}
],
"osDisk": {
"name": "osdisk",
"vhd": {
"uri": "[concat('http://', variables('storageAccountName'),'.blob.core.windows.net/vhds/', parameters('vmbasename'), '-osdisk.vhd')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"
}
}
But I don't see /var/lib/mongo is mounted in the file system after running the replica set template.
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 30G 1.8G 27G 7% /
devtmpfs 3.4G 0 3.4G 0% /dev
tmpfs 3.5G 0 3.5G 0% /dev/shm
tmpfs 3.5G 17M 3.4G 1% /run
tmpfs 3.5G 0 3.5G 0% /sys/fs/cgroup
/dev/sdb1 281G 65M 267G 1% /mnt/resource
When I use the single data disk as above, vm-disk-utils-0.1.sh scripts throws the following error.
+ mdadm --create /dev/md0 --level 0 -c 64 --raid-devices 1 /dev/sdc1
mdadm: '1' is an unusual number of drives for an array, so it is probably
a mistake. If you really mean it you will need to specify --force before
setting the number of drives.
Clarification:- I see this mongodb-replica-set-centos deploy Cent OS machine. But vm-disk-utils-0.1.sh uses the Ubuntu commands to install. How it affects the deployment?