These are procedures to ensure that the system's data and configuration
are recoverable in the event of a system failure.
- Load any patches for LVM.
- Regularly back up your entire system.
Without a valid backup, you run a real chance of losing some or all
of your data. Ensure that you back up ALL of your important data,
including the operating system directories such as:
/
/usr
/dev
/etc and so on.
In addition, regularly test that your backups are working by
restoring a test file randomly from your backups. It is risky
to
assume that your backup is working because it is not logging any
errors. Many backup utilities have the capability to do some
sort
of validation of the backup media. For example,
fbackup has the
-N
option that can allow you to check for discrepancies between
backup
indices and what is actually on the tape. Refer to the
fbackup(1M)
man page for more information.
Use COPYUTIL, if possible, too.
- Back up the important files separately.
Take an extra copy of the very important files, preferably to
another system as well as to another tape. This will speed up
recovery in the event of a system crash. The files that should
be
backed up are:
/etc/passwd
/etc/group
/etc/lvmtab
/etc/lvmconf/*
/etc/fstab
There are many other important files on your system that you may
wish to back up separately. The files listed above are required
to
ensure a smooth system recovery.
- Regularly print out the configuration of your system.
The configuration details stored on the system may not be
accessible
during a recovery. A printed copy is an invaluable reference.
We
recommend printing the configuration details once a week and
every
time a change is made. One thing to note is that some of the
commands outlined below create large amounts of output. An
alternative to printing them is to output the information to a
file
and then storing the file off to tape. This allows quick
recovery
of the information when needed. You could include this
configuration file with the backup in step 3.
The easiest way to save the configuration is to set up a cron
job
to
run regularly, so that even if you don't remember to do it, the
system will.
The output from the following commands is recommended:
/usr/sbin/ioscan -fk
/usr/sbin/vgdisplay -v
/usr/sbin/lvlnboot -v
/usr/sbin/lvdisplay -v /dev/vgXX/lvYY
(for every logical volume)
/usr/sbin/pvdisplay -v /dev/dsk/c#t#d0
(for every LVM disk)
lp /etc/fstab
As an alternative, an intelligent script can be written that
will
detect any changes in the configuration and only print out those
changes. An example script is included at the end of this
appendix.
- Backup the LVM configuration after every change.
The vgcfgbackup command copies the LVM headers from the system
area of the disk to a disk file, which by default resides in the
/etc/lvm.conf directory.
Once this information is in a disk
file
it
can be stored to tape during backups of the file system.
This information in this file allows you to replace the LVM
headers
on the disk in the event of the disk being replaced, or if your
LVM
configuration becomes corrupted.
It is very important that you make these configuration backups
whenever you make a change to any part of the LVM configuration.
This is another task that should be done on a regular basis,
whether
you have made changes or not. It can be done with a cron job,
just
prior to the time of a normal backup. The command to use is:
/etc/vgcfgbackup /dev/vgXX
(for every volume group)
- Update the boot structures after every change to the root volume
group.
This task is only required if you are using LVM on your boot
disk.
Whenever you make changes to the root volume group, which is
usually
named /dev/vg00, you MUST update the Boot Disk Reserved Area
(BDRA)
on the boot disk. To do this issue the following command:
/etc/lvlnboot -R