Views: 417 (Data available since 06.02.2017)
Last Modified: 02.04.2014
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:
/dev/sda1: UUID="99066558-ba04-465c-9962-e827aa2928ec" TYPE="ext4"
/dev/sda2: UUID="8ea38ef9-1ee5-423b-a013-15fd603a678e" TYPE="swap"
/dev/sda3: UUID="08ec5c65-8fd8-47ac-a998-d81195c8f964" TYPE="ext4"
/dev/sdb1: UUID="b2e58731-b621-4bd5-909a-afe3bb5dd8a1" TYPE="ext4"
- All that is left to do is mount a new disk and start up the services that were stopped before:
service httpd start
service nginx start
The disk adding procedure is the same for other virtualization environment or directly on a physical server.