« Previous Next »

Thread: NFS Caching issue

Last post 10-20-2009 10:14 AM by Smatchimo. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 10-14-2009, 2:48 PM

    NFS Caching issue

    We are using Windows 2008 R2 with IIS 7.5, and the Client for NFS feature in 2008 R2. The web servers are sitting behind Windows 2008 R2 domain controllers using the UNIX Identity Mapping service.

    Web content is saved on a NFS share, which IIS is able to access using a UNC path. The problem is IIS seems to be caching the files too much and not realizing when they are changing. 

    Let's say a site has a default.aspx page. If the file on the NFS share is modified remotely, IIS continues to serve the old file. If the file is deleted completely IIS continues to serve the old file instead of saying 404 not found. Only if the site is stopped/started then it realizes the file has changed.

    If the default.aspx file is local instead of on a NFS share these are not issues.

    Also lets say we have two servers, Web1 and Web2, both serving the same files from a NFS share. If I map a network drive to the NFS share on Web1, and edit the file with Notepad, then IIS on Web1 realize it changes and serves the updated content right away, but Web2 continues to serve the old version of the file.

    These servers are for a shared hosting environment, where customers will be able to upload new content via a separate FTP server. So currently they may update files, delete files, etc on the FTP server, yet IIS will continue serving the old content unless we stop/start the site, which is a problem.

    It isn't Client for NFS itself that's doing this caching, because I can modify a file remotely, then if I open it up in Notepad over the mapped drive to the NFS share, I see the changes already. So Explorer isn't doing any caching anyway but IIS is. I'm not sure what mechanism IIS uses to detect if files change or not but it doesn't seem to work when serving files off of a NFS share.

    We are using NFS because that is what our SAN supports, we don't have the extra expensive licenses to use cifs/SMB shares on it, and if we did it would also make it way more complicated to configure as we'd have to configure the SAN so it knew how to map Windows users to UNIX users, instead of letting the 2008 R2 domain controllers handle that in a much simpler fashion.

  • 10-18-2009, 3:25 AM In reply to

    Re: NFS Caching issue

    This sounds like you need to report it to whatever group handles the NFS client - IIS I believe watches the directory for change notifications - That may be the wrong term for this but it's a standard Win32 / .Net function I'm 99+ % sure.  If that isn't working IIS won't detect the directory changed and won't re-read the file.

    Interesting setup, personally i never even considered NFS for the central storage for IIS hosting but it should work fine and allows you to have an easier setup for ftp / etc. since you likely have that already for *nix hosting.

    Good luck,

    Steve Radich - President
    BitShop.com - IIS Cloud Solution Coming Soon - Join our "Free 3 Month Beta" Waiting List Now...
  • 10-20-2009, 10:14 AM In reply to

    Re: NFS Caching issue

    I posted a similar question on the general Windows Server forums.

    "According to the description, the issue seems to be related to IIS. As we mainly focus on the general question about Windows Server system and here is not the best support resource for IIS, it is recommend you to get further support in the corresponding forum."

    I guess we will have to burn a support ticket on this one ;-)

    IIS is definitely aware of the NFS share somehow though. For example you can set the home directory, log directory paths, etc to a UNC path which points at a NFS share. If you go into Windows Explorer you cannot use a UNC path to access the NFS share, you have to do 'map network drive' and use the local drive letter to access the files, unlike how IIS does it.

Page 1 of 1 (3 items)
Microsoft Communities