LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   fails to start syslogd and mysqld after moving /var to new partition (http://www.linuxquestions.org/questions/red-hat-31/fails-to-start-syslogd-and-mysqld-after-moving-var-to-new-partition-630838/)

jweller 03-26-2008 02:44 PM

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?

acid_kewpie 03-26-2008 03:25 PM

well what does dmesg or /var/log/messages say about this? selinux might be objecting if that's still running.

noran01 03-26-2008 03:53 PM

check permissions...

jailbait 03-26-2008 05:34 PM

Did you ever delete the /var directory and rename the /newvar directory to /var?

--------------------
Steve Stites

jweller 03-26-2008 10:45 PM

Quote:

Originally Posted by jailbait (Post 3101422)
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.

jweller 03-27-2008 10:05 AM

Turns out SElinux was the culprit. Thanks :D

acid_kewpie 03-27-2008 10:35 AM

super. do try and work with it rather than turning it off...

jweller 03-27-2008 02:00 PM

yeah it's off for now but I will be turning it back on. Looks like I've got some reading to do

acid_kewpie 03-27-2008 02:32 PM

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.


All times are GMT -5. The time now is 08:09 AM.