Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I would like to change the filesystem where log files will go (everything that goes into /var/log ).
When I installed Redhat, I didn't setup /var filesystem and now I would like it, but don't think its possible now as the /var directory is under the / filesystem. I worry about if there is a problem and logs fill up my root filesystem. Is there anyway to tell logs for messages, mail and secure to go in another filesystem if I create it? I would think there is some config file in /etc/ or something that tells where log files are put.
Yes you can do that by editing /etc/syslog.conf file. Look at the file and you will understand it. Restart the syslog service after modifying the file.
When I installed Redhat, I didn't setup /var filesystem and now I would like it, but don't think its possible now as the /var directory is under the / filesystem.
It's not only possible but also easy. Provided that you have space left for a new partition.
The basic steps are:
Create/format partition
Temporarily mount new partition, e.g. on /mnt
Move data from /var to /mnt
umount, then mount new partition on /var. (And edit /etc/fstab to mount automatically)
Make sure that you delete the old logfiles before remounting (POSIX file deletion semantics should let you do that without disrupting your system), so you don't end up with a bunch of large files (I've seen logs more than 10GB thick) that you can't access because the partition is mounted over the past var directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.