cancel
Showing results for 
Search instead for 
Did you mean: 

How does NetBackup determine which media in volume pool to use for a backup

pierceadmin
Level 2

How does NetBackup select which media from a volume pool it will use to write images to for a backup job?  I've read that it groups similar retention periods on media, but if I have multiple tapes in my volume pool does it select the one with the most space available?

Thanks,

-Brent

1 ACCEPTED SOLUTION

Accepted Solutions

Rakesh_Khandelw
Level 6

This is how NetBackup selects media in general -

 

 Selecting media in robots
When NetBackup receives a request for a volume, it searches the EMM database for the media ID. A request for a volume includes the media ID, device density, and the file name that is used to link to the device that is assigned. The external media ID should correspond to the NetBackup media ID. NetBackup selects a volume in a robot in the following order:
■ NetBackup searches the media catalog for a volume that is already mounted in a drive and meets the following criteria:

Configured to contain backups at the retention level that the backup schedule requires. However, if the NetBackup Media host property Allow multiple retentions per media is specified for the server, NetBackup does not search by retention level.

In the volume pool that is required by the backup.

Not in a FULL, FROZEN, IMPORTED, or SUSPENDED state.

Of the same density that is required by the requested backup andin the robot that is requested by the backup.

Not currently in use by another backup or a restore.

Not written in a protected format. NetBackup detects tape format after the volume is mounted. If the volume is in a protected format, NetBackup unmounts the volume and resumes the search.
If a suitable volume is found, NetBackup uses it.

If NetBackup cannot find a mounted volume that satisfies all of the previous conditions, it checks the media catalog for any volume that is suitable.

If a suitable volume is in a robot, NetBackup issues the commands that move the volume to a drive, position the heads to the beginning of the volume, and assign it to the request. No manual intervention is required.

If a suitable volume is not in a robot but is in a stand-alone drive, NetBackup automatically mounts and assigns it. No manual intervention is required.

If a suitable volume is not in a robot or a stand-alone drive, NetBackup does one of the following:

Pends a mount request if the request is media-specific (restore, import, or tpreq).

Attempts to to use another volume (for backup jobs where any other media can be used).

If the media catalog does not have a suitable volume or if a suitable volume is at end of media (EOM), a new volume is assigned. NetBackup may assign a new volume even if a volume is not full (because NetBackup received an EOM message from the drive). The new volume must meet all of the
following criteria:

Is the correct media type.

Is for the correct robot type (if applicable).

Is located in the requested robotic peripheral (if applicable).

Resides on the requested host.

Is in the correct volume pool.

Is not currently assigned (not already allocated to NetBackup).

Is not expired (if an expiration date is defined in NetBackup).

Has not exceeded the maximum number of mounts allowed.

If more than one volume qualifies, NetBackup chooses the volume that was least recently used. NetBackup then adds it to the media catalog and assigns it the specified retention level.

If there are no unassigned volumes of the requested type, the backup terminates with an error message that no media was available.
Spanning media
After an end of media (EOM) is reached, automatic media selection depends on whether NetBackup is configured to allow backups to span media, as follows:

NetBackup spans media if the NetBackup Media host property Allow backups to span media is specified for the server. In this case, NetBackup uses another volume to start the next fragment and the resulting backup is composed of fragments on different volumes.

NetBackup does not span media if Allow backups to span media is not specified. In this case, the backup terminates abnormally and the operation is retried according to the NetBackup Global Attributes host property, Schedule backup attempts.

 

Selecting media in stand-alone drives
The following subsections explain media selection and other aspects of stand-alone drive operations.
Media selection using stand-alone drive extensions
With NetBackup stand-alone drive extensions, NetBackup tries to use any labeled or any unlabeled media that is in a stand-alone drive. This capability is enabled by default during installation. The media selection process is as follows:

 


If a backup is requested and an appropriate stand-alone drive does not contain a volume, NetBackup selects a volume as explained in “How NetBackup selects media” on page 219. The Device Monitor shows the mount request, and an operator must manually insert the volume and assign it to a drive.

If an appropriate drive contains a volume, NetBackup tries to select and use
that volume. A volume that has been used previously for backups must meet the following criteria:

Not be FULL, FROZEN, or SUSPENDED.

Contain backups at the retention level and be in the same volume pool as the backup that requires a volume. However, if the NetBackup Media host property Allow multiple retentions per media is specified for the server, NetBackup does not require a specific retention level.
NetBackup uses media that was not used previously. If the media is unlabeled, the following actions occur:

NetBackup labels the media.

NetBackup adds a media ID to the volume configuration, if necessary. If a media ID is added, the NetBackup Media ID prefix (non-robotic) is used as the first characters of the media ID.

If a media ID prefix is not specified, the default prefix is the letter A. For example, A00000.

NetBackup adds the requested volume pool to the volume configuration (if
the backup policy specifies a volume pool). If the unused media is not labeled, you can label it by using the bplabel command. You can specify the -u parameter ito force assignment of a specific drive index, which eliminates the need to assign the drive manually.
Disabling stand-alone drive extensions
You can disable the stand-alone drive extensions by clearing the NetBackup media server host property, Enable standalone drive extensions. If you clear this property, NetBackup uses the same method to select media for stand-alone drives as it uses for robotic drives.
Spanning media
Media selection after an end of media (EOM) condition depends on whether NetBackup is configured to allow backups to span media, as follows:
■ NetBackup spans media if the media server host property, Allow backups to span media, is specified for the server. NetBackup selects another volume to begin the next fragment, and the resulting backup has data fragments on
more than one volume.

After an EOM condition, NetBackup attempts to use an unassigned volume rather than one that already has images on it. NetBackup checks the EMM database for a volume that is the correct media type, in the correct volume pool, and so on.

If a suitable unassigned volume is unavailable, NetBackup selects a volume.
■ NetBackup does not span media if Allow backups to span media is not specified. The backup terminates abnormally when the end of media is reached. The operation is rescheduled according to the master server host property Schedule backup attempts.
When NetBackup spans media and an EOM is encountered on a stand-alone drive, you can direct NetBackup to wait until a volume is loaded in a compatible stand-alone drive. NetBackup then does not search for other media or generate a pending mount request. The wait period is helpful when a gravity feed tape stacker takes a long time to load the next media in the drive. (A gravity feed tape stacker is not controlled by software.)
To direct NetBackup to wait, specify the Media request delay media server host property. This property specifies the number of seconds NetBackup waits to use a volume that is loaded in a compatible drive before looking for another drive. NetBackup also waits to generate a pending mount request during tape span operations. The Media request delay property is effective only when stand-alone drive extensions are enabled.
Keeping stand-alone drives in the ready state
To leave stand-alone drives in a ready condition after a backup or restore
completes, use the nbemmcmdcommand to enable the
-do_not_eject_standalone option. NetBackup does not eject the tape after
an operation completes. The media is still ejected if EOM is reached or an error
is encountered. Also, the media is ejected if the drive needs to be used with
another media or the media needs to be used with another drive.
One standalone drive may be ready and contain suitable media.

View solution in original post

2 REPLIES 2

J_H_Is_gone
Level 6

It has always been my understanding that it picks the tape with the least mounts ( in an atempt to use all the tapes equal).

 

if you allow mixed retetion on your tapes it could pick just on least mounts.

 

if you do not allow mixed retention then it should pick the tape with the least mounts that matches retention period.

Rakesh_Khandelw
Level 6

This is how NetBackup selects media in general -

 

 Selecting media in robots
When NetBackup receives a request for a volume, it searches the EMM database for the media ID. A request for a volume includes the media ID, device density, and the file name that is used to link to the device that is assigned. The external media ID should correspond to the NetBackup media ID. NetBackup selects a volume in a robot in the following order:
■ NetBackup searches the media catalog for a volume that is already mounted in a drive and meets the following criteria:

Configured to contain backups at the retention level that the backup schedule requires. However, if the NetBackup Media host property Allow multiple retentions per media is specified for the server, NetBackup does not search by retention level.

In the volume pool that is required by the backup.

Not in a FULL, FROZEN, IMPORTED, or SUSPENDED state.

Of the same density that is required by the requested backup andin the robot that is requested by the backup.

Not currently in use by another backup or a restore.

Not written in a protected format. NetBackup detects tape format after the volume is mounted. If the volume is in a protected format, NetBackup unmounts the volume and resumes the search.
If a suitable volume is found, NetBackup uses it.

If NetBackup cannot find a mounted volume that satisfies all of the previous conditions, it checks the media catalog for any volume that is suitable.

If a suitable volume is in a robot, NetBackup issues the commands that move the volume to a drive, position the heads to the beginning of the volume, and assign it to the request. No manual intervention is required.

If a suitable volume is not in a robot but is in a stand-alone drive, NetBackup automatically mounts and assigns it. No manual intervention is required.

If a suitable volume is not in a robot or a stand-alone drive, NetBackup does one of the following:

Pends a mount request if the request is media-specific (restore, import, or tpreq).

Attempts to to use another volume (for backup jobs where any other media can be used).

If the media catalog does not have a suitable volume or if a suitable volume is at end of media (EOM), a new volume is assigned. NetBackup may assign a new volume even if a volume is not full (because NetBackup received an EOM message from the drive). The new volume must meet all of the
following criteria:

Is the correct media type.

Is for the correct robot type (if applicable).

Is located in the requested robotic peripheral (if applicable).

Resides on the requested host.

Is in the correct volume pool.

Is not currently assigned (not already allocated to NetBackup).

Is not expired (if an expiration date is defined in NetBackup).

Has not exceeded the maximum number of mounts allowed.

If more than one volume qualifies, NetBackup chooses the volume that was least recently used. NetBackup then adds it to the media catalog and assigns it the specified retention level.

If there are no unassigned volumes of the requested type, the backup terminates with an error message that no media was available.
Spanning media
After an end of media (EOM) is reached, automatic media selection depends on whether NetBackup is configured to allow backups to span media, as follows:

NetBackup spans media if the NetBackup Media host property Allow backups to span media is specified for the server. In this case, NetBackup uses another volume to start the next fragment and the resulting backup is composed of fragments on different volumes.

NetBackup does not span media if Allow backups to span media is not specified. In this case, the backup terminates abnormally and the operation is retried according to the NetBackup Global Attributes host property, Schedule backup attempts.

 

Selecting media in stand-alone drives
The following subsections explain media selection and other aspects of stand-alone drive operations.
Media selection using stand-alone drive extensions
With NetBackup stand-alone drive extensions, NetBackup tries to use any labeled or any unlabeled media that is in a stand-alone drive. This capability is enabled by default during installation. The media selection process is as follows:

 


If a backup is requested and an appropriate stand-alone drive does not contain a volume, NetBackup selects a volume as explained in “How NetBackup selects media” on page 219. The Device Monitor shows the mount request, and an operator must manually insert the volume and assign it to a drive.

If an appropriate drive contains a volume, NetBackup tries to select and use
that volume. A volume that has been used previously for backups must meet the following criteria:

Not be FULL, FROZEN, or SUSPENDED.

Contain backups at the retention level and be in the same volume pool as the backup that requires a volume. However, if the NetBackup Media host property Allow multiple retentions per media is specified for the server, NetBackup does not require a specific retention level.
NetBackup uses media that was not used previously. If the media is unlabeled, the following actions occur:

NetBackup labels the media.

NetBackup adds a media ID to the volume configuration, if necessary. If a media ID is added, the NetBackup Media ID prefix (non-robotic) is used as the first characters of the media ID.

If a media ID prefix is not specified, the default prefix is the letter A. For example, A00000.

NetBackup adds the requested volume pool to the volume configuration (if
the backup policy specifies a volume pool). If the unused media is not labeled, you can label it by using the bplabel command. You can specify the -u parameter ito force assignment of a specific drive index, which eliminates the need to assign the drive manually.
Disabling stand-alone drive extensions
You can disable the stand-alone drive extensions by clearing the NetBackup media server host property, Enable standalone drive extensions. If you clear this property, NetBackup uses the same method to select media for stand-alone drives as it uses for robotic drives.
Spanning media
Media selection after an end of media (EOM) condition depends on whether NetBackup is configured to allow backups to span media, as follows:
■ NetBackup spans media if the media server host property, Allow backups to span media, is specified for the server. NetBackup selects another volume to begin the next fragment, and the resulting backup has data fragments on
more than one volume.

After an EOM condition, NetBackup attempts to use an unassigned volume rather than one that already has images on it. NetBackup checks the EMM database for a volume that is the correct media type, in the correct volume pool, and so on.

If a suitable unassigned volume is unavailable, NetBackup selects a volume.
■ NetBackup does not span media if Allow backups to span media is not specified. The backup terminates abnormally when the end of media is reached. The operation is rescheduled according to the master server host property Schedule backup attempts.
When NetBackup spans media and an EOM is encountered on a stand-alone drive, you can direct NetBackup to wait until a volume is loaded in a compatible stand-alone drive. NetBackup then does not search for other media or generate a pending mount request. The wait period is helpful when a gravity feed tape stacker takes a long time to load the next media in the drive. (A gravity feed tape stacker is not controlled by software.)
To direct NetBackup to wait, specify the Media request delay media server host property. This property specifies the number of seconds NetBackup waits to use a volume that is loaded in a compatible drive before looking for another drive. NetBackup also waits to generate a pending mount request during tape span operations. The Media request delay property is effective only when stand-alone drive extensions are enabled.
Keeping stand-alone drives in the ready state
To leave stand-alone drives in a ready condition after a backup or restore
completes, use the nbemmcmdcommand to enable the
-do_not_eject_standalone option. NetBackup does not eject the tape after
an operation completes. The media is still ejected if EOM is reached or an error
is encountered. Also, the media is ejected if the drive needs to be used with
another media or the media needs to be used with another drive.
One standalone drive may be ready and contain suitable media.