JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

About This Book

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)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Setting Up Disks (Tasks)

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating and Mounting File Systems (Tasks)

18.  Using The CacheFS File System (Tasks)

High-Level View of Using the CacheFS File System (Task Map)

Overview of the CacheFS File System

How a CacheFS File System Works

CacheFS File System Structure and Behavior

Creating and Mounting a CacheFS File System (Task Map)

How to Create the Cache

Mounting a File System in the Cache

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

Modifying a CacheFS File System

How to Display Information About a CacheFS File System

Consistency Checking of a CacheFS File System

Consistency Checking on Demand

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)

Packing a CacheFS File System

How to Pack Files in the Cache

How to Display Packed Files Information

Using Packing Lists

How to Create a Packing List

How to Pack Files in the Cache With a Packing List

Unpacking Files or Packing Lists From the Cache

How to Unpack Files or Packing Lists From the Cache

Troubleshooting cachefspack Errors

Collecting CacheFS Statistics (Task Map)

Collecting CacheFS Statistics

How to Set Up CacheFS Logging

How to Locate the CacheFS Log File

How to Stop CacheFS Logging

How to View the Working Set (Cache) Size

Viewing CacheFS Statistics

How to View CacheFS Statistics

19.  Configuring Additional Swap Space (Tasks)

20.  Checking UFS File System Consistency (Tasks)

21.  UFS File System (Reference)

22.  Backing Up and Restoring UFS File Systems (Overview)

23.  Backing Up UFS Files and File Systems (Tasks)

24.  Using UFS Snapshots (Tasks)

25.  Restoring UFS Files and File Systems (Tasks)

26.  UFS Backup and Restore Commands (Reference)

27.  Copying Files and File Systems (Tasks)

28.  Managing Tape Drives (Tasks)

Index

Packing a CacheFS File System

For 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

Example 18-8 Examples—Packing 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

Example 18-9 Displaying 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 Lists

One 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

Example 18-10 Creating 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

Example 18-11 Packing 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 Cache

You 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

Example 18-12 Unpacking 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 Errors

You might see the following error messages when you use the cachefspack command.

cachefspack: pathname - can't open directory: permission denied
Cause

You might not have the correct permissions to access the file or directory.

Action

Set the correct permissions.

cachefspack: pathname - can't open directory: no such file or
directory
Cause

You might not have specified the correct file or directory.

Action

Check for a possible typo.

cachefspack: pathname - can't open directory: stale NFS file handle
Cause

The file or directory might have been moved or deleted from the server at the time you attempted to access it.

Action

Verify that the file or directory on the server is still accessible.

cachefspack: pathname - can't open directory: interrupted system
call
Cause

You might have inadvertently pressed Control-C while issuing the command.

Action

Reissue the command.

cachefspack: pathname - can't open directory: I/O error
Cause

You might have a hardware problem.

Action

Check your hardware connections.

cachefspack: error opening dir
Cause

You might not have specified the correct file or directory. The path identified after the BASE command in the file format could be a file and not a directory. The path specified must be a directory.

Action

Check for a possible typo. Check the path identified after the BASE command in your file format. Ensure that the path identifies a directory, not a file.

cachefspack: unable to get shared objects
Cause

The executable might be corrupt or in a format that is not recognizable.

Action

Replace the executable.

cachefspack: filename - can't pack file: permission denied
Cause

You might not have the correct permissions to access the file or directory.

Action

Set the correct permissions.

cachefspack: filename - can't pack file: no such file or directory
Cause

You might not have specified the correct file or directory.

Action

Check for a possible typo.

cachefspack: filename- can't pack file: stale NFS file handle
Cause

The file or directory might have been moved or deleted from the server at the time you attempted to access it.

Action

Verify that the file or directory on the server is still accessible.

cachefspack: filename- can't pack file: interrupted system call
Cause

You might have inadvertently pressed Control-C while issuing the command.

Action

Reissue the command.

cachefspack: filename- can't pack file: I/O error
Cause

You might have a hardware problem.

Action

Check your hardware connections.

cachefspack: filename- can't pack file: no space left on device.
Cause

The cache is out of disk space.

Action

You need to increase the size of the cache by increasing disk space.

cachefspack: filename - can't unpack file: permission denied
Cause

You might not have the correct permissions to access the file or directory.

Action

Set the correct permissions.

cachefspack: filename - can't unpack file: no such file or directory
Cause

You might not have specified the correct file or directory.

Action

Check for a possible typo.

cachefspack: filename- can't unpack file: stale NFS file handle
Cause

The file or directory might have been moved or deleted from the server at the time you attempted to access it.

Action

Verify that the file or directory on the server is still accessible.

cachefspack: filename- can't unpack file: interrupted system call
Cause

You might have inadvertently pressed Control-C while issuing the command.

Action

Reissue the command.

cachefspack: filename- can't unpack file I/O error
Cause

You might have a hardware problem.

Action

Check your hardware connections.

cachefspack: only one `d', `i', `p', or `u' option allowed
Cause

You specified more than one of these options in a command session.

Action

Select one option for the command session.

cachefspack: can't find environment variable.
Cause

You forgot to set a corresponding environment variable to match the $ in your configuration file.

Action

Define the environment variable in the proper location.

cachefspack: skipping LIST command - no active base
Cause

A LIST command is present in your configuration file but has no corresponding BASE command.

Action

Define the BASE command.