6

I have a file of type "door" in solaris 10 (that is a means of interprocess communication). It is somehow left over and I would like to get rid of it. I can not just remove it with rm ...

ls -l
total 0
Dr--r--r--   1 root     root           0 Oct 12  2012 name_service_door
# rm name_service_door 
rm: name_service_door not removed: Device busy
# lsof name_service_door 

Obviously some process is still using it. However, lsof does not display anything. From a "ps -elf" is is also not clear who is using this. How can I get rid of this file?

Update: I rebootet the server, which of course killed all processes and thus released the file. I could then remove it. But still, I would be interested in knowing how to do this without rebooting (in production environments, that is not allways an option).

0

To find out what set or installed the file. As root run this command.

pkgchk -l -p /files
  • tells you what packages where used to create the file you give in the command.

Example

pkgchk -l -p *path to file*/name_service_door

This will not work, if the file was not added with a package. For example you installed it using a tar file.

If the file was installed via a package then you can remove the package and this will remove the file.

As root

pkgrm packagename

You ac also stop or restart the service with the svcadm command.

As root

svcadm [enable|disable|restart|refresh] service

I hope this helps

| improve this answer | |
  • Unfortunatly, the file did not come directly from a package, but was created with a script wich came from a package (which I am building). So the above command does not really help (I tried it). – Isaac Feb 24 '14 at 14:44
  • Sorry that it didn't help – Cyberninja Feb 24 '14 at 14:58
0

It turns out it was a mount inside a chroot, so after unmounting it, I could remove it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.