Skip to main content

Hello, my mysql disk storage is almost full.

Filesystem                                       Size  Used Avail Use% Mounted on
devtmpfs                                         888M     0  888M   0% /dev
tmpfs                                            907M     0  907M   0% /dev/shm
tmpfs                                            907M   88M  819M  10% /run
tmpfs                                            907M     0  907M   0% /sys/fs/cgroup
/dev/mapper/almalinux-root                        20G  3.4G   17G  17% /
/dev/sda2                                        245M  227M   19M  93% /boot
/dev/sda1                                        190M  5.8M  185M   4% /boot/efi
/dev/mapper/almalinux-var_cache_centreon_backup  5.0G   68M  5.0G   2% /var/cache/centreon/backup
/dev/mapper/almalinux-var_lib_mysql              7.1G  6.9G  214M  98% /var/lib/mysql
/dev/mapper/almalinux-var_log                     10G  1.6G  8.5G  16% /var/log
/dev/mapper/almalinux-var_lib_centreon--broker   5.0G   68M  5.0G   2% /var/lib/centreon-broker
/dev/mapper/almalinux-var_lib_centreon            16G  1.6G   15G  10% /var/lib/centreon
tmpfs                                            182M     0  182M   0% /run/user/0


How to increase the capacity or empty it?

Is this  a VMWare VM? CentOS,RHEL or SUSE?

For CentOS or RHEL, just do ssm list to see your server. If VMWare VM, ask to increase the size of your 1st disk. Then, perform the following commands

create a snapshot

fdisk /dev/sda

d

n

select poartition 2

w

then reboot the server

Jacques


Good morning,
I'm on a Vmware virtual machine, I tried your commands, it deletes the system disk for me, while you just have to increase the mysql partition.


Good day,

 

   That is correct. If you need a bigger disk, the above is what you need to do. If you need to increase the mysql lv, just execute “ssm list” and then “ssm resize -s +xG ...”

 

Jacques 


if you use lvm, you just need to add a disk and then perform this commands : 

sfdisk -s (to see the disks)

add your disk to your vm

echo “- - -” > /sys//sys/class/scsi_host/host#/scan (replace # by the numbers) 

pvcreate /dev/sd#

vgextend yourvg /dev/sd#

lvextend -l +100%FREE yourlv

resize2fs yourlv

that’s it 5 minutes and no need to reboot


Reply