While I perform "swinstall" on HP-UX, this error appeared on system logs. And I couldn't perform depot installation on HP-UX. I 'll try to explain how to fix this issue.
Error:
"testmachine:/": This target or source is already in use either
within this same session or by another session. A read or
write lock was denied.
Step 1: Check swinstall/swremove process
First you need to check if is there any swinstall or swremove process which hangs.
#ps -ef|egrep 'swinstall|swremove' # ps -ef|grep swag root 2156 1 0 Apr 18 ? 0:11 /usr/sbin/swagentd -r
If you get any process which hangs ,kill the process and try again.
Step 2: Restart swagentd service
If you still get the same error. Then restart "swagentd" .
# /sbin/init.d/swagentd stop # /sbin/init.d/swagentd start
Step 3: Mv swlock file and restart swagentd
If these 2 steps didn't fix your problem, then you could mv swlock file and restart swagentd process. This step will fix the problem.
#mv /var/adm/sw/products/swlock /var/adm/sw/products/swlock.original # /sbin/init.d/swagentd stop # /sbin/init.d/swagentd start