Managing the Snapshots
Taking, and in general, handling the snapshots involves another
set of tasks, which typically require a privileged user. The scripts
must create, mount, and delete the snapshots. In some cases at my
site, a scheduler that is not managed by the sys admin or root runs
the backups. For this reason, I incorporated the "sudo" tool (http://www.sudo.ws)
into the scripts.
If you are running the scripts from root's crontab, or manually
via an admin, you might decide to avoid this. To do so, just modify
the "sudo" variable to be blank. Yet another approach would be to
use Sun's Role Based Access Control.
We used the following options during the taking of the snapshot:
backing-store-name, backing-store-limit, and chunk size. The script
handles this by using the defined "snapfs" filesystem and generating
a descriptive name; no limit is specified, and the chunk size is
specified to that of an Oracle logical block. The backing store
file name looks similar to other temporary file names containing
date, time, file system, and other information, and it can be useful
during the initial setup of the tools.
I recommend (and the scripts specify) no limit when using a "private"
snapshot filesystem because any limit can cause an artificial problem
under these circumstances. If you have to use a "public" filesystem,
you should read about snapshots before using them, and you will
probably want to consider limits. As for the chunk size -- the man
pages define this as the granularity of which filesystem blocks
are copied. The default is four times the filesystem block size.
If you take the default, it probably won't be the same as an Oracle
logical block, and you may wind up wasting space during a copy-on-write.
Thus, the script queries the database for its logical block size
and then sets the chunk size equal to that.
When using UFS snapshots, you must be aware of how much buffer
cache is allocated for use. By default, the limit is 2% of the available
physical memory, and you modify this by specifying the "bufhmw"
parameter in the /etc/system file. This parameter is in kilobytes
and requires a reboot to change; if you are unfamiliar with the
details, I recommend using the default.
|