|
|||
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) How to Mount a CacheFS File System (/etc/vfstab) How to Mount a CacheFS File System (AutoFS) 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 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) |
Maintaining a CacheFS File SystemThis section describes how to maintain a CacheFS file system. If you are using the /etc/vfstab file to mount file systems, you modify the cache by editing the file system options in the /etc/vfstab file. If you are using AutoFS, you modify the cache by editing the file system options in the AutoFS maps. Modifying a CacheFS File SystemWhen you modify a file system in the cache, you need to delete the cache and then re-create it. You might also need to reboot your machine in single-user mode, depending on how your file systems are shared and accessed. In the following example, the cache is deleted, re-created, and then mounted again by using demandconst option specified for the /docs file system. # shutdown -g30 -y . . . Root password for system maintenance (control-d to bypass): single-user privilege assigned to /dev/console. . . . Here is where you might be prompted to run fsck on the file system where the cache is located. # fsck /local # mount /local # cfsadmin -d all /local/mycache # cfsadmin -c /local/mycache # init 6 . . . console login: password: # mount -F cachefs -o backfstype=nfs,cachedir=/local/cache1,demandconst merlin:/docs /docs # How to Display Information About a CacheFS File System
The following example shows information about the /local/mycache cache directory. In this example, the /docs file system is cached in /local/mycache. The last line displays the name of the CacheFS file system. # cfsadmin -l /local/mycache cfsadmin: list cache FS information maxblocks 90% minblocks 0% threshblocks 85% maxfiles 90% minfiles 0% threshfiles 85% maxfilesize 3MB merlin:_docs:_docs # Consistency Checking of a CacheFS File SystemTo ensure that the cached directories and files remain current, the CacheFS software periodically checks the consistency of files stored in the cache. To check consistency, the CacheFS software compares the current modification time to the previous modification time. If the modification times are different, all data and attributes for the directory or file are purged from the cache. Then, new data and attributes are retrieved from the back file system. Consistency Checking on DemandConsistency checks can be performed only when you explicitly request checks for file systems that are mounted by using the -o demandconst option. If you mount a file system in a cache with this option, then use the cfsadmin command with the -s option to request a consistency check. By default, consistency checking is performed file by file as the files are accessed. If no files are accessed, no checks are performed. Using the -o demandconst option avoids the situation where the network is flooded with consistency checks. For more information, see mount_cachefs(1M). How to Specify Cache Consistency Checking on Demand
How to Delete a CacheFS File System
The following example shows how to delete the file systems from the cache. # umount /cfssrc # cfsadmin -l /cfssrc # cfsadmin -d _dev_dsk_c0t6d0s0:_cfssrc # cfsadmin -l # fsck -F cachefs /cache-directory How to Check the Integrity of a CacheFS File SystemUse the fsck command to check the integrity of CacheFS file systems. The CacheFS version of the fsck command automatically corrects problems without requiring user interaction. You should not need to run the fsck command manually for CacheFS file systems because the fsck command is run automatically at boot time or when the file system is mounted. If you want to manually check the integrity, you can use the following procedure. For more information, see fsck_cachefs(1M).
The following example shows how to check the file systems cached in the /local/mycache cache. # fsck -F cachefs /local/mycache # |
||
|