StorageTek Storage Archive Manager and StorageTek QFS Software File System Recovery Guide Release 5.4 E42065-02 |
|
Previous |
Next |
This chapter outlines the process of recovering the SAM-QFS software and file-system configuration in the event that it is lost or corrupted, either in part or in its entirety. If the server host fails, the SAM-QFS software and file-system configurations may be lost, leaving file system data and metadata intact but inaccessible until the configuration information is restored. Success in this situation depends on your ability to salvage information from any files and directories that remain and on the thoroughness of your disaster preparations:
If you followed the procedures recommended in the StorageTek Storage Archive Manager and StorageTek QFS Installation and Configuration Guide, you can recover SAM-QFS software and file-system configurations using the procedure below.
If you are restoring the configuration following a server host failure, resolve hardware issues, re-install operating systems and software as needed.
If a current backup copy of the root file system exists, restore the root file system and stop here.
Otherwise, log in to the file-system server host as root
.
root@solaris:~#
Mount any required file systems, including file systems that store backup SAM-QFS configuration files and any file systems that hold disk-based archive copies of data files.
In the example, we have been maintaining copies of the SAM-QFS server's Solaris configuration files in the subdirectory sam_config
on the independent file system zfs1
. So we create a mount point, mount zfs1
, restore the vfstab
file from the most recent copy, create mount points as needed, and then mount the necessary file systems:
root@solaris:~#cp
/etc/
vfstab
/etc/
vfstab.back
root@solaris:~#mkdir
/zfs1
root@solaris:~#mount
-F
zfs
/net/remote.example.com/zfs1/
/zfs1
root@solaris:~#cp
/zfs1/sam_config/
20140127
/etc/
vfstab
/etc/
vfstab
root@solaris:~#mkdir
/diskvols
root@solaris:~#mkdir
/diskvols/DISKVOL1
root@solaris:~#mkdir
/diskvols/DISKVOL2
... root@solaris:~#mount
/diskvols/DISKVOL1
root@solaris:~#mount
/diskvols/DISKVOL2
... root@solaris:~#
If backup copies of the SAM-QFS configuration files are available, locate the most recent that is dated prior to the loss of the configuration.
In the example, we have been maintaining copies of the SAM-QFS configuration files in the subdirectory sam_config
, on the independent file system /zfs1
. So the latest files are easy to find:
root@solaris:~#ls
/zfs1/sam_config
/20140127
/etc/opt/SUNWsamfs/
archiver.cmd defaults.conf mcf recycler.cmd stager.cmd cfg_backups diskvols.conf mgmt_sched.conf releaser.cmd startup csn inquiry.conf notify.cmd scripts verifyd.cmd root@solaris:~#ls
/zfs1/sam_config
/20140127
/etc/opt/SUNWsamfs/
scripts
archiver.sh log_rotate.sh nrecycler.sh recycler.sh save_core.sh sendtrap ssi.sh root@solaris:~#ls
/zfs1/sam_config/explorer/
server1.20140430.1659MST.tar.gz server1.20140114.0905MST.tar.gz server1.20110714.1000MST.tar.gz
If SAMreports were generated before the loss of the SAM-QFS configuration, locate the most recent.
In the example, we have /zfs1/sam_config/explorer/
server1
.20140127.1659MST.tar.gz
.
If affected file systems are currently mounted, unmount them.
For each missing configuration file, copy an available backup file to the required location on the server that you are restoring.
In the example, we restore all of the SAM-QFS configuration files and scripts from backup copies.
root@solaris:~#cp
/zfs1/sam_config
/20140127
/etc/opt/SUNWsamfs/*
\/etc/opt/SUNWsamfs/
root@solaris:~#cp
/zfs1/sam_config
/20140127
/etc/opt/SUNWsamfs/
scripts/*
\/etc/opt/SUNWsamfs/
scripts/
root@solaris:~#cp
/zfs1/sam_config
/20140127
/etc/opt/SUNWsamfs/
startup/*
\/etc/opt/SUNWsamfs/
startup/
root@solaris:~#cp
/zfs1/sam_config
/20140127
/etc/opt/SUNWsamfs/
cfg_backups/*
\/etc/opt/SUNWsamfs/
cfg_backups/
root@solaris:~#cp
/zfs1/sam_config
/20140127
/etc/opt/SUNWsamfs/
csn/*
\/etc/opt/SUNWsamfs/
csn/
If backup copies of the configuration files are not available, recreate them using the information contained in the most recent available SAMreport. Copy the content from the report, paste it into a text editor, and save it to the file and path indicated in the report.
SAMreport files contain the full text of the SAM-QFS files as they were at the time the report was created. They also list the directory where the file was located.
In the example, we open the file server1
.20140127.SAMreport
in the vi editor and search for the regular-expression pattern \/etc\/opt\/SUNWsamfs\/mcf
. We find the following information on the mcf
file:
root@solaris:~#vi
/zfs1/sam_config/explorer/
server1
.20140127.SAMreport
... ------------------ /etc/opt/SUNWsamfs/mcf ------------------- server1# /bin/ls -l /etc/opt/SUNWsamfs/mcf -rw-r--r-- 1 root root 1789 Feb 4 09:22 /etc/opt/SUNWsamfs/mcf # Equipment Equipment Equipment Family Device Additional # Identifier Ordinal Type Set State Parameters #------------------- --------- --------- --------- ------ ----------- samqfs1 100 ms samqfs1 on /dev/dsk/c1t3d0s3 101 md samqfs1 on /dev/dsk/c1t4d0s5 102 md samqfs1 on ~ /\/etc\/opt\/SUNWsamfs\/mcf
Restore the library catalogs from the dump-file data that you saved during the procedure "Save the SAM-QFS Configuration". For each catalog, use the command /opt/SUNWsamfs/sbin/build_cat
catalog-dump-file
catalog-file
, where catalog-dump-file
is the path and name of the file that you created with the dump_cat
command and catalog-file
is the path and name of the restored catalog file.
In the example, we rebuild the catalog for library1
using the data in the file /zfs1/sam_config/20140513/catalogs/
library1cat.dump
:
root@solaris:~#build_cat
/zfs1/sam_config/20140513/catalogs/
library1cat.dump
\/var/opt/SUNWsamfs/catalog/library1cat
If you are recovering a system following hardware failure, go to Chapter 4, "Recovering File Systems".
If you are replacing one or more configuration files that were inadvertently deleted or incorrectly edited and no hardware or file system changes have occurred, check the configuration files for errors by running the sam-fsd
command.
The sam-fsd
is an initialization command that reads SAM-QFS configuration files. It will stop if it encounters an error:
root@solaris:~# sam-fsd
If the sam-fsd
command finds an error in the mcf
file, edit the file to correct the error and recheck as described in the preceding step.
In the example below, sam-fsd
reports an unspecified problem with a device:
root@solaris:~# sam-fsd
Problem in mcf file /etc/opt/SUNWsamfs/mcf for filesystem samqfs1
sam-fsd: Problem with file system devices.
If the sam-fsd
command runs without error, the configuration files are correct. Proceed to the next step.
The example is a partial listing of error-free output:
root@solaris:~# sam-fsd Trace file controls: sam-amld /var/opt/SUNWsamfs/trace/sam-amld cust err fatal ipc misc proc date size 10M age 0 sam-archiverd /var/opt/SUNWsamfs/trace/sam-archiverd cust err fatal ipc misc proc date module size 10M age 0 sam-catserverd /var/opt/SUNWsamfs/trace/sam-catserverd cust err fatal ipc misc proc date module size 10M age 0 ... Would start sam-archiverd() Would start sam-stagealld() Would start sam-stagerd() Would start sam-amld()
Tell the SAM-QFS software to read the mcf
file and reconfigure itself accordingly. Use the command samd
config
.
root@solaris:~#samd
config
If the samd
config
command reports errors in the mcf
file, correct them. Then repeat the preceding step.
Remount the affected file systems.
Monitor file system operations.
If you lack backup files and/or SAMreports, reconstruct the configuration using whatever information is available. Then proceed as for a new configuration. See the StorageTek Storage Archive Manager and StorageTek QFS Installation and Configuration Guide for instructions.