Determining a size for the cache partition
The required size for the cache partition depends on user write activity during the backup, not on the size of the client's file system. If the backup occurs when user activity is heavy, a larger cache is required.
To determine a size for the cache partition
- Consider the period in which the backup is scheduled to occur: the more user activity that is expected, the larger the cache required.
You should execute the following procedure at an appropriate period, when your snapshot backups typically run. If user activity at your site is known to vary with the time of day, a different time could bring very different results.
- Make sure that a raw partition is available on a separate disk.
- During the appropriate backup period, create an nbu_snap snapshot by entering the following as root:
/usr/openv/netbackup/bin/driver/snapon snapshot_source cache
where snapshot_source is the partition on which the client's file system is mounted, and cache is the raw partition to be used as copy-on-write cache. For example:
/usr/openv/netbackup/bin/driver/snapon /omo_cat3 /dev/vx/rdsk/zeb/cacheExample output:
matched /omo_cat3 to mnttab entry /omo_cat3 mount device: /dev/vx/dsk/omo/vol03 fstype: vxfs snapshot 29 enabled on /omo_cat3 at 06/05/03 15:16:02 - In /usr/openv/netbackup/bin/driver, enter the snaplist and snapcachelist commands.
snaplist shows the following:
Id of each snapshot
Size of the partition containing the client file system
Amount of file system write activity in 512-byte blocks that occurred during the nbu_snap snapshot (under the cached column).
The more blocks that are cached as a result of user activity, the larger the cache partition required.
snapcachelist shows each cache device in use and what percentage has been used (busy). For each cache device that is listed, busy shows the total space that is used in the cache. This value indicates the size of the raw partition that may be required for nbu_snap cache.
More details are available on the snap commands.
See nbu_snap commands.
The snap commands can be used in a script.
If the cache partition is not large enough, the backup fails with status code 13, "file read failed." The /var/adm/messages log may contain errors such as the following:
Mar 24 01:35:58 bison unix: WARNING: sn_alloccache: cache /dev/rdsk/c0t2d0s3 full - all snaps using this cache are now unusable Using the information that snaplist and snapcachelist provide, you have several options:
Specify a larger (or smaller) partition as cache, depending on the results from snaplist and snapcachelist.
Reschedule backups to a period when less user activity is expected.
If multiple backups use the same cache, reduce the number of concurrent backups by rescheduling some of them.
- When you are finished with the snapshot, you can remove it by entering the following:
/usr/openv/netbackup/bin/driver/snapoff snapid
where snapid is the numeric id of the snapshot that was created earlier.
NetBackup policies do not control any snapshots that you create manually with the snapon command. When snapon is run manually, it creates a copy-on-write snapshot only. The snapshot remains on the client until it is removed by entering snapoff or the client is restarted.
More Information