Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
05-10-2005, 01:06 PM
#1
LQ Newbie
Registered: May 2005
Posts: 12
Rep:
Please, God, someone help me!!!! Big Problems!
OK, my linux server came with preinstalled partitions. The main one has 15GIG data on it. There is another one that has 135 gigs.
The main one houses the website and the mysql databases. It is running out of space quickly.
I tried to create a symbolic link and transfer the mysql folder to the bigger partition.
When I do this, I can't restart mysqld, and the system cannot find the symbolic link to the data files.
Another option, I guess, is that I can increase partition space by stealing from the big partition. I have no idea how to do this.
Can someone help me figure out why the symbolic link is not working, or help me get more space on my main partition from the other huge one?
05-10-2005, 01:08 PM
#2
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
Welcome to LQ.
Why are you trying to use a symlink? Is there a reason you don't just move the data and point mysql to the new data directory?
05-10-2005, 01:15 PM
#3
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
Thank you for the welcome - and the quick response.
The answer to your question is that I don't know how to move the files and get it to work.
I tried moving the entire /var folder to the new partition, but the server froze.
I am working on this remotely, and not too comfortable with Linux.
05-10-2005, 01:17 PM
#4
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
Also, I tried moving the mysql folder (which is the main problem for the space issue) to the data0 folder:
/var/lib/mysql moved to /data0/var/lib/mysql
Then I tried creating the symlink to point to the new mysql folder. it shows that it works, but i cannot connect.
05-10-2005, 01:21 PM
#5
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
I wouldn't mess about with moving all of /var when the system is in anything but single user mode.
I would just move (well, copy to start with) the mysql data (stop the service first):
cp -ar /var/lib/mysql /data0/var/lib/mysql
Then make sure the permissions are correct:
chown -R mysql /data0/var/lib/mysql
Then edit /etc/my.cnf to have a mysqld section with a datadir value:
Code:
[mysqld]
datadir=/data0/var/lib/mysql
The value may just need adding or you may need to create the file from scratch.
After the change just start the mysql service up again.
05-10-2005, 01:26 PM
#6
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
I think you may have just saved my life. I am going to do this and see if it works. if it does, I need your address so I can come suffocate you with hugs!
05-10-2005, 01:33 PM
#7
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
OK, it didn't work.
Here is the my.conf file:
[mysqld]
datadir=/data0/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
[mysql.server]
user=mysql
basedir=/data0/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
I am getting a timeout error when trying to restart mysqld service.
05-10-2005, 01:36 PM
#8
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
05-10-2005, 01:41 PM
#9
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
What distribution are you using? Are you using SELinux?
What do you see in /var/log/mysqld.log?
05-10-2005, 01:46 PM
#10
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
I am using Linux enterprise edition. In my var/log/mysqld.log, this is what's written:
050510 11:43:20 [Note] /usr/libexec/mysqld: Normal shutdown
050510 11:43:20 InnoDB: Starting shutdown...
050510 11:43:23 InnoDB: Shutdown completed; log sequence number 0 43664
050510 11:43:23 [Note] /usr/libexec/mysqld: Shutdown complete
050510 11:43:23 mysqld ended
050510 11:43:55 mysqld started
050510 11:43:55 [Warning] Can't create test file /data0/var/lib/mysql/65-42-106-1.lower-test
/usr/libexec/mysqld: Can't change dir to '/data0/var/lib/mysql/' (Errcode: 13)
050510 11:43:55 [ERROR] Aborting
050510 11:43:55 [Note] /usr/libexec/mysqld: Shutdown complete
050510 11:43:55 mysqld ended
05-10-2005, 01:52 PM
#11
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
RedHat Linux Enterprise? Which version?
Are you using SELinux?
Can you post the output from:
ls -la /data0/var/lib/mysql
05-10-2005, 01:55 PM
#12
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
no longer necessary
Last edited by foreverdita; 03-06-2006 at 10:45 PM .
05-10-2005, 01:56 PM
#13
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
I believe it is SELinux
05-10-2005, 02:00 PM
#14
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
If you are using SELinux I would reccomend reading the documentation so you can check the policy you have configured for mysql:
http://www.redhat.com/docs/manuals/e...selinux-guide/
05-10-2005, 02:05 PM
#15
LQ Newbie
Registered: May 2005
Posts: 12
Original Poster
Rep:
The server came already configured. I will check this, but I am not sure what to check for.
All times are GMT -5. The time now is 06:34 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News