[mod_disk_cache ] Cache Sharing Over NFS issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,

I am facing a similar problem with same configuration of mod_disk_cache as http://httpd.markmail.org/message/di37llxqakennodv?q=NFS&page=4
But, that is a question of 2008 and still remains unanswered on the httpd mailing list.

I am trying to share a NFS mount between two physical machines running mod_cache_disk module, so that both machines should be able to share the cached data. These two cache servers are behind a load balancer which routes incoming requests in round-robin fashion.

The mounts were owned by "cacheUser" and this user has read/write permissions to mounted directory. Also, the running process of httpd was owned by the same user "cacheUser".

After a lot of investigation, I found out, that the code in file "mod_cache_disk.c" has logic as below:

This snippet belongs to function open_entity().

/* Atomic check - does the body file belong to the header file? */
        if (dobj->disk_info.inode == finfo.inode &&
                dobj->disk_info.device == finfo.device) {

            /* Initialize the cache_handle callback functions */
            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00709)
                    "Recalled cached URL info header %s", dobj->name);

            /* make the configuration stick */
            h->cache_obj = obj;
            obj->vobj = dobj;

            return OK;
        }


I believe, checking the inode prevents different machines to share the same data over NFS. Also, the device ID for mounted folder changes.
Hence, this check fails.

And I get  error in log which is part of this code section :-
/* Oh dear, no luck matching header to the body */
    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00710)
            "Cached URL info header '%s' didn't match body, ignoring this entry",
            dobj->name);




I would like to know what is the reason behind using this logic of checking the inode instead of the actual contents?


Regards,
Akshay Patil

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux