Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cfs(4)

cfsi(8)

cfse(8)

cfst(8)

cmount(8)

CFM(8)  —  Maintenance

NAME

cfm − composite filesystem manager

SYNOPSIS

cfm function argument ... 

DESCRIPTION

cfm is a command procedure used to manage files and directories on volumes in a Composite File System.  The procedure implements functions analogous to the shell file management commands cp, mv, ln, rm, chmod, chown, chgrp, mkdir and rmdir for use with files and directories in the model file space of a Composite File System (see cfs(4)).  function is one of these file management commands, while the arguments are file or directory path names appropriate to the function.

cfm is used primarily to insert existing files into a CFS file space or to rename or delete files while keeping the volumes comprising the file space synchronized with the CFS model, without incurring the time or space overhead of the CFS file transfer procedure (cfst or cfsd). To avoid confusing the CFS transfer procedure, files or directories in a CFS file space to be managed by cfm must be referenced via the CFS model directory, not the CFS mount point directory.  However, the contents of existing files in a CFS file space may only be accessed or altered via the CFS mount point. 

The procedure accesses and posts data in one or more of the files in the CFS tally or alias directories.  Files in the tally directory are named with the index node (inode) numbers of directories in the CFS model and identify volumes in the CFS file space where instances of each directory in the model reside.  Files in the alias directory are named with the index node (inode) numbers of file links in the CFS model and contain the path names of corresponding files residing on volumes in the CFS file space. 

When preparing to transfer a file to a volume in the CFS file space, the file management procedure selects a volume which already contains files in the same directory in the CFS model as the file to be transferred, if any have enough free space to hold the file; if not, it widens its search to encompass volumes containing portions of the parent of that directory, then its parent, and so on until a suitable volume is found.  This method tends to group files with similar paths together on the same volumes, and keeps files with divergent paths separated on different volumes. 

If several volumes are identified at any step, the one with the most space is chosen.  If no volume is found with enough space to accomodate a file, the file cannot be transferred until another volume has been included in the model (see cfsi(8)).  Once a volume has been identified, the file is transferred to the volume and a link to the file is created in the model. 

NOTES

The cp function preserves the attributes (user, group and mode) of files when copying.  The cp and mv functions do not destroy existing files.  The cp and rm functions operate recursively (inserting or deleting the contents of entire directory sub-trees).  The rm and rmdir functions force removal whenever possible (deleting protected items in unprotected directories).  The ln function accepts the −s option to create symbolic links. 

EXAMPLES(CFS model /set mounted on /see)

To transfer all the files in a sub-tree at /usr/src to a
directory of the same name in the CFS:

# cfm cp /usr/src /set

To transfer all the files in a sub-tree at src in the CFS
to a directory of the same name in /tmp:

# cp -r /see/src /tmp

To transfer all the files in a sub-tree at src in the CFS
to a directory dst in the same CFS:

# cfm cp /see/src /set/dst

To rename a directory in the CFS from dst to src:

# cfm mv /set/dst /set/src
or

# cd /set
# cfm mv dst src

To move all the files from a directory src in the CFS to
an existing directory dst in the same CFS:

# cfm mv /set/src/∗ /set/dst
or

# cd /set/src
# cfm mv ∗ ../dst

FILES

model/.= directory index map

model/.:/<index> per-directory tally

model/.#/<index> transparent "alias"

model/.%/<index> duplicate file link

BUGS

The cp function converts linked instances of a file into multiple files. 

The cp function cannot be used to copy files out of a CFS model file space; the cp shell command must be used to access files via the CFS mount point. 

To replicate files within a CFS file space using the cp function, specify the origin relative to the CFS mount point and the destination relative to the CFS model directory. 

The mv function cannot be used to move files into or out of a CFS model file space; such a move must be performed by first copying the files to or from the CFS model using the cp function or shell command and then deleting the unwanted copy using the rm shell command or function, respectively. 

SEE ALSO

cfs(4), cfsi(8), cfse(8), cfst(8), cmount(8)

  —  10 February 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026