fails to start syslogd and mysqld after moving /var to new partition
Red HatThis forum is for the discussion of Red Hat Linux.
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.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.