|
||||||||||||||||||||||||||||||
1. Managing Removable Media (Overview) 2. Managing Removable Media (Tasks) 3. Accessing Removable Media (Tasks) 4. Writing CDs and DVDs (Tasks) 5. Managing Devices (Overview/Tasks) 6. Dynamically Configuring Devices (Tasks) 7. Using USB Devices (Overview) 9. Using InfiniBand Devices (Overview/Tasks) 11. Administering Disks (Tasks) 12. SPARC: Adding a Disk (Tasks) 13. x86: Adding a Disk (Tasks) 14. Configuring Solaris iSCSI Targets and Initiators (Tasks) 15. Configuring and Managing the Solaris Internet Storage Name Service (iSNS) 16. The format Utility (Reference) 17. Managing File Systems (Overview) 18. Creating UFS, TMPFS, and LOFS File Systems (Tasks) 19. Mounting and Unmounting File Systems (Tasks) 20. Using The CacheFS File System (Tasks) High-Level View of Using the CacheFS File System (Task Map) Overview of the CacheFS File System Creating and Mounting a CacheFS File System (Task Map) How to Mount a CacheFS File System (mount) Maintaining a CacheFS File System (Task Map) Maintaining a CacheFS File System How to Display Information About a CacheFS File System How to Specify Cache Consistency Checking on Demand How to Delete a CacheFS File System How to Check the Integrity of a CacheFS File System Packing a Cached File System (Task Map) How to Pack Files in the Cache How to Display Packed Files Information How to Pack Files in the Cache With a Packing List How to Unpack Files or Packing Lists From the Cache Collecting CacheFS Statistics (Task Map) How to Locate the CacheFS Log File How to View the Working Set (Cache) Size How to View CacheFS Statistics 21. Configuring Additional Swap Space (Tasks) 22. Checking UFS File System Consistency (Tasks) 23. UFS File System (Reference) 24. Backing Up and Restoring File Systems (Overview) 25. Backing Up Files and File Systems (Tasks) 26. Using UFS Snapshots (Tasks) 27. Restoring Files and File Systems (Tasks) 28. UFS Backup and Restore Commands (Reference) 29. Copying UFS Files and File Systems (Tasks) |
Creating and Mounting a CacheFS File System (Task Map)Use the procedures in this task map to create and mount a CacheFS file system.
How to Create the Cache
The following example shows how to create a cache in the /local/mycache directory by using the default cache parameter values. # mkdir /local # cfsadmin -c /local/mycache Mounting a File System in the CacheYou specify a file system to be mounted in the cache so that users can locally access files in that file system. The files do not actually get placed in the cache until the user accesses the files. The following table describes three ways to mount a CacheFS file system.
Choose the method of mounting file systems that best suits your environment. You can mount only file systems that are shared. For information on sharing file systems, see share(1M). Note - The caching of the root (/) and /usr file systems is not supported in a CacheFS file system. How to Mount a CacheFS File System (mount)
The following example shows how to mount the NFS file system merlin:/docs as a CacheFS file system named /docs in the cache named /local/mycache. # mkdir /docs # mount -F cachefs -o backfstype=nfs,cachedir=/local/mycache merlin:/docs /docs The following example shows how to make a Solaris 9 SPARCTM CD (HSFS file system) available as a CacheFS file system named /cfssrc. Because you cannot write to the CD, the ro argument is specified to make the CacheFS file system read-only. This example assumes that the removable media services are not running. # mount -F hsfs -o ro /dev/dsk/c0t6d0s0 /sol9 # mount -F cachefs -o backfstype=hsfs,cachedir=/cfs/cache,ro,noconst, backpath=/sol9 /dev/dsk/c0t6d0s0 /cfssrc # ls /cfssrc Copyright Solaris_9 The following example shows how to mount a Solaris 9 SPARC CD as a CacheFS file system with vold running. # mount -F cachefs -o backfstype=hsfs,cachedir=/cfs/cache,ro,noconst, backpath=/cdrom/sol_9_sparc/s0 /vol/dev/dsk/c0t2d0/sol_9_sparc/s0 /cfssrc The following example shows how to mount a CD as a CacheFS file system with vold running. # mount -F cachefs -o backfstype=hsfs,cachedir=/cfs/cache,ro,noconst, backpath=/cdrom/epson /vol/dev/dsk/c0t2d0/epson /drvrs The following example uses the demandconst option to specify consistency checking on demand for the NFS CacheFS file system /docs, whose back file system is merlin:/docs. For more information, see Consistency Checking of a CacheFS File System. # mount -F cachefs -o backfstype=nfs,cachedir=/local/mycache,demandconst merlin:/docs /docs How to Mount a CacheFS File System (/etc/vfstab)
The following example shows the /etc/vfstab entry for the /data/abc directory from the remote system starbug that is mounted in the cached directory, /opt/cache. #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # starbug:/data/abc /local/abc /opt/cache cachefs 7 yes local-access,bg, nosuid,demandconst,backfstype=nfs,cachedir=/opt/cache How to Mount a CacheFS File System (AutoFS)You can mount a file system in a cache with AutoFS by specifying the -fstype=cachefs mount option in your automount map. Note that the CacheFS mount options, for example, backfstype and cachedir, are also specified in the automount map. For details on automount maps, see Task Overview for Autofs Administration in System Administration Guide: Network Services or automount(1M).
The following auto_direct entry automatically mounts the CacheFS file system in the /docs directory. /docs -fstype=cachefs,cachedir=/local/mycache,backfstype=nfs merlin:/docs |
|||||||||||||||||||||||||||||
|