[Clug-tech] Serve HTTP files from server via NFS over NFS

Gustin Johnson gustin at echostar.ca
Wed Jul 28 19:56:40 PDT 2010


On 10-07-28 07:15 PM, clug-lists at vlietwerkz.ca wrote:
>  Hey all,
> 
> I'm wondering if anyone's ever tried this or might know why it's not
> working...
> 
> 2 CentOS 5 servers
> One hosting an HTTP daemon: "prod"
> One hosting files: "archive"
> 
> 1 D-LINK DNS 328 NAS hosting large files accessible via "archive".  This
> one is know as "nas"
> 
> I'm trying to serve files from "nas" via the httpd service on "prod". 
> 
> "prod" can access an NFS share on "archive"
> 
> within that share location, there is another NFS mount pointing to files
> on "nas"
> 
> web client --> "prod" --> "archive" --> "nas" --> (big files)
> 
> I used  # mount --bind /var/data/mirror/bigfiles /var/data/nas/bigfiles
> to put the files that are on the NAS into the mirror directory.  
> Well...  it didn't work.  The directory /var/data/mirror/bigfiles

That is not specific enough.  Are there errors in the apache logs
(likely permission denied errors).  Since you are using NFS your UIDs
and GUIDs need to be the same for all 3 machines.  You could just chmod
777 the files but just thinking about that will keep me up at night.

> doesn't show up on the web site.  Kind of at a bit of a loss here - I
> was under the impression that when you bound a directory using "# mount
> --bind", that it was indistinguishable from an actual folder.
> 
I think you are confused here.  From the mount man page:

The bind mounts.
Since Linux 2.4.0 it is possible to remount part of the file hierarchy
somewhere else. The call is
    mount --bind olddir newdir
         or shortoption
    mount -B olddir newdir
         or fstab entry is:
    /olddir /newdir none bind

After this call the same contents is accessible in two places.  One can
also remount a single file (on a single file).

This call attaches only (part of) a single filesystem, not possible
submounts. The entire file hierarchy including submounts is attached a
second place using
     mount --rbind olddir newdir
         or shortoption
     mount -R olddir newdir

Note  that  the  filesystem  mount  options  will  remain  the same as
those on the original mount point, and cannot be changed by passing the
-o option along with --bind/--rbind. The mount options can be changed by
a separate remount command, for example:

     mount --bind olddir newdir
     mount -o remount,ro newdir


> Any thoughts anyone?

Hth,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://clug.ca/pipermail/clug-tech_clug.ca/attachments/20100728/ec34ad98/attachment.bin>


More information about the clug-tech mailing list