A P P E N D I X  C

Command Reference

The Sun StorEdge QFS and Sun StorEdge SAM-FS environments consist of a file system, daemons, processes, various types of commands (user, administrator, and so on), and tools. This appendix describes the commands that are included in the Sun StorEdge QFS and Sun StorEdge SAM-FS software distributions.

The Sun StorEdge QFS and Sun StorEdge SAM-FS commands operate in conjunction with the standard UNIX file system commands. Some commands are specific to only one product. All the commands are documented in UNIX man(1) pages.

The Sun StorEdge QFS and Sun StorEdge SAM-FS File System Administration Guide contains overview information for the daemons, but individual daemons are described throughout the documentation set where appropriate.

This appendix introduces the commands and indicates which commands you can use with the Sun StorEdge QFS or Sun StorEdge SAM-FS software. See the man pages that are included in the software distribution for more information.

This appendix contains the following topics:

User Commands

By default, file system operations are transparent to the end user. Depending on your site practices, however, you might want to make some commands available to users at your site to fine-tune certain operations. TABLE C-1 summarizes these commands.

TABLE C-1 User Commands

Command

Description

Used By

archive(1)

Archives files and sets archive attributes on files.

Sun StorEdge SAM-FS

release(1)

Releases disk space and sets release attributes on files.

Sun StorEdge SAM-FS

request(1)

Creates a removable media file.

Sun StorEdge SAM-FS

sdu(1)

Summarizes disk usage. The sdu(1) command is based on the GNU version of the du(1) command.

Sun StorEdge QFS

Sun StorEdge SAM-FS

segment(1)

Sets segmented file attributes.

Sun StorEdge SAM-FS

setfa(1)

Sets file attributes.

Sun StorEdge QFS

Sun StorEdge SAM-FS

sfind(1)

Searches for files in a directory hierarchy. The sfind(1) command is based on the GNU version of the find(1) command and contains options for searching based on Sun StorEdge QFS and Sun StorEdge SAM-FS file attributes.

Sun StorEdge QFS

Sun StorEdge SAM-FS

sls(1)

Lists contents of directories. The sls(1) command is based on the GNU version of the ls(1) command and contains options for displaying file system attributes and information.

Sun StorEdge QFS

Sun StorEdge SAM-FS

squota(1)

Reports quota information.

Sun StorEdge QFS

Sun StorEdge SAM-FS

ssum(1)

Sets the checksum attributes on files.

Sun StorEdge SAM-FS

stage(1)

Sets stage attributes on files and copies offline files to disk.

Sun StorEdge SAM-FS


General System Administrator Commands

TABLE C-2 summarizes the commands that you can use to maintain and manage the system.

TABLE C-2 General System Administrator Commands

Command

Description

Used By

samadm(1M)

Starts or stops the sam-mgmtrpcd daemon.

Sun StorEdge QFS

Sun StorEdge SAM-FS

SAM-QFS Manager

samcmd(1M)

Executes one samu(1M) operator interface utility command.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samd(1M)

Starts or stops robotic and removable media daemons.

Sun StorEdge SAM-FS

samexplorer(1M)

Generates a Sun StorEdge QFS or Sun StorEdge SAM-FS diagnostic report script.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samqfsmgr_setup(1M)

Installs, removes, and upgrades the SAM-QFS Manager software

SAM-QFS Manager

samset(1M)

Changes Sun StorEdge SAM-FS settings.

Sun StorEdge SAM-FS

samu(1M)

Invokes the full-screen, text-based operator interface. This interface is based on the curses(3CURSES) software library. The samu utility displays the status of devices and allows the operator to control automated libraries.

Sun StorEdge QFS

Sun StorEdge SAM-FS


File System Commands

TABLE C-3 summarizes the commands that you can use to maintain the file system.

TABLE C-3 File System Commands

Commands

Description

Used By

mount(1M)

Mounts a file system. The man page name for this command is mount_samfs(1M).

Sun StorEdge QFS

Sun StorEdge SAM-FS

qfsdump(1M)

qfsrestore(1M)

Creates or restores a dump file containing the file data and metadata associated with a Sun StorEdge QFS file system.

Sun StorEdge QFS

sambcheck(1M)

Lists block usage for a file system.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samchaid(1M)

Changes file admin set ID attribute. For use with quotas.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samfsck(1M)

Checks and repairs metadata inconsistencies in a file system and reclaims allocated, but unused, disk space.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samfsconfig(1M)

Displays configuration information.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samfsdump(1M)

samfsrestore(1M)

Creates or restores a dump file of the metadata associated with a Sun StorEdge SAM-FS file system.

Sun StorEdge SAM-FS

Sun SAM-QFS

samfsinfo(1M)

Displays information about the layout of a Sun StorEdge QFS or Sun StorEdge SAM-FS file system.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samfstyp(1M)

Determines the Sun StorEdge QFS or Sun StorEdge SAM-FS file system type.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samgrowfs(1M)

Expands a file system by adding disk devices.

Sun StorEdge QFS

Sun StorEdge SAM-FS

sammkfs(1M)

Initializes a new file system from disk devices.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samncheck(1M)

Returns a full directory path name given the mount point and inode number.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samquota(1M)

Reports, sets, or resets quota information.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samquotastat(1M)

Reports on active and inactive file system quotas.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samsharefs(1M)

Manipulates the Sun StorEdge QFS shared file system configuration information.

Sun StorEdge QFS

samtrace(1M)

Dumps the trace buffer.

Sun StorEdge QFS

Sun StorEdge SAM-FS

samunhold(1M)

Releases SANergy file holds.

Sun StorEdge QFS

Sun StorEdge SAM-FS

trace_rotate(1M)

Rotates trace files.

Sun StorEdge QFS

Sun StorEdge SAM-FS


Automated Library Commands

TABLE C-4 summarizes the automated library commands that you can use to configure, initialize, and maintain the automated libraries and devices within the Sun StorEdge SAM-FS environment.

TABLE C-4 Automated Library Commands

Command

Description

auditslot(1M)

Audits a single media cartridge slot within a specified automated library.

build_cat(1M)

Builds a media catalog file for an automated library. Optionally, can also populate the catalog file.

chmed(1M)

Sets or clears library catalog flags and values on a specific cartridge.

cleandrive(1M)

Requests that a tape drive be loaded with a cleaning tape.

dump_cat(1M)

Displays the content of a binary catalog file in various ASCII formats.

import(1M)

samexport(1M)

Imports or exports cartridges from a library by placing it in the mailbox. For network-attached libraries, this command updates the library catalog, but it does not physically move cartridges.

samload(1M)

unload(1M)

Loads or unloads a cartridge for a specified device.

move(1M)

Moves a cartridge from one slot to another.

odlabel(1M)

Labels optical disks for use with the Sun StorEdge SAM-FS system.

samdev(1M)

Adds /dev/samst logical device entries. Used to communicate automated library, optical disk, and tape drive information.

tplabel(1M)

Labels tapes for use with the Sun StorEdge SAM-FS system.


Archiver Commands

TABLE C-5 summarizes the commands that control the archiver's actions within the Sun StorEdge SAM-FS environment.

TABLE C-5 Archiver Commands

Command

Description

archiver(1M)

Evaluates the archiver commands file for syntax completeness and semantic accuracy.

archiver.sh(1M)

Logs exceptional archiver events.

showqueue(1M)

Displays the content of an archiver queue file.

reserve(1M)

unreserve(1M)

Reserves and unreserves volumes.


Specialized Maintenance Commands

TABLE C-6 summarizes the various maintenance commands you can use in a Sun StorEdge SAM-FS environment.

TABLE C-6 Specialized Maintenance Commands

Command

Description

archive_audit(1M)

Generates a report of all archived files on each cartridge.

dmpshm(1M)

Dumps the shared memory segments.

exarchive(1M)

Manipulates (exchanges) archive copies.

itemize(1M)

Catalogs an optical disk.

rearch(1M)

unrearch(1M)

Marks or unmarks archive entries to be rearchived.

sam-recycler(1M)

Reclaims space used by expired archive copies from archive media.

sam-releaser(1M)

Releases disk space from online disk cache file systems.

samdev(1M)

Creates symbolic links in the /dev/samst directory that point to the actual devices to be used by the Sun StorEdge SAM-FS file system. This command is similar in function to the UNIX makedev(1M) command.

samset(1M)

Changes or displays variables used in Sun StorEdge SAM-FS operations.

set_admin(1M)

Adds or removes permission for an administrator group to execute administrator commands.

set_state(1M)

Sets the state of a Sun StorEdge SAM-FS device.

stageback.sh(1M)

Stages files from Sun StorEdge SAM-FS or Sun SAM-QFS archive tapes

star(1M)

Creates tape archives and adds or extracts files. This is a GNU version of the tar(1) command, and it has been extended for use with the Sun StorEdge SAM-FS file system. You can use this command in a disaster recovery situation if you need to read data from archive tapes.

tapealert(1M)

Decodes TapeAlert events.

unarchive(1M)

Deletes archive entries for one or more files.

undamage(1M)

Marks an archive entry for one or more files or directories as undamaged.


Site-Customizable Scripts

TABLE C-7 summarizes the site-customizable scripts that you can use to monitor and control the Sun StorEdge SAM-FS environment. By default, the software installs these scripts in /opt/SUNWsamfs/examples. You can move these scripts from /opt/SUNWsamfs/examples to /etc/opt/SUNWsamfs/scripts and modify them to perform the desired action for your site. For more information about these scripts, see their respective man pages.

TABLE C-7 Site-Customizable Scripts

Script

Description

dev_down.sh(1M)

Sends email to root when a device is marked down or off.

load_notify.sh(1M)

Notifies the operator when the Sun StorEdge SAM-FS software requests a cartridge that resides outside the library.

log_rotate.sh(1M)

Rotates log files.

recover.sh(1M)

Recovers files archived after the last samfsdump(1M) was taken.

restore.sh(1M)

Restores files to their online or partially online status.

stageback.sh(1M)

Stages files from archive media.

tarback.sh(1M)

Reloads files from archive media.


Application Programming Interface

You can use the application programming interface (API) to make file system requests from within a user application. The requests can be made locally or remotely to the machine on which the file system is running. The API consists of the libsam and libsamrpc libraries. These libraries contain library routines for obtaining file status; for setting archive, release, and stage attributes for a file; and for manipulating the library catalog of an automated library. The sam-rpcd remote procedure call daemon handles remote requests. To automatically start the sam-rpcd daemon, set samrpc=on in the defaults.conf file.

For more information about the API, see the intro_libsam(3) man page. This man page provides overview information for using the library routines in libsam and libsamrpc.

Operational Utilities

Within the Sun StorEdge SAM-FS environment, you can use the samu(1M) operator utility and SAM-QFS Manager to perform basic operations. TABLE C-8 summarizes the operational tools.

TABLE C-8 Operational Utilities

GUI Tools

Description

SAM-QFS Manager

Provides a web-based graphical user interface to the Sun StorEdge QFS and Sun StorEdge SAM-FS software. You can use this interface to configure, control, monitor, and reconfigure the components of your Sun StorEdge QFS and Sun StorEdge SAM-FS environment. For information on installing SAM-QFS Manager, see the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide. For information on using the SAM-QFS Manager, see its online help.

samu(1M)

Provides the starting point for accessing the samu(1M) operator utility.