Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to list locked files

795934May 25 2008 — edited May 25 2008
I had a Windows XP NFS client which had mapped files on a s10s_u3wos_10 SPARC server, but then the client crashed.

After a re-boot of the client it is reporting locking violations on some files. A network capture confirmed that the NFS server is reporting a status of NLM_DENIED.

I would like to get the list of locked files, to check if any are corrupted.

However, can't find out how to do that on the NFS server.

Found [lslk Revision 1.29|http://chuck.netbsd.sk/source/xref/lslk/lslk_1.29/], but can't get lslk to compile under Solaris 10. Reports errors in the dlock.c file which has conditional compilation on the Solaris version, and lslk hasn't been updated since Solaris 8.

e.g. after an attempt to hack the Configure script to "recognise" Solaris 10 the compile failed with:
bash-3.00$ Configure solaris
Testing gcc for 64 bit support

*********************************
* Configuring for 64 bit kernel *
*********************************


This configuration step (the Inventory script) takes inventory of
the lslk distribution.  The script runs for a minute or two while
it checks that all the subdirectories, information files, scripts,
header files and source files that should be present really are.

It's not absolutely necessary that you take inventory, but it's a
good idea to do it right after the lslk distribution has been
unpacked.  Once the inventory has been taken, this script creates
the file ./.ckMANIFEST as a signal that the inventory step has been
done.

You can call the Inventory script directly at any time to take
inventory.  You can inhibit the inventory step permanently by
creating the file ./.neverInv, and you can tell the Configure script
to skip the inventory and customization steps with the -n option.

Do you want to take inventory (y/n)? n
rm -f dmnt.c dlock.c dlock1.c dstore.c dlslk.h dproto.h kernelbase.h machine.h machine.h.old new_machine.h Makefile
ln -s dialects/solaris/dlock.c dlock.c
ln -s dialects/solaris/dmnt.c dmnt.c
ln -s dialects/solaris/dlslk.h dlslk.h
ln -s dialects/solaris/dproto.h dproto.h
ln -s dialects/solaris/dstore.c dstore.c
ln -s dialects/solaris/machine.h machine.h
kernelbase.h assembled.
Makefile created.
bash-3.00$ make
gcc -O  -Dsolaris=100000 -m64   -c  dlock.c
In file included from /usr/include/sys/processor.h:21,
                 from /usr/include/sys/pset.h:18,
                 from /usr/include/sys/zone.h:15,
                 from /usr/include/sys/flock.h:24,
                 from dlslk.h:75,
                 from lslk.h:51,
                 from dlock.c:41:
/usr/include/sys/procset.h:131: error: syntax error before "sigsend_t"
/usr/include/sys/procset.h:132: error: syntax error before "sigsend_t"
In file included from /usr/include/sys/flock.h:24,
                 from dlslk.h:75,
                 from lslk.h:51,
                 from dlock.c:41:
/usr/include/sys/zone.h:303: error: syntax error before "rc_zone_nlwps"
dlock.c: In function `gather_lock_info':
dlock.c:155: error: request for member `v_filocks' in something not a structure or union
dlock.c:155: error: request for member `v_count' in something not a structure or union
dlock.c:169: error: request for member `v_filocks' in something not a structure or union
dlock.c:172: error: request for member `v_filocks' in something not a structure or union
dlock.c:189: error: request for member `v_filocks' in something not a structure or union
dlock.c: In function `readsysids':
dlock.c:571: error: structure has no member named `next'
dlock.c: In function `savelock':
dlock.c:696: error: request for member `v_type' in something not a structure or union
*** Error code 1
make: Fatal error: Command failed for target `dlock.o'
bash-3.00$
Does Solaris 10 come with a command to list locked files, or are there any other programs like lslk known to work with Solaris 10?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2008
Added on May 25 2008
1 comment
450 views