LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-26-2008, 02:44 PM   #1
jweller
LQ Newbie
 
Registered: Sep 2003
Distribution: fedora, ubuntu, uclinux
Posts: 23

Rep: Reputation: 15
fails to start syslogd and mysqld after moving /var to new partition


Dell PE 2650
RHEL4

I am running out of space on /var on this machine so I added 2 disks in a RAID 1 configuration

created a new partiton with fdisk

mkfs -t ext3 -c /dev/sdb1

mkdir /newvar

reboot with the install disk with "linux rescue"

mount -t ext3 /dev/sdb1 /newvar

cp -ax /var/* /newvar

touch /var/I_AM_OLD /newvar/I_AM_NEW

e2label /dev/sda6 /oldvar
e2label /dev/sdb1 /var1

reboot


when the system comes back up, my copied /var partion mounts correctly, but it fails starting system logger and mysql. Everything else starts up and appears to be working. Everything works OK when I restart the service though.

[root@server /]# service syslog status
syslogd is stopped
klogd (pid 3110) is running...
[root@server /]# service syslog restart
Shutting down kernel logger: [ OK ]
Shutting down system logger: [FAILED]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]

[root@server /]# service mysqld status
mysqld dead but subsys locked
[root@server /]# service mysqld restart
Stopping MySQL: [FAILED]
Starting MySQL: [ OK ]

If I reboot after this it still fails to start syslogd and mysqld at boot.


I am at my wits end. Can anyone please point me in the right direction?
 
Old 03-26-2008, 03:25 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
well what does dmesg or /var/log/messages say about this? selinux might be objecting if that's still running.
 
Old 03-26-2008, 03:53 PM   #3
noran01
LQ Newbie
 
Registered: Oct 2007
Posts: 12

Rep: Reputation: 0
check permissions...
 
Old 03-26-2008, 05:34 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,549

Rep: Reputation: 180Reputation: 180
Did you ever delete the /var directory and rename the /newvar directory to /var?

--------------------
Steve Stites
 
Old 03-26-2008, 10:45 PM   #5
jweller
LQ Newbie
 
Registered: Sep 2003
Distribution: fedora, ubuntu, uclinux
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jailbait View Post
Did you ever delete the /var directory and rename the /newvar directory to /var?

--------------------
Steve Stites
not exactly. /dev/sdb1 (newvar) gets mounted at /var and /dev/sda6 (oldvar) does not get mounted at the next boot. fstab uses LABELs, hence the use of the e2label command. I'm leary of deleting anything until I have everything working correctly.

/var/log/messages has nothing to say since syslogd doesn't start

dmesg doesn't show anything that jumps out but I'm not an expert. I'll post it if anyone thinks its of use, but it's pretty long.

I'm gonna look at SElinux, hadn't thought of that.
 
Old 03-27-2008, 10:05 AM   #6
jweller
LQ Newbie
 
Registered: Sep 2003
Distribution: fedora, ubuntu, uclinux
Posts: 23

Original Poster
Rep: Reputation: 15
Turns out SElinux was the culprit. Thanks
 
Old 03-27-2008, 10:35 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
super. do try and work with it rather than turning it off...
 
Old 03-27-2008, 02:00 PM   #8
jweller
LQ Newbie
 
Registered: Sep 2003
Distribution: fedora, ubuntu, uclinux
Posts: 23

Original Poster
Rep: Reputation: 15
yeah it's off for now but I will be turning it back on. Looks like I've got some reading to do
 
Old 03-27-2008, 02:32 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
if everything looks like it did outside of selinux then you should only need to chcon a few bits and bobs to be back where you were. if you still mount the old one at /oldvar or such then an ls -Z of the relevant parts should highlight the differences.
 
  


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
Problem moving /var to separate partition a550ee Linux - Newbie 6 10-02-2007 03:09 PM
mandriva fails to start /etc/init.d/mysqld johnnysd Linux - Server 4 11-24-2006 11:23 AM
FC3 syslogd fails to start Chilli Burger Fedora - Installation 1 02-11-2005 08:22 PM
Moving contents of /var to separate partition TexasDex Linux - Software 2 03-01-2004 08:30 PM
Moving /var to new partition burnpile Slackware 2 12-10-2003 12:33 PM


All times are GMT -5. The time now is 09:24 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration