Move directory to its own partition?
Hello,
I know this is more a centos question than a cpanel question, however, our server is getting low on space on our partition format. I've traced it down to the mysql databases and backups that are happening for the sites.
Since this machine is a vm, I was able to add a new partition easy enough.
Here are my questions:
1) since the mysql directory is technically on an lvm partition, is there any danger in forcing that partition to mount (via fstab and normal means) to the new drive, which would probably not be added into the lvm partition scheme (unless it should be done)
2) since it the mysql databases and backups, I presume there would be a setting that I need to change in cpanel settings?
I will continue doing more research, but I thought I would ask the experts here.
Thanks
-
Hi @ca2236 [QUOTE]1) since the mysql directory is technically on an lvm partition, is there any danger in forcing that partition to mount (via fstab and normal means) to the new drive, which would probably not be added into the lvm partition scheme (unless it should be done)
I can't speak for your specific configuration but the following forum threads have addressed similar issues and may be useful for you: [QUOTE]2) since it the mysql databases and backups, I presume there would be a setting that I need to change in cpanel settings?
If the instructions to move the MySQL to a different drive are followed there shouldn't be anything necessary to modify for that, if backups are also going to be moved to this drive you may want to modify the backup configuration at WHM>>Backup>>Backup Configuration to store the backups on the new drive. Thank you,0 -
Hello, Thanks for your reply. I found it really helpful. :) I have a couple of follow up questions if I may. 1) Since it appears that there are logs in the domlogs in /var/logs for the time period where the account was over quota. Does that mean, apache is logging the connections still under /var/log, but it can't write back to the account for awstats due to the account being over quota? 2) if we use log rotation for the domlogs or the logs that the metrics come from, does the rotated out data not exist in the metric history? I would assume so, but wanted to check. Thanks 0 -
I'm really happy you found it helpful! [QUOTE]1) Since it appears that there are logs in the domlogs in /var/logs for the time period where the account was over quota. Does that mean, apache is logging the connections still under /var/log, but it can't write back to the account for awstats due to the account being over quota?
The logs are in /var/log/apache2/logs/domlogs/DOMAIN (there's also a symbolic link to this at /etc/apache2/logs) when statistics are run these are collected by the metrics software and then depending on the configuration placed in the user's homedir - the statistics themselves are updated in /home/$user/tmp/awstats /home/$user/tmp/webalizer etc. If these can't be written too the stats won't update. [QUOTE]2) if we use log rotation for the domlogs or the logs that the metrics come from, does the rotated out data not exist in the metric history? I would assume so, but wanted to check.
Well, the answer to this depends on your settings. If you've selected in Tweak Settings "Archive logs in the user's home directory at the end of each stats run unless configured by the user." and "Remove the previous month's archived logs from the user's home directory at the end of each month unless configured by the user" is off then you will have logs indefinitely. If you've selected on then you will only have the previous month's0 -
One last question (I hope) :) Once the quota issue is resolved, is it possible to feed the logs back into the webalizer? I thought I would ask before trying to download a third party metric analyzer. 0 -
Well, after looking back at the metric page, I found that the missing months are in there, so it must get generated if the log files are still there. 0 -
Is there a way to old logs into the server to be re-indexed by the metrics? 0 -
Hello, It is possible but it's a bit of a process. Here is how we do it: extract the old log file copy the run the stats program manually against it, then move the resultant file to the correct flle name for that month: cd /home/cPUser/tmp/awstats cp /home/cPUser/logs/domainname.tld.bkup-Mon-20YY.gz gzip -d domainname.tld.bkup-Mon-20YY.gz /usr/local/cpanel/3rdparty/bin/awstats.pl -config=/home/cPUser/tmp/awstats/awstats.domainname.tld.conf -LogFile=/home/cPUser/tmp/awstats/domainnamed.tld.bkup-Mon-20YY mv awstatsMM20YY.domainname.tld.txt awstatsMM20YY.domainname.tld.txt.bak mv awstatsMM20YY.txt awstatsMM20YY.domainnamed.tld.txt chown cPUser awstatsMM20YY.domainname.tld.txt
Above: replace MON with the Month (Jan, Feb, Mar, etc...), replace cPUser with the cPanel Username, domainname.tld with the domain name, MM with the month (01,02,03, etc...) and 20YY with the year. Thank you,0 -
Thanks for the steps! :) 0 -
Hi @ca2236 You're very welcome! I hope it helps you get everything back to order! 0 -
I apologize, I think I mixed up my posts. The web analyzer follow up questions should have gone on my other post. 0 -
I have a follow up question on the moving directories around. is it possible to relocate /var/lib/mysqlbackup by changing the path in the configs? (I think its possible by mounting a new partition/disk in that location via fstab) but wanting to actually move the directory path. 0 -
Hi @ca2236 /var/lib/mysqlbackup is not a default path your actual MySQL directory should be /var/lib/mysql. What are you using /var/lib/mysqlbackup for? Thank you, 0 -
Hi @ca2236 I'm glad to hear you were able to find a resolution! 0
Please sign in to leave a comment.
Comments
14 comments