Hi all.
The problem that I have received that my Zabbix was unvaliable:
"Database error. Error connecting to database: No such file or directory"
I know this is a very old thread and I hope you managed to extend your disk drive. I found some manuals in Internet about process of extension volume of Linux LVM disk. I tried to do it, but I had some bad results as <initframs> boot failed after reboot.
Ok, but since nobody prompted and I was running into the same problem just now I wanted to write the solution in case somebody else runs in to it. NOTE: the deletion of any partitions is not necessary! Unfortunately the Zabbix documentation has not beet updated yet.
What you actually need to do is create a new primary partition on the avaiable disk space, add that partition to the logical volume and extend the filesystem.
The first variant if you have enlarged the disk space of the existing virtual drive. I had example on Zabbix appliance 4.4.6 (vhdx).
The deletion of the existing partition is not needed!
Let's go:
sudo fdisk /dev/sda
n
p
(leave all the questions to default answer)
w
<REBOOT here>
pvcreate /dev/sda3
vgextend zabbix-vg /dev/sda3
lvextend -l 100%FREE /dev/mapper/zabbix--vg-root
resize2fs /dev/mapper/zabbix--vg-root
Done.
The second variant if you have added a NEW disk to the VM.
sudo fdisk /dev/sdb
u
n
p
(leave all the questions to default answer)
w
<REBOOT here>
pvcreate /dev/sdb1
vgextend zabbix-vg /dev/sdb1
lvextend -l 100%FREE /dev/mapper/zabbix--vg-root
resize2fs /dev/mapper/zabbix--vg-root
Done.
It's easy.
No comments:
Post a Comment
А что вы думаете по этому поводу?