Skip to content

Commit a93db64

Browse files
committed
Mysql aio fix for OpenVZ
1 parent 7c584b9 commit a93db64

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

install/rhel/mysql-512.cnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ query_cache_size=8M
2727
query_cache_type=1
2828
tmp_table_size=16M
2929

30-
innodb_use_native_aio = 0
30+
#innodb_use_native_aio = 0
3131
innodb_file_per_table
3232

3333
[mysqld_safe]

install/rhel/mysql.cnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ long_query_time=5
1111
#log-queries-not-using-indexes
1212
#log-slow-queries=/var/log/mysql/log-slow-queries.log
1313

14+
#innodb_use_native_aio = 0
1415
innodb_file_per_table
1516

1617
[mysqld_safe]

install/vst-install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ software="nginx httpd mod_ssl mod_ruid2 mod_extract_forwarded mod_fcgid
2121
phpMyAdmin awstats webalizer vsftpd mysql mysql-server exim dovecot clamd
2222
spamassassin curl roundcubemail bind bind-utils bind-libs mc screen ftp
2323
libpng libjpeg libmcrypt mhash zip unzip openssl flex rssh libxml2
24-
ImageMagick sqlite pcre sudo bc jwhois mailx lsof tar telnet rsync sysstat
24+
ImageMagick sqlite pcre sudo bc jwhois mailx lsof tar telnet rsync
2525
rrdtool GeoIP freetype ntp openssh-clients vesta vesta-nginx vesta-php"
2626

2727

@@ -521,6 +521,11 @@ if [ "$srv_type" = 'micro' ]; then
521521
else
522522
wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf
523523
fi
524+
525+
# Disable aio on OpenVZ
526+
if [ -e "/proc/user_beancounters" ]; then
527+
sed -i "s/#innodb_use_native_aio/innodb_use_native_aio/g" /etc/my.cnf
528+
fi
524529
chkconfig mysqld on
525530
service mysqld start
526531
if [ "$?" -ne 0 ]; then
@@ -742,6 +747,10 @@ vst_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
742747
if [ ! -z "$vst_ip" ] && [ "$vst_ip" != "$main_ip" ]; then
743748
# Set NAT association
744749
$VESTA/bin/v-change-sys-ip-nat $main_ip $vst_ip
750+
751+
# Assign passive ip address
752+
echo "pasv_address=$vst_ip" >> /etc/vsftpd/vsftpd.conf
753+
service vsftpd restart
745754
fi
746755
if [ -z "$vst_ip" ]; then
747756
vst_ip=$main_ip

0 commit comments

Comments
 (0)