MariaDB disk space requirement

PNVGroup

Verified User
Joined
Jun 14, 2010
Messages
13
Hi!

We have been using DirectAdmin for more than a decade now and have never had this problem. First, let me say, that we always set up our partitions as described here: https://docs.directadmin.com/getting-started/installation/overview.html

For /usr we always gave 2 times the minimum space required (about 10 GB). But it seems this is not enough. On the last two servers we cannot update MariaDB as version 10.4.17 is using more than 3GB (3.1GB to be exact) disk space of this partition. With other software installed we cannot update MariaDB with custombuild as the partition always runs out of space. Mysql backups via custombuild are turned off. We also deleted everything that seemed safe to delete, but we still have only 1.7GB of free space.

What can we do? We are not comfortable with resizing partitions. Are there any other options? 3.1GB seem a lot for MariaDB. Can we delete anything from MariaDB install directory?

Any help would be appreciated!
 
you can stop maria from DA interface, to prevent autostart, move whole mysql dir to another place where you have enough space, symlink it with old place, chown symlink to correct owner (mysql.mysql), start maria, upgrade etc..
 
@Zhenyapan s suggestion is definitely an option. If you do want to resize:

If you use lvm partitions, it shouldn't be a problem to resize on-line, if your /usr partition is the last partition on your disk, it should be straighforward as well (growpart -> resize2fs/xfs_growfs). If if it's somewhere in the middle:

We had the same issue on some of our older servers (on newer servers we just use one root partition). The issue is that while upgrading, you will need space for both the new .tar.gz file and the extracted files and folders, temporarily using up a lot of /usr disk space.

We did fix it by resizing our /usr partition. If you plan a downtime window for maintenance, shut down the server, boot using a live iso and run gparted, it should be safe to do and pretty straightforward.
 
Or, you may have a look -

1. Any existing mysql backup inside /usr/local/directadmin/custombuild/mysql_backups/

2. Any old source tar.gz (e.g. php-7.4.xx.tar.gz) inside /usr/local/directadmin/custombuild/

3. Any old MySQL/MariaDB rpm inside /usr/local/directadmin/custombuild/mysql/

4. Check which folder consume the most recursively -

cd /usr
du --max-depth=1 | sort -n

IMHO, 10GB for /usr may be small.

For me, I will backup it , and resize it.
 
Last edited:
Thanks to everybody for their suggestions. I think moving the entire mariadb install folder is the first thing we will try and then see if it works. We are woried that even that will not be enough.

We do not use LVM, so resizing in a way wtptrs suggested would be our next option (shutdown, boot using live iso and running gparted).

@ccto we already deleted all of these files, but also thank you for your suggestion.

For our next servers we will definately use a lot more space than just 10GB for /usr partition. This is the way we always did things in the past and the recommendations from Directadmin install webpage still suggest to use from 5GB do 12+GB and so we used the same for our newer servers. Maybe this should be updated.

Again, thanks everybody for their help!
 
it depends on your server perspectives, minimal is separate /boot root (/) and swap,
better add separate /home with nosuid (maybe noexec too),
more better separate /tmp with noexec nosuid and with binded to same dir /var/tmp - but all depends on your own needs.
I don't make separate /usr
in some cases make separate /var/lib/mysql (separate disk, not partition), same with /home (separate disk, not partition)
 
Back
Top