• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Process For Moving /var Crashes db on reboot

MD_Broker

New Pleskian
We are attempting to move our /var directory to another drive due to the demands storage demand of our sites. We have attempted the following posted process and are getting errors after reboot: How to move var directory to a new hard drive in Plesk?

Note: Before starting this process, we are having to issue a 'su root' or the commands will not work.

After performing the steps and rebooting, we get the Below is the output on :8443

ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory

Additionally, an exception has occurred while trying to report this error: Zend_Exception
No entry is registered for key 'translate' (Abstract.php:144)

Search for related Knowledge Base articles

ERROR: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory' in /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace: #0 /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:dbname=ps...', 'admin', '$AES-128-CBC$E6...', Array) #1 /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /usr/local/psa/admin/externals/Zend/Db/Adapter/Abstract.php(460): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('select param, v...', Array) #4 /usr/local/psa/admin/plib/Db/Adapter/Pdo/Mysql.php(30): Zend_Db_Adapter_Pdo_Abstract->query('select param, v...', Array) #5 /usr/local/psa/admin/plib/db.php(36): Db_Adapter_Pdo_Mysql->query('select param, v...') #6 /usr/local/psa/admin/plib/db.php(212): db_query('select param, v...', false) #7 /usr/local/psa/admin/plib/Plesk/Mode.php(4 (Abstract.php:144)

Search for related Knowledge Base articles


We tried this process again. Before rebooting, we attempted to start the DB to see what the error is. The error that outputs is as follows:

Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit not found.

The output from the /etc/my.cnf file is
[mysqld]
bind-address = ::ffff:127.0.0.1
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_allowed_packet=16M
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in Systemd - Fedora Project Wiki
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.

So, I dug into the /var/lib directory to see if I could find the MySQL directory that is referenced above. Unfortunately, it is not found either before or after the move. So, I'm a bit stumped. What commands are missing here that would allow this process to work. I have emailed the creator of the document... no response :/

This is AWS Plesk Onyx image with Centos 7.4.1708.
 
Back
Top