[crit] (28)No space left on device — problem
Today got call from friend saying he is unable to restart crashed apache. Logged in and just tailed apache error logs and I saw following error
[crit] (28)No space left on device: mod_jk: could not create jk_log_lock
After fiddling around with files created just searched for above string (easy right). That pointed me to a link saying it may be a all semaphore used issue and no more can be created.
Just searched how to list semaphores and I ran following command as root
root# ipcs -s
Now the next task was to clean all these semaphores.
root# ipcrm -s <semaphore_id>
was the command to be used but I had lots of semaphores to delete. So wrote following shell oneliner to do it
root# for i in `ipcs -s | grep apache | cut -d ” ” -f2`;do ipcrm -s $I; done
String to be greped may change depending on you software which is not releasing the semaphores after closing. Take care you are not removing in use semaphore.

