Once you become familiar with file collections and have worked with the delivered system collections, you might want to create your own. You can build a file collection for any group of files that you want to have identically replicated on nodes and servers in your system. These file collections must all reside on the control workstation or a boot-install server. Some good candidates for file collections are application data files or local tools.
The basic procedure to build a file collections is:
After you build your file collections, you can install them on other servers or nodes.
This section provides examples showing you how to build a primary file collection for a set of local tools in the /usr/local directory for the control workstation and boot-install servers.
Before you build a file collection of your own, be sure you understand the directory and master files, what they contain, and how they work. Refer to Understanding file collections if you need to review these concepts.
The files you want to collect as a group must all reside on the same system from which you want to serve this collection and their permissions must allow them to be readable by everyone.
In this example, the files will be served from the control workstation so they must all reside there in /usr/local.
Create a directory in /var/sysman/sup that will be the name of your file collection and change its owner and group to bin.
This file collection will be called tools.
cd /var/sysman/sup mkdir tools chown bin tools chgrp bin tools
Create a list file to describe the rules for including and excluding files in that directory. Refer to Understanding the supper list file for details.
The easiest way to create these files is to copy them from an existing file collection directory, delete those you do not need or the system creates, and modify them as required.
cp -p sup.admin /* tools cd tools rm when last scan
Modify the list, adding these commands:
| symlinkall | omitany backup.* | omit ./usr/local/admin | upgrade ./usr/local | always ./usr/local/admin/control_file | execute /usr/local/refresh_fonts (./usr/local/fonts)
This instructs supper to:
The lists file in the /var/sysman/sup directory contains a symbolic link to the list file in each file collection. When you create a new file collection you must add a link to this file.
Add a link pointing to the list file in the tools collection:
ln -s /var/sysman/sup/tools/list /var/sysman/sup/lists/tools
Edit /var/sysman/file.collections using your text editor. Add the name of your new file collection as either a primary or secondary file.
The tools collection is a primary collection and requires an entry similar to server.root. Edit /var/sysman/file.collections and add these lines to the end:
# tools - boot-install collection to manage local tools files on the file servers primary tools - / - / EDO power no
The nine fields in this entry have specific meaning to supper:
The .resident file contains a list identifying all the SP file collections. Edit the .resident file on each node and boot install server on which the file resides and add your new collection.
Add the tools file collection to the /var/sysman/sup/.resident file:
sup.admin 0 user.admin 0 power_system 0 tools 0
The scan file provides you with a list of files in the collection that you can use for verification and eliminates the need for supper to do a directory search on each update. If your directory tree is extensive, this can save processing time on large file systems.
Note |
---|
You must keep the scan file current. When a scan file is present, the update command reads it as an inventory of the files in the collection and does not do the directory search. If you fail to create a new scan file when you add, modify, or delete files in the master collection, the file will not be current and supper will not upgrade the collection correctly. |
To create a scan file for the tools file collection, enter:
/var/sysman/supper scan tools