Mysql/greyhole/etc not working after /var adjustments
Posted: Wed Dec 10, 2014 2:22 am
After having my landing zone fill up very quickly, multiple times, resulting in a few predictable system crashes... I mounted a 3TB HDD as /var, edited /etc/fstab to reflect the change and rebooted. After powering back on it looks like the system (Amahi 7 Fedora), boots up and can startX, connect to internet and other normal functions. The problem seems to be that Mysql, greyhole, and other services are no longer starting now.
I'm not sure what the problem could be, but I'm guessing it had something to do with moving the /var dir data from one HDD to another. To move this data I booted into a live USB Ubuntu host and simply sudo mv'd the data from one dir to another, and then mounted that disk as /var in fstab. I imagine that simply sudo mv'ing the data did not disrupt the file permissions, but when I check services like sql status i get a confusing error:
But that file should have the correct permissions as seen below:
I have tried moving all of the /var data back to the original drive and reverting /etc/fstab, but no luck. It looks like Mysql just wont start. I really don't want to re-install so hopefully there is some fix possible.
Could a temporary outage of /var cause some sort of persisting issue with MySQL? My guess is that maybe Fedora tried to recreate some files it thought went missing in /var, but when it recognized that the data had returned the system may have stumbled?
I would show greyhole --stats info but that doesn't appear to be working either:
I'm not sure what the problem could be, but I'm guessing it had something to do with moving the /var dir data from one HDD to another. To move this data I booted into a live USB Ubuntu host and simply sudo mv'd the data from one dir to another, and then mounted that disk as /var in fstab. I imagine that simply sudo mv'ing the data did not disrupt the file permissions, but when I check services like sql status i get a confusing error:
Code: Select all
sudo service mysqld status
Redirecting to /bin/systemctl status mysqld.service
mysqld.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
Active: failed (Result: exit-code) since Wed 2014-12-10 01:06:06 PST; 4s ago
Process: 13032 ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 13031 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=1/FAILURE)
Process: 13002 ExecStartPre=/usr/libexec/mysqld-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Dec 10 01:06:05 localhost.localdomain mysqld_safe[13031]: /usr/bin/mysqld_safe: line 182: /var/log/mysqld.log: Permission denied
Dec 10 01:06:05 localhost.localdomain mysqld_safe[13031]: touch: cannot touch ‘/var/log/mysqld.log’: Permission denied
Dec 10 01:06:05 localhost.localdomain mysqld_safe[13031]: chown: cannot access ‘/var/log/mysqld.log’: Permission denied
Dec 10 01:06:05 localhost.localdomain mysqld_safe[13031]: chmod: cannot access ‘/var/log/mysqld.log’: Permission denied
Dec 10 01:06:05 localhost.localdomain mysqld_safe[13031]: 141210 01:06:05 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Dec 10 01:06:05 localhost.localdomain mysqld_safe[13031]: /usr/bin/mysqld_safe: line 138: /var/log/mysqld.log: Permission denied
Dec 10 01:06:05 localhost.localdomain systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
Dec 10 01:06:06 localhost.localdomain systemd[1]: mysqld.service: control process exited, code=exited status=1
Dec 10 01:06:06 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
Dec 10 01:06:06 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
Code: Select all
sudo ls -al /var/log/mysqld.log
-rw-r-----. 1 mysql mysql 106893 Dec 8 23:35 /var/log/mysqld.log
Could a temporary outage of /var cause some sort of persisting issue with MySQL? My guess is that maybe Fedora tried to recreate some files it thought went missing in /var, but when it recognized that the data had returned the system may have stumbled?
I would show greyhole --stats info but that doesn't appear to be working either:
Code: Select all
sudo greyhole --stats
ERROR: Can't connect to database: SQLSTATE[HY000] [2002] No such file or directory