Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i wanna umount the /var directory.ideally when i do that i will
show " device busy "
now if i kill all the processes that are working on the directory,
i should not get device busy error.
but how do i find ,which all processes are working on var directory???
so that i can kill them.
lsof gives me list of open files n sockets.
wot i want is list of processes that are working on /var directory,
i.e processes that are responsible for writing in /var/log/messages file
and all such other files.
so that if possible,i can kill them one by one to get out of device busy problem.
many many thnx to all who replied.
but will the shell script that u've sent do that safely.
bcoz when i tried to kill processes that work on /var,
certain critical processes were killed and this led to an immediate logout.
though i m trying with ur alternative,if results come out ,will let u know.
i hv an embedded box that internally uses linux,
i m working on memory related issues,wherein i need
to think of alternatives to get up some more memory
if system goes out of memory,
so i m thinking of options that i can try,one of which is
getting space from /var.
i dont know whether this approach is correct or not,
nd ur feedback would be appreciated.
Unmounting /var will not change anything to disk space (you are mixing memory:RAM and disk space)
Unmounting will remove the hard disk partition /var from the filesystem hierarchy. The space will not be freed.
It all depends on what embend device you are working on.
You could completely remove /var. Because
-> The system is stable and you don't need any log anymore to analyze problems. /var keeps the logfile so it's interesting in case of crash
-> The system is not security-sensitive. /var also contains all connection access made to the board.
-> Most important: it is on flash. flash has limited Read/Write number. Every time somebody would connect to the webserver on the board for example, linux will happily write one line in /var/something. This is unacceptable for flash memory.
As said, remove /var completly. rm it and remove it from fstab. Then you have a new partition.
Or you have a running process that deletes some big uneeded files every xx hours/days.
Thats true, if you unmount /var the space will still be used!
And if you have flash memory you should mount your /var on RAM memory space, this way you can access log files while the machine is up, or you can manage syslog to log on a remote machine, anyway, do not freak your flash memory with logs! lol
yes wot u said is rite,if i directly umount /var it wont help me at all as far as memory is concerned,
but wot if i systematically kill all the processes that
r working on /var, and that do not have dependencies on other processes
and then umount it????