LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 05-10-2005, 01:06 PM   #1
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Rep: Reputation: 0
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?
 
Old 05-10-2005, 01:08 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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?
 
Old 05-10-2005, 01:15 PM   #3
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 05-10-2005, 01:17 PM   #4
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 05-10-2005, 01:21 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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.
 
Old 05-10-2005, 01:26 PM   #6
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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!

 
Old 05-10-2005, 01:33 PM   #7
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 05-10-2005, 01:36 PM   #8
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
 
Old 05-10-2005, 01:41 PM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What distribution are you using? Are you using SELinux?

What do you see in /var/log/mysqld.log?
 
Old 05-10-2005, 01:46 PM   #10
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 05-10-2005, 01:52 PM   #11
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
RedHat Linux Enterprise? Which version?

Are you using SELinux?

Can you post the output from:
ls -la /data0/var/lib/mysql
 
Old 05-10-2005, 01:55 PM   #12
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
no longer necessary

Last edited by foreverdita; 03-06-2006 at 10:45 PM.
 
Old 05-10-2005, 01:56 PM   #13
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
I believe it is SELinux
 
Old 05-10-2005, 02:00 PM   #14
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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/
 
Old 05-10-2005, 02:05 PM   #15
foreverdita
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
The server came already configured. I will check this, but I am not sure what to check for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Big O, Big Omega, and Big Theta oulevon Programming 7 05-26-2010 07:18 AM
Dual Boot Problems...big problems Goonie Linux - General 19 12-09-2006 04:44 PM
Big Problems! Help please! TheShemeta Slackware 1 11-04-2003 10:58 AM
2 big problems... Txlyo Linux - Newbie 24 10-16-2003 03:31 AM
big problems cristi1979 Linux - Security 11 07-04-2003 02:48 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration