What order does Data Protector use to allocate media

advertisement
What order does Data Protector use to allocate media for a backup?
==================================================================
PROBLEM: (based on OV-EN009949)
If receiving unexpected mount requests, or if it is confusing as to the
order in which Data Protector is using tapes in the tape library or media
pools, the following information should be helpful.
Note: For a better understanding of the following, also refer to the
Data Protector Administrator's Guide.
CONFIGURATION
Operating System - HP-UX, NT, Sun Solaris, Windows 2000, Windows XP
Version - A.05.x
Product - Data Protector
RESOLUTION:
Data Protector Media Allocation Order
The sequence of media allocation is in the order of the following
Data Protector media sets:
1
2
3
4
5
Preallocated Media
Appendable Media
Uninitialized Media
Free Media
Overflow Media
Each of these media sets has its own definition and rules about th
sequence of media. These are explained below:
1 Preallocated Media
-------------------Media named in the datalist device options preallocation list.
Preallocated media in 'Poor' condition will not be used.
The pool policy can be Strict or Loose. This media set is not sorted.
Order of use: as specified in the datalist, provided that this won't
break any other rules such as those relating to protection and appendable
media.
2 Appendable Media
-----------------Media in 'Good' condition, with some currently protected data objects,
but the media is not full. The pool must be 'appendable'.
This media set is sorted according to the time of the last write.
The most recently written medium is listed first.
Order of use: when one or more media have protected objects, the most
recently written media is reused first.
3 Uninitialized Media
--------------------Media is assumed by Data Protector to not yet have a Data Protector
header and that it can be auto-initialized as required, during backups.
The pool policy must be Loose to allow auto-initialization and the global
file needs InitOnLoosePolicy=1.
This media set is only available in exchanger devices.
This media set is sorted with 'Blank' media ahead of media with an
'Unknown' header.
Order of use:
a. 'Blank' media is used first.
b. 'Unknown' media is only used when there is no 'Blank' media.
4 Free Media
-----------Media in 'Good' condition with no currently protected objects.
This media set is sorted according to the time of the last write.
The least recently written medium is listed first.
Order of use: least recently medium is used first.
5 Overflow Media
---------------Media in 'Fair' condition with no currently protected objects.
This media will only be used if no 'Good' condition media are available.
This media set is sorted according to the total number of overwrites.
The medium with the least number of overwrites is listed first.
Order of use: least recently medium is used first.
* Unclassified Media
Media in the following categories are not classified into any of the sets
by Data Protector. As a result, they are not allocated for use by Data
Protector.
- Media in 'Fair' condition which is protected.
- Media in 'Poor' condition.
- Media which is recognized by Data Protector as having a header for
another backup utility such as 'tar' or 'fbackup'.
Other Factors Relating to Media Usage
=====================================
* Strict Policy
--------------The Strict allocation policy is not directly related to the use of a
preallocation list. A preallocation list can be used by both Loose or
Strict policy. The order of media use is generally the same for Loose
and Strict policy. The difference is in Data Protector's response when
the medium in the device is not the one dictated by the allocation rules.
Strict policy means that Data Protector will not use any other medium
than the one its own rules indicate should be used.
If the policy is Loose, any unprotected medium can be used, if found in
the device.
* Protected and Unprotected Data
-------------------------------The order that media are selected for use, depends in part on whether
or not the data on the media is protected. In general, if the data is
protected, a medium will be used for appending more data.
If the data is not protected, it will not be used for appending, and
will not be overwritten until no other medium is available.
Example 1:
--------A pool is configured as 'Appendable' and 'Loose'.
Five newly initialised media are loaded into a 48AL exchanger.
If several backups are made, with protection on the data, they will
all be appended to the first media.
Then several more backups are made, now with NO protection on the
data. The unprotected backups will also be appended to the first medium
and they will not overwrite each other.
Once a medium, in an appendable pool, has a protected object on it,
it is considered 'appendable.' Data Protector will now append protected
and unprotected data to the tape.
However, if the first data object is unprotected, the behavior changes.
Example 2:
--------Again, five newly initialized media are loaded into a 48AL exchanger.
If a backup is made with no protection, it will be written to the first
medium. A second unprotected backup will be written to the second medium.
Each subsequent unprotected backup will be written to a new medium, until
all five media are used.
The sixth unprotected backup will overwrite the first medium, which is
now the least recently used medium.
Because the data on each medium is unprotected, the media are not
considered appendable, even if the pool configuration is 'Appendable.'
Example 3:
--------Again, five newly initialized media are loaded into a 48AL exchanger.
A backup is made with no protection, and will be written to the first medium.
The second backup in this sequence is protected and it is written to the
second medium. The subsequent backups are all unprotected and they will be
appended to the second medium. The presence of a protected object on the
second medium makes it 'appendable.'
While any backup object on a medium is still protected, the whole medium is
prevented from being reused. Sometimes a medium that is expected to have
no active protection is rejected for use by OBII.
It may be that one object on the medium is actually still protected.
A typical scenario is that an ad hoc backup was added to a medium outside
the normal schedules. As the default protection is 'Permanent' this can be
what is preventing the medium being used. Check the medium in question with
this command:
omnimm -list_media <medium label> -detail | grep Protection
* First Session Medium
---------------------The expression 'first session medium' is found in the Data Protector
documentation. It refers to the medium that is used as the first in a
sequence of media, if the backup session requires more than one medium.
If the pool policy is appendable, only the medium that is used as first
in the session can be appended.
Subsequent media for that session must begin at the start of a medium
so they need to be empty or unprotected.
If the first session medium becomes full, and there are no empty or
unprotected media available, a mount prompt will occur. This will be
true even if some space remains on the other media in an exchanger.
Different parts of backup cannot be appended to the ends of several
different media.
* Cleaning Tape Usage
--------------------The cleaning status is NOT checked while a medium is in the drive and
being written to. The status of the cleaning request is checked only
when a medium is being loaded or changed. So, if the drive sets the
cleaning bit, part way through a backup session, the medium is not
immediately unloaded. It will be used until it is full, assuming that
there is enough data to fill it, in the current backup session.
When medium #1 is unloaded, the cleaning request will be checked, the
cleaning tape will be loaded, and used. After that, medium #2 will be
loaded to continue the backup. It is possible that medium #1 is in bad
shape and could be the cause of the cleaning request. However, Data
Protector assumes the medium is still 'Good' and does not mark medium #1
as 'Poor'. The medium will be used again, when it is the 'least recently
used'.
If medium #1 is really faulty, this will show up next time it is used,
when the write operations fail. Then it will be marked 'Poor' and not
used again.
Cleaning tapes are a fixed length, with just enough for '25 times 30
seconds' of cleaning. When 30 seconds of cleaning has completed
successfully, the clean bit on the drive is reset.
The cleaning tape moves forward, over one section of tape, for each 30
seconds of cleaning and it NEVER rewinds! It just moves along until it
gets to the end and then it stops.
Once it is at the end, it is an 'expired' cleaning tape. If you load
an 'expired' cleaning tape, the tape is active for less than 20 seconds,
it does not actually do any cleaning and the
cleaning bit is NOT reset. Data
operation when the drive sets the
done, Data Protector will recheck
Data Protector will terminate the
cleaning tape was requested twice
Protector can initiate a cleaning
cleaning bit. After the cleaning is
the cleaning bit. If it is still set,
session and will report that the
for the device.
* Initialized Size
-----------------The size that a tape media is initialized to will not ultimately affect
the amount of data that can be written to it. Data Protector writes to
the tape until the device reports early end of tape (EOT) warning.
If a tape is formatted to a smaller size than the physical size of the
tape, Data Protector will write to the end of tape, and then update the
Media Management (MM) database. The recorded tape size will be reset
to the value of the physical tape size.
The same thing applies to tapes that are initialized to a very large size.
Once the tape has been filled with data, the size will be reset in the
MM database.
* Statistical Information
------------------------The correct settings for the 'Full' flag and for 'Data Protection' are
the only tape details necessary for Data Protector operation.
The Total & Used sizes are statistical information only.
* Exchanger Slots
Data Protector does not care about the order of slots inside a random
access autoloader. It assumes that the slots it controls are assigned
exclusively to Data Protector and performs media allocation based on the
media allocation rules.
The rules do not relate to the order of media in the exchanger slots,
so Data Protector does not necessarily start with the lowest slot number
and progress towards higher slot numbers. The media allocation rules are
the same for small exchangers and large libraries.
Usefull Commands
================
-show_pool_alloc PoolName
Displays the sequence in which the media from the specified pool
will be used for backup. The report shows: sequence, medium label
and location.
Allocation order for pool : TAPE_AVISA-NORDLAND
Nr.
Medium Label
Location
=============================================================================
=
1
[CHD826S] TAPE_AVISA-NORDLAND_11
2
[CHD822S] TAPE_AVISA-NORDLAND_11 MSL5026: 9
3
[HCU713] TAPE_AVISA-NORDLAND_87 MSL5026: 4
4
[HCU720] TAPE_AVISA-NORDLAND_117 MSL5026: 24
5
[HCU701] TAPE_AVISA-NORDLAND_85 MSL5026: 1
-list_scratch_media PoolName
Displays media from the specified pool which are not protected
and can be used for backup. The report shows sequence, medium
label and location.
Allocation order for pool : TAPE_AVISA-NORDLAND
Nr.
Medium Label
Location
=============================================================================
=
1
[CHD822S] TAPE_AVISA-NORDLAND_11 MSL5026: 9
2
[HCU713] TAPE_AVISA-NORDLAND_87 MSL5026: 4
3
[HCU720] TAPE_AVISA-NORDLAND_117 MSL5026: 24
-show_repository_alloc Library PoolName
Displays the order in which the media in the repository of the
specified Library will be used. The report shows: sequence,
medium label, location and slot number.
Nr.
Medium Label
Location
Slot
=============================================================================
==
1
[CHD822S] TAPE_AVISA-NORDLAND_11 MSL5026: 9
9
2
[HCU713] TAPE_AVISA-NORDLAND_87 MSL5026: 4
4
3
[HCU720] TAPE_AVISA-NORDLAND_117 MSL5026: 24
24
4
[HCU701] TAPE_AVISA-NORDLAND_85 MSL5026: 1
1
5
[HCU702] TAPE_AVISA-NORDLAND_110 MSL5026: 2
2
-list_media Medium
Displays all the objects, their type and their protection status
for the medium you specified.
Object name: reserve.an.no:/E 'reserve.an.no [/E]'
Object type
: WinFS
Object status
: Completed
Started
: Saturday, October 07, 2006, 2:36:05 AM
Finished
: Monday, October 09, 2006, 5:25:09 AM
Object size
: 717452112 [KB]
Backup type
: Full
Protection
: None -(Missing media)
Catalog retention : None -(Missing media)
Access
: Private
Number of warnings
Number of errors
SessionID
Device name
Copy ID
:
:
:
:
:
0
0
2006/10/06-9
SAN_SDLT_1_avnoit01
2633 (Orig)
-list_appendable_media PoolName
Displays all appendable media from the specified media pool.
Appendable media of pool TAPE_AVISA-NORDLAND
Nr.
Medium Label
Location
=============================================================================
=
1
[CHD826S] TAPE_AVISA-NORDLAN
2
[HCU731] TAPE_AVISA-NORDLAND
Magasin 1B
-media_info Medium
Displays information on the given medium.
C:\omnimm -media_info DDS4-Pool_11 -detail
MediumID
Pool name
Library
Medium Label
Location
Medium Owner
Used kbytes
Total kbytes
Number of writes
Number of overwrites
Number of errors
Creation time
Time of last write
Time of last overwrite
Time of last access
Medium type
Write-protected
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
68fe3810:45065dae:132c:0001
DDS4-Pool
DDS4-Pool_11
wklu01.lux.hp.com
48960
9419264
2
5
0
Tuesday, January 17, 2006, 11:03:55 AM
Friday, October 20, 2006, 5:31:24 PM
Friday, October 20, 2006, 5:31:02 PM
Monday, October 30, 2006, 2:11:03 PM
HASNOCOPY
No
-check_protection MediumID
Displays the protection of the media.
Mount requests are often received from DP - Why?
================================================
Scenario :
--------Each night the library with tapes (media) is loaded, but in the morning
it's discovered backups have not completed because DP issued mount requests.
- Why did DP issue mount requests?
- How can it be ensured each day that the tape loaded in the library is OK
for the nights backups?
- Where can more be learned about how DP manages the tapes?
Explanations :
-------------Note: The following is written assuming the "Allocation Policy" for the pool
is set to the default... "loose." This can be checked as follows...
In the "Devices and Media" context click
Environment | Media | Choose the Media Pool in question
In the Allocation tab, confirm the setting for "Allocation" is loose.
Why did DP issue mount requests?
Looking as follows in the "Devices and Media" context,
clicking in the left pane...
Environment | Devices | <DP's name for the Library> |
highlight "Slots"
In the right pane could be seen a listing of the tapes in
the library.
From this listing could be seen a number of reasons why the
DP had been unable to use many of the tapes...
Some tapes were not in the correct Media Pool
Some tapes were protected.
Some tapes were not of good quality.
How can it be ensured each day that the tape loaded in
the library is OK for the nights backups ?
Load the library with the tapes for the evening.
In the "Devices and Media" context, click as follows
in the left pane
Environment | Devices | right click on the library
and select "Barcode Scan".
After the Scan continue ...
In the left pane double-click (to expand) the library
and highlight "Slots."
In the right pane one will see a listing of the library
slots, with information about the tape in each slot and
the tape's status.
Ensure there are plenty of tapes, with the following
criteria, for the coming night's backups
The tape's protection is either None or Expired.
They are assigned to the correct Media Pool.
Their Quality status is good.
Be sure to have more tapes than the minimum
DP will require. In case DP has a problem with a
tape it can return it to it's slot and continue using
other tapes from the library.
Where can one learn more about how DP manages the tapes?
Look in the Managing Media chapter of the DP
Administrator's Guide (C:\Program Files\OmniBack\Docs\Admin.pdf)
More about allocation order and manging medias
==============================================
First of all, the "allocation number" (allocation ORDER I would say better)
is a DYNAMIC information - it's ONLY build at the time you execute a command,
based on the ACTUAL pool status. It's NOT STORED in the Internal DataBase.
It's build EVERY TIME the internal commands are executed, included what is
shown
in the GUI.
For example, if the backup starts and takes the tape with allocation number
#1,
a NEW #1 will be assigned and it may be placed to a partially written tape
NOT
having an allocation order yet (even if that tape was used in the previous
backups).
It's only DYNAMICLY BUILD for backups to be started.
Every time you display the GUI, or execute a pool allocation order on command
line,
it is calculated and shown. There is no caching mechanism.
If you have backups using 2 drives or 2 backups using 1 drive each, using the
same
pool in parallel, the reasonable number of partially written tapes are 2.
Second, like it is said in the GUI, it's an allocation ORDER. It shows the
order in which DP will supply tapes to SINGLE-DRIVE backup when it will need
tapes.
Like mentioned in the previous explanations, only the FIRST tape per backup
(or per drive) can be appended. So IF you have THREE TAPES which EACH of them
have a PROTECTED data on it, ONE backup CANNOT use them all !
And you shall see an allocation order #1 for the tape with PROTECTED data,
and #2, #3, #4 etc... on the expired tapes.
This means that for a multi-tape backup, we can have a mount request IF there
are NO expired tapes in the pool, or fresh blank tapes available.
For example if the pool has 2 tapes in the library, and BOTH have protected
data, only ONE of the tapes is used and the other is ruled OUT (excluded).
Some more hints :
----------------1) media pools are NOT multi-library designed.
2) if media pool contains "qualifying" tapes (I mean, candidate for a backup)
which are NOT in the library (or are in another library) DP may ask for a
MOUNT
REQUEST to obtain such a tape even if the FREE POOL is configured and has
some
tapes available. Free pool is ONLY used when regular pool runs out-of-tapes,
which is NOT the case here.
3) avoid having multiple partially-written tapes from the same pool in
library.
They are just waste of space. In fact, each expired / empty tape may match a
maximum REASONABLE number of partially written tapes in the pool.
This number is equal to the number of devices used in parallel.
For example, if you have a backup using 2 drives and the same pool, 2
partially
written tapes are OK, 3 are waste of space.
4) avoid mixing backups with 2 different protection.
5) avoid tampering (try to change) with the tape order chosen by DP.
Download