Without sudo, mysql restart gives wrong error with PS 5.6.23

Bug #1432557 reported by Nilnandan Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
New
Undecided
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

Here, you can see that even / has enough space, it gives error "The partition with /var/lib/mysql is too full!"

nilnandan@desktop:~$ /etc/init.d/mysql restart
 * Stopping MySQL (Percona Server) mysqld cat: /var/run/mysqld/mysqld.pid: Permission denied
                                                                                                                                                                                                      [fail]
df: '/var/lib/mysql/.': Permission denied
 * /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
nilnandan@desktop:~$

nilnandan@desktop:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 46G 7.0G 37G 16% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 3.8G 4.0K 3.8G 1% /dev
tmpfs 765M 1.1M 764M 1% /run
none 5.0M 4.0K 5.0M 1% /run/lock
none 3.8G 24M 3.8G 1% /run/shm
none 100M 40K 100M 1% /run/user
/dev/sda1 453M 161M 265M 38% /boot
/dev/sda4 167G 108G 51G 69% /home
/home/nilnandan/.Private 167G 108G 51G 69% /home/nilnandan
nilnandan@desktop:~$
nilnandan@desktop:~$ sudo /etc/init.d/mysql restart
 * Stopping MySQL (Percona Server) mysqld [ OK ]
 * Starting MySQL (Percona Server) database server mysqld [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.
nilnandan@desktop:~$
nilnandan@desktop:~$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.6.23-72.1 Percona Server (GPL), Release 72.1, Revision 0503478

Tags: pkg
description: updated
summary: - Without sudo, mysql restart gives wrong error with PS 5.5.23
+ Without sudo, mysql restart gives wrong error with PS 5.6.23
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

This is easy to confirm on Ubuntu (14.10 in my case):

openxs@ubuntu:~$ mysql -uroot -proot -e'select version()'
Warning: Using a password on the command line interface can be insecure.
+-------------+
| version() |
+-------------+
| 5.6.23-72.1 |
+-------------+
openxs@ubuntu:~$ sudo /etc/init.d/mysql stop
[sudo] password for openxs:
 * Stopping MySQL (Percona Server) mysqld [ OK ]
openxs@ubuntu:~$ /etc/init.d/mysql start
df: '/var/lib/mysql/.': Permission denied
 * /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
openxs@ubuntu:~$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 7.0G 1.4G 5.3G 21% /
none 4.1k 0 4.1k 0% /sys/fs/cgroup
udev 516M 4.1k 516M 1% /dev
tmpfs 106M 353k 105M 1% /run
none 5.3M 0 5.3M 0% /run/lock
none 527M 0 527M 0% /run/shm
none 105M 0 105M 0% /run/user
/dev/sda1 247M 39M 196M 17% /boot

Nothing like this happens, say, with CentOS. The problematic code is:

 61 # check for diskspace shortage
 62 datadir=`mysqld_get_param datadir`
 63 if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ ex it ($4>4096) }'; then
 64 log_failure_msg "$0: ERROR: The partition with $datadir is too full!"
 65 echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER
 66 exit 1
 67 fi
 68 }

tags: added: pkg
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1615

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.