[ Pobierz całość w formacie PDF ]
.NFS replaces the HTTP or FTP schema and needs to be implemented directly into thebrowser.The default port number is 2049; if the port is omitted, it defaults to 2049.This isthe NFS port for TCP connections.The directory structure just shown is actually a relativepath from a base that the NFS server understands.Sun Microsystems suggests that WebNFS might be a technology proposal to replace, or bepart of, the next generation of HTTP, currently being worked on by members of the WorldWide Web Consortium (W3C).How to Enable WebNFS AccessStarting with Solaris 2.6, all file systems available for NFS mounting are automaticallyavailable for WebNFS access.To manually configure a file system for WebNFS access,follow these steps:1.Edit the /etc/dfs/dfstab file.Add one entry to the /etc/dfs/dfstab file for the file systemyou want shared automatically.The index tag is optional, but the public option enablesNFS browsing of the file system by a WebNFS-enabled browser (see Table 18-2):share -F nfs -o ro,public,index=index.html /export/ftp2.Check that the NFS service is running on the server.If this is the first share command(or set of share commands) that you have initiated, it is likely that the NFS daemonsare not running.The following commands kill and restart the daemons:/etc/init.d/nfs.server stop/etc/init.d/nfs.server start21 2496 Ch18 8/30/00 1:22 PM Page 451CACHEFS 4513.Share the file system.After the entry is in /etc/dfs/dfstab, the file system can beshared either by restarting the system or by using the shareall command.If the NFSdaemons were restarted in step 2, this command does not need to be run, because theinit.d script runs the command.shareall4.Verify that the information is correct.Execute the share command to check that thecorrect options are listed:shareThe system should respond with output that looks something like this:- /export/share/man ro - /usr/src rw=eng - /export/ftp ro,public,index=index.html Using a Browser to Access an NFS URLBrowsers that can support WebNFS access should provide access using an NFS URL thatlooks something like this:nfs://:/server is the name of the file server, port is the port number to use (the default value is2049), and path is the path to the file or file system.The path can be either relative to thepublic file handle or relative to the root file system on the server.NOTE.Make sure your browser supports WebNFS.If it doesn t, you ll get an error similarto the following: NFS URLs are not supported. Currently, Sun s HotJava browser supportsWebNFS, and Netscape says that it will provide support in a future release.Microsoft sInternet Explorer does not support WebNFS.You can enable WebNFS access for clients that are not part of the local subnet by configuringthe firewall to enable a TCP connection on port 2049.Just allowing access for httpd doesnot allow NFS URLs to be used.CacheFSA fundamental factor in computer performance is file access time.In a networked environ-ment using NFS, every file access request across the network affects performance.TheCache File System (CacheFS) can be used to improve performance of NFS mounted file21 2496 Ch18 8/30/00 1:22 PM Page 452452 CHAPTER 18 THE NFS ENVIRONMENTsystems or slow devices such as a CD-ROM.When a file system is cached, the data readfrom the remote file system or CD-ROM is stored in a cache on the local system s disk.First, let s introduce some terms:Back file system The file system on the remote host, or CD-ROM, that is beingcached.Typically this is an NFS or HSFS file system.Files in the back file system arecalled back files.Front file system The file system that contains the cached data, typically a UFS filesystem.Files in the front file system are called front files.Cached file system The file system that resides on the local disk.Files in it arecached files.Cache directory The directory on the local disk where the data for the cached filesystem is stored.Cold cache A cache that does not yet have any data in its front file system.To createa cache, requested data must be copied from the back file system to the front filesystem.This is referred to as populating the cache.An attempt to reference data thatis not yet cached is referred to as a cache miss.Warm cache A cache that contains the desired data in its front file system.Requested data is available to the user without requiring any action from the back filesystem.An attempt to reference data that is already cached is referred to as a cache hit.Creating the CacheA cache must exist before a CacheFS mount can be performed.No special disk partitioningis required for cache creation.A cache file system may be created in a subdirectory of anexisting file system, or you can dedicate an entire file system to caching.The only requirementis that you create the cache in mounted local file systems.The cfsadmin command createsthe local cache.NOTE
[ Pobierz całość w formacie PDF ]