Ad Widget

Collapse

Info: If your MySQL data partition becomes too small

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • just2blue4u
    Senior Member
    • Apr 2006
    • 347

    #1

    Info: If your MySQL data partition becomes too small

    Hi there!

    Yesterday i noticed that i wasn't able to log in as admin into Zabbix.

    Problem was my DB data partition which was 100% full.
    I did a fresh Zabbix Server installation some days ago and still had many items in my templates, which made the DB become unexpected huge.

    I didn't want to re-install the DB, so i had to resize the partition:
    - made a zabbix DB backup
    - stopped the zabbix server
    - stopped the mysql DB
    - unmounted the partition
    - erased the partition using fdisk
    - created a new partition using fdisk (set beginning to be the same position as from the old partition, the ending somewhere farther)
    - then used fsck.ext3 -f, which recognized the new partition size and changed it in the filesystem.
    - used resize2fs to resize the filesystem on that partition as well.
    - then mounted the resized partition again, started mysql and checked the DB tables

    Note:
    Instead of resizing an existing partition you can also simply use a new partition and copy your DB files, if you don't have enough free space behind your DB partition.

    In my situation, mysqlcheck found corrupt tables (e.g. zabbix.history). I think this happened when the partition was full.
    AFAIK, InnoDB repairs them automatically, right?
    Big ZABBIX is watching you!
    (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)
Working...