Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql data file logical volume group usage 100% what to do

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "mysql data file logical volume group utilization rate 100% how to do", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to do 100% utilization rate of logical volume group of mysql data file"!

1. Check the specific reasons for database lock

tail -10000 /data/data/** 001.err

Found insufficient space

2016-11-24 19:45:24 20867 [Warning] Disk is full writing './ mysql-bin.000299' (Errcode: 28 - No space left on device). Waiting for someone to free space...

df -h

/dev/mapper/VolGroup-lv_data 100%

II. Backup database for data backup

III. Expansion of logical volume groups

vgdisplay Check if there is room

lvextend -L +20G /dev/mapper/VolGroup-lv_data

or lvextend -L 120G /dev/mapper/VolGroup-lv_data

resize2fs /dev/mapper/VolGroup-lv_data

IV. Clean up the log

#By file: Delete logs before mysql-bin.000354, excluding mysql-bin.000354

MYSQL> flush logs; --flush logs

MYSQL>purge binary logs to 'mysql-bin.000354';

Query OK, 0 rows affected (0.16 sec)

#By Time: Delete logs before 2011-11-10 00:00:00

MYSQL> flush logs; --flush logs

MYSQL>purge binary logs before '2011-11-10 00:00:00';

#By time: Please sort out the logs from three days ago

MYSQL> flush logs; --flush logs

MYSQL> purge master logs before date_sub(now(), interval 3 day);

At this point, I believe that everyone has a deeper understanding of "how to do 100% utilization rate of mysql data file logical volume group". It is advisable to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report