Oracle® Hierarchical Storage Manager and StorageTek QFS Software File System Recovery Guide Release 6.0 E42065-03 |
|
Previous |
Next |
This chapter outlines the process of recovering the Oracle Hierarchical Storage Manager and StorageTek 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 Oracle HSM 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 Oracle Hierarchical Storage Manager and StorageTek QFS Installation and Configuration Guide, you can recover Oracle HSM 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 re-install 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. Mount file systems that store backup Oracle HSM configuration files and any file systems that hold disk-archive copies of data files.
In the example, we have been maintaining copies of the Oracle HSM server's Solaris configuration files in the subdirectory sam_config
on the independent file system zfs1
. So we create a mount point. We mount zfs1
. We restore the vfstab
file from the most recent copy in the zfs1
file system. We create the needed mount points. Then we mount the 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 Oracle HSM configuration files are available, locate the most recent copies that are dated prior to the loss of the configuration.
In the example, we have been maintaining copies of the Oracle HSM 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 Oracle HSM configuration, locate the most recent.
If any QFS 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 Oracle HSM configuration files and scripts from backup copies (note that the commands below are entered as single lines—the line breaks are escaped by the backslash character):
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 Oracle HSM configuration 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 search the file server1
.20140127.SAMreport
for Oracle HSM master configuration file (mcf
) information. We pipe the output of the cat
command to the grep
command and the regular-expression pattern \/etc\/opt\/SUNWsamfs\/mcf
(note that the commands below are entered as single lines—the line breaks are escaped by the backslash character):
root@solaris:~#cat
/zfs1/sam_config/explorer/
server1
.20140127.SAMreport
|
\grep
\/etc\/opt\/SUNWsamfs\/mcf
... ------------------ /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 root@solaris:~#
We copy the output of the grep
command, paste the output into the vi editor, and save the file to the correct name and location:
root@solaris:~#vi
/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
:wq
root@solaris:~#
Restore the library catalogs from the dump-file data that you saved during the procedure "Save the Oracle HSM Configuration". For each catalog, use the command 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.
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 if 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 Oracle HSM 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. root@solaris:~#
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() root@solaris:~#
Tell the Oracle HSM software to read the mcf
file and reconfigure itself accordingly. Use the command samd
config
.
root@solaris:~#samd
config
Configuring SAM-FS root@solaris:~#
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 or SAMreports, reconstruct the configuration using whatever information is available. Then proceed as for a new configuration. See the Oracle Hierarchical Storage Manager and StorageTek QFS Installation and Configuration Guide for instructions.