I take no credit for this, instructions worked well for me, not loss of data
Zabbix appliances come with 4.5GB of space allocated for the database. That might be too small for production. Follow these steps to increase DB disk space.
IMPORTANT: Backup your data before you start! Or if you are running a VM make a copy of it!
In this example I’m using the VMWare appliance, but the overall steps should be the same for the others.
- Shutdown the Zabbix appliance.
- Increase the size of the disk in VMware:
- In your VMware vSphere or VMware Workstation application, find your Zabbix VM.
- Right-click on the VM and select “Settings” or “Edit Settings”.
- In the Hardware tab, go to Hard Disks
- Provisioned size as needed (example 30GB), then click OK.
3. Resize the partition
- Boot up your Zabbix VM and SSH into it.
I’ll use fdisk to delete and recreate the partition with the new size.
- Start fdisk in interactive mode by running:
- Type the letter P to print the partition table and take note of the starting sector for /dev/sda4 and /dev/sda5 partitions.
Example output (might be different for your Zabbix appliance):
- Type the letter D, then 5 to delete the existing /dev/sda5 partition.
- Type D, then 4 to delete the existing /dev/sda4 (extended partition).
- Type N, then E (for extended), then 4 for the partition number, and use the start sector of the old /dev/sda4 partition.
- For the last sector, just press Enter to accept the default, which should be the end of the available space.
- Now, type N, then L, (for logical).
- The first sector should be the start sector of the old /dev/sda5.
- Again, for the last sector, just press Enter to accept the default, which should be the end of the available space.
- If you see a prompt asking to remove an existing signature, enter N for No, otherwise existing data will be wiped.
- Type W to write changes to the disk.
4. Reboot machine:
sudo reboot
5. Resize the filesystem:
- After the machine reboots, use xfs_growfs to resize the filesystem.
6. Verify the changes:
- Finally, verify that the filesystem has been resized correctly with:
You should see now that the partition /dev/sda5 has
more available disk space (depending on how much you allocated in the VM settings):
Sem comentários:
Enviar um comentário