|
|||
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 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 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) |
Packing a CacheFS File SystemFor general use, the CacheFS software operates automatically after it is set up, without requiring any action from the user. Files are cached on a most recently used basis. With the packing feature, you can take a more active role in managing your cache by ensuring that certain files or directories are always updated in the cache. You can specify files and directories to be loaded in the cache by using the cachefspack command. This command ensures that current copies of these files are available in the cache. The packing list contains the names of specific files and directories. The packing list can also contain other packing lists. This feature saves you from having to specify individual files and directories when you have many items to pack in your cache. You can print out a brief help summary of all the cachefspack options by using the -h option as follows: $ cachefspack -h Must select 1 and only 1 of the following 5 options -d Display selected filenames -i Display selected filenames packing status -p Pack selected filenames -u Unpack selected filenames -U Unpack all files in directory 'dir' -f Specify input file containing rules -h Print usage information -r Interpret strings in LIST rules as regular expressions -s Strip './' from the beginning of a pattern name -v Verbose option files - a list of filenames to be packed/unpacked How to Pack Files in the Cache
The following example shows the projects file being packed in the cache. $ cachefspack -p projects The following example shows three files being packed in the cache. $ cachefspack -p projects updates master_plan The following example shows a directory being packed in the cache. $ cachefspack -p /data/abc/bin How to Display Packed Files Information
The following example shows that the doc_file file has been successfully packed. $ cachefspack -i doc_file cachefspack: file doc_file marked packed YES, packed YES In the following example, the /data/abc directory contains the bin subdirectory. The bin subdirectory has three files: big, medium, and small. Although the big and small files are specified to be packed, they are not. The medium file is successfully packed. $ cd /data/abc $ cachefspack -i bin . . . cachefspack: file /bin/big marked packed YES, packed NO cachefspack: file /bin/medium marked packed YES, packed YES cachefspack: file /bin/small marked packed YES, packed NO . . . If you use the -iv options together, you get additional information as to whether the file or directory specified has been flushed from the cache. For example: $ cd /data/bin FSCACHEPACK-4$ cachefspack -iv bin . . . cachefspack: file /bin/big marked packed YES, packed NO, nocache YES cachefspack: file /bin/medium marked packed YES, packed YES, nocache NO cachefspack: file /bin/small marked packed YES, packed NO nocache NO . . . The last line of this example shows that the directory contents have not been flushed from the cache. Using Packing ListsOne feature of the cachefspack command is the ability to create packing lists. A packing list contains files or directories to be packed in the cache. If a directory is in the packing list, all of its subdirectories and files will also be packed. This feature saves the time of having to specify each individual file that you want packed in the cache. How to Create a Packing List
The following example shows the contents of a packing list file. BASE /home/ignatz LIST plans LIST docs IGNORE *.ps
How to Pack Files in the Cache With a Packing List
This example uses the list.pkg file as the packing list for the cachefspack command. $ cachefspack -f list.pkg Unpacking Files or Packing Lists From the CacheYou might need to remove, or unpack, a file from the cache. Perhaps you have some files or directories that have a higher priority than others, so you need to unpack the less critical files. For example, you finished up a project and have archived the files that are associated with that project. You are now working on a new project, and therefore, a new set of files. How to Unpack Files or Packing Lists From the Cache
The following example shows the file /data/abc/bin/big being unpacked from the cache. $ cachefspack -u /data/abc/bin/big The following example shows three files being unpacked from the cache. $ cd /data/abc/bin/big $ cachefspack -u big small medium The following example shows how to unpack a packing list. A packing list is a file that contains the path to a directory of files: $ cachefspack -uf list.pkg The following example uses the -U option to specify that all files in a cache directory being unpacked. $ cachefspack -U /local/mycache You cannot unpack a cache that does not have at least one file system mounted. With the -U option, if you specify a cache that does not contain mounted file systems, output similar to the following is displayed: $ cachefspack -U /local/mycache cachefspack: Could not unpack cache /local/mycache, no mounted filesystems in the cache. Troubleshooting cachefspack ErrorsYou might see the following error messages when you use the cachefspack command. cachefspack: pathname - can't open directory: permission denied
cachefspack: pathname - can't open directory: no such file or directory
cachefspack: pathname - can't open directory: stale NFS file handle
cachefspack: pathname - can't open directory: interrupted system call
cachefspack: pathname - can't open directory: I/O error
cachefspack: error opening dir
cachefspack: unable to get shared objects
cachefspack: filename - can't pack file: permission denied
cachefspack: filename - can't pack file: no such file or directory
cachefspack: filename- can't pack file: stale NFS file handle
cachefspack: filename- can't pack file: interrupted system call
cachefspack: filename- can't pack file: I/O error
cachefspack: filename- can't pack file: no space left on device.
cachefspack: filename - can't unpack file: permission denied
cachefspack: filename - can't unpack file: no such file or directory
cachefspack: filename- can't unpack file: stale NFS file handle
cachefspack: filename- can't unpack file: interrupted system call
cachefspack: filename- can't unpack file I/O error
cachefspack: only one `d', `i', `p', or `u' option allowed
cachefspack: can't find environment variable.
cachefspack: skipping LIST command - no active base
|
||
|