PRIMECLUSTER Global File Services Configuration and Administration Guide 4.2 (Solaris(TM) Operating Environment) |
Contents Index |
Appendix F Reference Manual | > F.2 Management Commands Specific to the GFS Shared File System |
sfcdump [ options ] [ arguments ] files_to_dump
sfcdump backs up all files specified by files_to_dump (normally either a whole file system or files within the GFS Shared File System changed after a certain date) to magnetic tape, diskette, or disk file. When running sfcdump, the file system must be inactive; otherwise, the output of sfcdump may be inconsistent and restoring files correctly may be impossible. A file system is inactive when the file system is unmounted in all nodes. A file system is not considered inactive if one tree of the file system is quiescent while another tree has files or directories being modified.
options is a single string of one-letter sfcdump options.
arguments may be multiple strings whose association with the options is determined by order. That is, the first argument goes with the first option that takes an argument; the second argument goes with the second option that takes an argument, and so on.
files_to_dump is required and must be the last argument on the command line. See OPERAND for more information.
With most devices sfcdump can automatically detect the end-of-media. Consequently, the d, s, and t options are not necessary for multi-volume dumps, unless sfcdump does not understand the way the device detects the end-of-media, or the files are to be restored on a system with an older version of the restore command.
The sfcdump and ufsdump commands are functionally compatible, though the backup formats are different. As a result, the ufsrestore command cannot use the backup data created using the sfcdump command for restoration. In the same way, the sfcrestore cannot use the backup data created using the ufsdump command for restoration.
The following options can be specified:
0-9
The "dump level." All files specified by files_to_dump that have been modified since the last sfcdump at a lower dump level are copied to the dump_file destination (normally a magnetic tape device). For instance, if a "level 2 " dump was done on Monday, followed by a "level 4 " dump on Tuesday, a subsequent "level 3 " dump on Wednesday would contain all files modified or added since the "level 2 " (Monday) backup. A "level 0 " dump copies the entire file system to the dump_file.
a archive_file
Archive file. Archive a dump table-of-contents in the specified archive_file to be used by sfcrestore(1M) to determine whether a file is in the dump file that is being restored.
b factor
Blocking factor. Specify the blocking factor for tape writes. The default is 20 blocks per write for tapes of density less than 6250BPI (bytes-per-inch). The default blocking factor for tapes of density 6250BPI and greater is 64. The default blocking factor for cartridge tapes (c option) is 126. The highest blocking factor available with most tape drives is 126. Note: the blocking factor is specified in terms of 512-byte blocks, for compatibility with tar(1).
c
Cartridge. Set the defaults for cartridge instead of the standard half-inch reel. This sets the density to 1000BPI and the blocking factor to 126. Since sfcdump can automatically detect the end-of-media, only the blocking parameter normally has an effect. When cartridge tapes are used, and this option is not specified, sfcdump will slightly miscompute the size of the tape. If the b, d, s or t options are specified with this option, their values will override the defaults set by this option.
d bpi
Tape density. Not normally required, as sfcdump can detect end-of-media. This parameter can be used to keep a running tab on the amount of tape used per reel. The default density is 6250BPI except when the c option is used for cartridge tape, in which case it is assumed to be 1000BPI per track. Typical values for tape devices are:
1/2" tape6250 BPI
1/4" cartridge1000 BPI (The tape densities and other options are documented in the st(7D) man page.)
D
Diskette. Dump to diskette.
f dump_file
Dump file. Use dump_file as the file to dump to, instead of /dev/rmt/0. If dump_file is specified as -, dump to standard output.
If the name of the file is of the form machine:device, the dump is done from the specified machine over the network using rmt(1M). Since sfcdump is normally run by root, the name of the local machine must appear in the /.rhosts file of the remote machine. If the file is specified as user@machine:device, sfcdump will attempt to execute as the specified user on the remote machine. The specified user must have a .rhosts file on the remote machine that allows the user invoking the command from the local machine to access the remote machine.
l (lower-case L)
Autoload. When the end-of-tape is reached before the dump is complete, take the drive offline and wait up to two minutes for the tape drive to be ready again. This gives autoloading (stackloader) tape drives a chance to load a new tape. If the drive is ready within two minutes, continue. If it is not, prompt for another tape and wait.
L string
Sets the tape label to string, instead of the default none. string may be no more than fifteen characters long. If it is longer, it is truncated and a warning printed; the dump will still be done.
n
Notify all operators in the sys group that sfcdump requires attention by sending messages to their terminals, in a manner similar to that used by the wall(1M) command. Otherwise, such messages are sent only to the terminals (such as the console) on which the user running sfcdump is logged in.
o (lower-case o)
Offline. Take the drive offline when the dump is complete or the end-of-media is reached and rewind the tape, or eject the diskette. In the case of some autoloading 8mm drives, the tape is removed from the drive automatically. This prevents another process that rushes in to use the drive, from inadvertently overwriting the media.
s size
Specify the size of the volume being dumped to. Not normally required, as sfcdump can detect end-of-media. When the specified size is reached, sfcdump waits for you to change the volume. sfcdump interprets the specified size as the length in feet for tapes and cartridges, and as the number of 1024-byte blocks for diskettes. The values should be a little smaller than the actual physical size of the media (for example, 425 for a 450-foot cartridge). Typical values for tape devices depend on the c option, for cartridge devices, and the D option for diskettes:
1/2" tape2300 feet
60-Mbyte 1/4" cartridge425 feet
150-Mbyte 1/4" cartridge700 feet
diskette1422 blocks (Corresponds to a 1.44-Mbyte diskette, with one cylinder reserved for bad block information.)
S
Size estimate. Determine the amount of space that is needed to perform the dump without actually doing it, and display the estimated number of bytes it will take. This is useful with incremental dumps to determine how many volumes of media will be needed.
t tracks
Specify the number of tracks for a cartridge tape. Not normally required, as sfcdump can detect end-of-media. The default is 9 tracks. The t option is not compatible with the D option. Values for Sun-supported tape devices are:
60-Mbyte cartridge9 tracks
150-Mbyte cartridge18 tracks
T timeout [ hms ]
Sets the amount of time to wait for an autoload command to complete. This function modifier is ignored unless the l function modifier has also been specified. The default time period to wait is two minutes. Specify time units with a trailing h (for hours), m (for minutes), or s (for seconds). The default unit is minutes.
u
Update the dump record. Add an entry to the file /etc/sfcfs_dumpdates, for each file system successfully dumped that includes the file system name, date, and dump level.
v
Verify. After each tape or diskette is written, verify the contents of the media against the source file system. If any discrepancies occur, prompt for new media, then repeat the dump/verification process. The file system must be unmounted in all nodes. This option cannot be used to verify a dump to standard output.
w
Warning. List the file systems that have not been backed up within a day. This information is gleaned from the files /etc/sfcfs_dumpdates and /etc/vfstab. When the w option is used, all other options are ignored. After reporting, sfcdump exits immediately.
W
Warning with highlight. Similar to the w option, except that the W option includes all file systems that appear in /etc/sfcfs_dumpdates, along with information about their most recent dump dates and levels. File systems that have not been backed up within a day are highlighted.
The following operand can be specified:
files_to_dump
Specifies the files to dump. Usually it identifies a whole GFS Shared File System by its raw device name of the representative partition (for example, /dev/sfdsk/gfs/rdsk/volume1). Incremental dumps (levels 1 to 9) of files changed after a certain date only apply to a whole file system. Alternatively, files_to_dump can identify individual files or directories. All files or directories are dumped, which is equivalent to a level 0 dump; however, /etc/sfcfs_dumpdates is not updated, even with the u option specified. In all cases, the files must be contained in the same file system, and the file system must be local to the system where sfcdump is being run. files_to_dump is required and must be the last argument on the command line. If no options are given, the default is 9uf /dev/rmt/0 files_to_dump.
Example 1: A sample display of the sfcdump command. To make a full dump of the GFS Shared File System configured on /dev/sfdsk/gfs/rdsk/volume1 onto a 150-Mbyte tape unit 0, use:
# sfcdump 0cfu /dev/rmt/0 /dev/sfdsk/gfs/rdsk/volume1
To make and verify an incremental dump at level 5 of the GFS Shared File System configured on /dev/sfdsk/gfs/rdsk/volume6, on a 1/2" reel tape unit 1, use:
# sfcdump 5fuv /dev/rmt/1 /dev/sfdsk/gfs/rdsk/volume1
While running, sfcdump emits many verbose messages. sfcdump returns the following exit values:
0 Normal exit.
1 Startup errors encountered.
3 Abort - no checkpoint attempted.
/dev/rmt/0
default unit to dump to
/etc/sfcfs_dumpdates
dump date record
/etc/group
to find group sys
/etc/hosts
to gain access to remote system with drive
/etc/vfstab
list of file systems
cpio(1), tar(1), dd(1M), devnm(1M), prtvtoc(1M), rmt(1M), shutdown(1M), volcopy(1M), wall(1M), st(7D) in the "Solaris X Reference Manual Collection."
Read errors
Up to 32 read errors on the file system are ignored.
Process Per Reel
Because each reel requires a new process, parent processes for reels that are already written hang around until the entire tape is written.
Operator intervention
sfcdump requires operator intervention on these conditions: end of volume, end of dump, volume write error, volume open error or disk read error (if there are more than a threshold of 32). In addition to alerting all operators implied by the n option, sfcdump interacts with the operator on sfcdump 's control terminal at times when sfcdump can no longer proceed, or if something is grossly wrong. All questions sfcdump poses must be answered by typing yes or no, as appropriate.
Since backing up a disk can involve a lot of time and effort, sfcdump checkpoints at the start of each volume. If writing that volume fails for some reason, sfcdump will, with operator permission, restart itself from the checkpoint after a defective volume has been replaced.
Suggested Dump Schedule
It is vital to perform full, "level 0", dumps at regular intervals. When performing a full dump, bring the machine down to single-user mode using shutdown(1M). While preparing for a full dump, it is a good idea to clean the tape drive and heads. Incremental dumps should be performed with the system running in single-user mode.
Incremental dumps allow for convenient backup and recovery of active files on a more frequent basis, with a minimum of media and time. However, there are some tradeoffs. First, the interval between backups should be kept to a minimum (once a day at least). To guard against data loss as a result of a media failure (a rare, but possible occurrence), capture active files on (at least) two sets of dump volumes. Another consideration is the desire to keep unnecessary duplication of files to a minimum to save both operator time and media storage. A third consideration is the ease with which a particular backed-up version of a file can be located and restored. The following four-week schedule offers a reasonable tradeoff between these goals.
Although the Tuesday through Friday incremental contains "extra copies" of files from Monday, this scheme assures that any file modified during the week can be recovered from the previous day's incremental dump.
Process priority of the sfcdump command
sfcdump uses multiple processes to allow it to read from the disk and write to the media concurrently. Due to the way it synchronizes between these processes, any attempt to run dump with a nice (process priority) of `-5' or better will likely make sfcdump run slower instead of faster.
Partition overlap
The partition that covers the entire disk contains other partitions on the disk. But even if multiple GFS Shared File Systems are configured on one disk, sfcdump must not be executed on the entire disk partition. sfcdump can handle only one GFS Shared File System at a time. To dump the multiple GFS Shared File Systems configured on one disk, sfcdump must be executed on each file systems.
Warning when the w and W options are specified
The /etc/vfstab file does not allow the desired frequency of backup for file systems to be specified. Consequently, the w and W options assume file systems should be backed up daily, which limits the usefulness of these options.
Notices in case of using incremental dump
Incremental dump works by using the dump date record file (/etc/sfcfs_dumpdates). The file is updated only on the node where sfcdump is executed. Consequently, before incremental dump being made on another node, the dump date record file on the node where previous dump was made must be copied.
Incremental dump in case that some node did not stop normally
In case that some node using the file system did not stop normally because of panic or the like, files updated on the node may not be dumped correctly by using incremental dump.
When incremental dump is made, sfcdump judges whether the file should be dumped or not by comparing time stamp of the file and previous dump date recorded dump date record file. But in case that some node did not stop normally, only the contents of the files updated on the node may be updated in spite of the time stamps being not updated. These files may not be dumped by incremental dump and be dumped by next full dump.
Therefore, after some node using the file system did not stop normally, it is recommended that full dump be made next time.
Contents Index |