The lack of free space problem may eventually occur while using the BitrixVA virtual machine or ami-image BitrixVA. The most appropriate solution to this problem is adding additional disk and moving some content to it.
Because disk space is primarily occupied by site content and site backups located in /home/bitrix and also by the database located in /var/lib/mysql, these particular sections should be moved to separate disks.
Let us consider this task by moving the folder /home with site content and backups to a separate disk.
To this effect, we add a new disk of a required size in the list of equipment in the settings of the virtual machine. All actions specified below must be performed under the root administrator’s account:
Once the disk is added, the server may need to be reloaded for disk initialization. The new disk and the letter assigned to it may be seen by running the following command:
Next, we create the primary partition on the new disk and allocate all free space of the disk to it by using the command:
Once the partition table is saved, we format a new partition and move data from /home to it:
mount /dev/sdb1 /mnt
service httpd stop
service nginx stop
mv -f /home/* /mnt
Next, we determine UUID of the new disk and add an entry about it in /etc/fstab. Instead of UUID the name of the device /dev/sdb may also be used: