fails to start syslogd and mysqld after moving /var to new partition
Dell PE 2650
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
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
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?
well what does dmesg or /var/log/messages say about this? selinux might be objecting if that's still running.
Did you ever delete the /var directory and rename the /newvar directory to /var?
/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.
Turns out SElinux was the culprit. Thanks :D
super. do try and work with it rather than turning it off...
yeah it's off for now but I will be turning it back on. Looks like I've got some reading to do
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 05:22 AM.|