ok, i find some info about my problem flock is not working on solaris, replacement is lockf http://man-wiki.net/index.php/3:lockf .......... int lockf(int fd, int cmd, off_t len); .......... i fix glusterfsd.c (it's compiling), but i can't find any info how i can calculate filesize for "len" arg i.e. lockf - apply, test or remove a POSIX lock on a _section_ of an open file, and for locking file (not section) we need filesize. any ideas ?