This discussion is archived
5 Replies Latest reply: Aug 21, 2012 7:41 AM by user1395390 RSS

labelvol and Created date

user1395390 Newbie
Currently Being Moderated
Occassionally I will need to free up some volumes by using the labelvol command to force relabeling of a volume that has not expired. The command looks like this:

obtool labelvol obtaropt -Xfamily:RMAN30DT drive VTL2011-T01 --force <se-range>

The media family RMAN30DT is defined like this:
# obtool lsmf RMAN30DT
RMAN30DT write 4 days keep 14 days

This morning - Aug 20, 2012, I picked this volume (OB1016JA) that was scheduled to expire later this evening:

]# obtool lsvol -f RMAN30DT|grep 'expires 08/20'|sort -k 5,5|more
41659 41659 1 RMAN30DT-012218 OB1016JA RMAN30DT 08/02.23:03 closed; expires 08/20.23:03

I relabeled this volume (OB1016JA) this morning - Aug 20, 2012. And it was immediately used. Note the Created date:

# obtool lsvol -c -b OB1016JA
VOID OOID Seq Volume ID Barcode Family Created Attributes
44183 44183 7 RMAN30DT-012720 OB1016JA RMAN30DT 08/14.22:10 closed; expires 09/01.22:10
BSOID File Sect Level Host Size Created Attributes
1305291 79 6 0 lnx20216 4.7 GB 08/18.20:07

]# obtool lsvol -l -b OB1016JA
Volume OID: 44183
Volume ID: RMAN30DT-012720
Barcode: OB1016JA
Volume sequence: 7
Media family: RMAN30DT
Current location: VTL2011
Label host: lnx20206
Created: 2012/08/14.22:10
Closes: 2012/08/18.22:10 (closed)
Expires: 2012/09/01.22:10
Space remaining: 0
Original OID: 44183


My problem is this: because I have a write window of 4 days, and the Created data is 8/14, the volume was marked as closed after it was used this morning. That means I used 4.7Gb on this volume, when it can hold 100Gb. How do I force an update of the Created date when I label the volume so that I get a full 4 day write window? i.e, the labelvol should also reset the Created date.

Thanks,
Rich McClain
  • 1. Re: labelvol and Created date
    user25407 - oracle Journeyer
    Currently Being Moderated
    You can't update the create date. The write-window is applicable to every volume in the volume set...so if volume 1 was created at "x" date/time, that begins the write window clock. As tapes are spanned, each new tape labeled inherits the original write-window timer so to speak.

    Donna
  • 2. Re: labelvol and Created date
    user1395390 Newbie
    Currently Being Moderated
    Thanks, Donna. That makes sense.

    I'm seeing a lot of auto-swap errors that end up with jobs in a waiting state. But when I look at the volumes available in the media family, I see many that are open and have free space. Here is an example:

    Job oracle/445146.1 ended up in a wait state.
    Error: couldn't perform auto-swap - can't find usable volume in library (OB device mgr)
    Enter a command from the following list:
    load <n> .. load the tape from element <n> into the drive
    unload <n> .. unload the tape from the drive into element <n>
    help .. display other commands to modify drive's database
    go .. to use the tape you selected
    quit .. to give up and abort this backup or restore

    Looking at the available volumes shows this:
    # obtool lsvol -f RMANDRPROD|grep open|sort -k 7,7
    <snipped>
    44293 44293 7 RMANDRPROD-006783 OB1785JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    43522 43522 1 RMANDRPROD-006640 OB1711JA RMANDRPROD 08/15.06:47 open; closes 08/22.06:47
    44060 44060 2 RMANDRPROD-006735 OB1724JA RMANDRPROD 08/15.06:47 open; closes 08/22.06:47
    44078 44078 3 RMANDRPROD-006752 OB1740JA RMANDRPROD 08/15.06:47 open; closes 08/22.06:47
    <snipped>
    And looking at volume OB1785JA, we see that it is open and <100Gb
    # obtool lsvol -c -b OB1785JA
    VOID OOID Seq Volume ID Barcode Family Created Attributes
    44293 44293 7 RMANDRPROD-006783 OB1785JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    BSOID File Sect Level Host Size Created Attributes
    1306625 93 2 0 lnx612 31.9 GB 08/21.03:10
    1306628 94 1 0 lnx612 51.9 MB 08/21.05:03
    1306641 95 1 0 lnx612 26.4 MB 08/21.05:04
    # obtool lsvol -m -b OB1785JA
    VOID OOID Seq Volume ID Barcode Family Created Attributes
    43521 43521 1 RMANDRPROD-006639 OB1710JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    44061 44061 2 RMANDRPROD-006736 OB1725JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    44074 44074 3 RMANDRPROD-006746 OB1736JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    44090 44090 4 RMANDRPROD-006759 OB1749JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    44099 44099 5 RMANDRPROD-006766 OB2186JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    44226 44226 6 RMANDRPROD-006771 OB1589JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24
    44293 44293 7 RMANDRPROD-006783 OB1785JA RMANDRPROD 08/15.06:24 open; closes 08/22.06:24

    But catxcr for this job shows this - the volume was rejected multiple times during the duration of the job.

    # grep -n OB1785JA job445146.txt
    4609:(mmr) oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) has sticky media family RMANDRPROD that matches
    4610:(mmr) db says oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) doesn't expire 'til 2012/09/05.06:24:05 -- NOT OK to use

    15403:(mmr) oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) has sticky media family RMANDRPROD that matches
    15404:(mmr) db says oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) doesn't expire 'til 2012/09/05.06:24:05 -- NOT OK to use

    23601:(atv) db says oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) doesn't expire 'til 2012/09/05.06:24:05 -- NOT OK to use

    26198:(mmr) oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) has sticky media family RMANDRPROD that matches
    26199:(mmr) db says oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) doesn't expire 'til 2012/09/05.06:24:05 -- NOT OK to use

    I even tried to force the job to consider this volume by loading it:
    Enter a command from the following list:
    load <n> .. load the tape from element <n> into the drive
    unload <n> .. unload the tape from the drive into element <n>
    help .. display other commands to modify drive's database
    go .. to use the tape you selected
    quit .. to give up and abort this backup or restore
    : load 785
    08:22:19 DOLM: load 785 (for VTL2011-T41 (raw device "/dev/sg75"))
    08:22:23 DOLM: ok
    : go
    08:47:10 DOLM: nop (for VTL2011-T41 (raw device "/dev/sg75"))
    08:47:10 DOLM: ok
    08:47:10 A_O: using max blocking factor 2048 from device object
    08:47:10 A_O: resetting read and write error counters to 0
    08:47:10 A_O: tape device is local
    08:47:10 A_O: Devname: IBM,03592J1A,044C
    08:47:10 Info version: 11
    08:47:10 WS version: 10.4
    08:47:10 Driver version: 10.4
    08:47:10 Max DMA: 1048576
    08:47:10 Blocksize in use: 1048576
    08:47:10 Query frequency: 134217728
    08:47:10 Rewind on close: false
    08:47:10 Can compress: true
    08:47:10 Compression enabled: true
    08:47:10 Device supports encryption: false
    08:47:10 8200 media: false
    08:47:10 Error threshold: 8%
    08:47:10 Remaining tape: 0

    (atv) qdv__automount_this_vol entered
    (atv) calling qdv__mount
    (mt) qdv__read_mount_db() succeeded, found vol_oid 0
    (mt) qdv__read_label() succeeded; read 65536 bytes
    (mt) exp time obtained from label
    (mt) qdb__label_event() returned vol_oid 44293
    (mt) setting vol_oid in mount_info to 44293
    (mt) updated volume close time from db
    (atv) qdv__mount succeeded
    (atv) db says oid 44293 (vid RMANDRPROD-006783, tag OB1785JA, create_time 1345026245, mediainfo 0) doesn't expire 'til 2012/09/05.06:24:05 -- NOT OK to use
    (atv) automount failed - can't overwrite; volume set not expired (OB device mgr)
    (atv) qdv__automount_this_vol exited
    Error: loaded volume is not usable - can't overwrite; volume set not expired (OB device mgr)
    Unloading the volume
    08:47:17 DOLM: nop (for VTL2011-T41 (raw device "/dev/sg75"))
    08:47:17 DOLM: ok
    08:47:17 A_O: using max blocking factor 2048 from device object
    08:47:17 A_O: resetting read and write error counters to 0
    08:47:17 A_O: tape device is local
    08:47:17 A_O: Devname: IBM,03592J1A,044C
    08:47:17 Info version: 11
    08:47:17 WS version: 10.4
    08:47:17 Driver version: 10.4
    08:47:17 Max DMA: 1048576
    08:47:17 Blocksize in use: 1048576
    08:47:17 Query frequency: 134217728
    08:47:17 Rewind on close: false
    08:47:17 Can compress: true
    08:47:17 Compression enabled: true
    08:47:17 Device supports encryption: false
    08:47:17 8200 media: false
    08:47:17 Error threshold: 8%
    08:47:17 Remaining tape: 0
    08:47:17 RSMD: rewrote mount db for VTL2011-T41

    So the question is: why is this volume not usable for this job?

    As I'm writing this, I realize it is long - I'll open an SR if you prefer.

    Thanks,
    Rich
  • 3. Re: labelvol and Created date
    user1395390 Newbie
    Currently Being Moderated
    To add insult to injury :-), a job that started after the job referenced above (that was in a waiting state), using the same media family, successfully mounted and is writing to a volume that was rejected by the waiting job multiple times. It's like the waiting job just will will not consider this available volumes for some reason. But a new job does.

    Rich
  • 4. Re: labelvol and Created date
    user25407 - oracle Journeyer
    Currently Being Moderated
    Rich,

    When a backup spans tapes, the next volume (ie Vol 2) must be an unlabeled tape. OSB will append to an open/appendable tape when starting a new backup of that media family. However, if that backup spans a tape..that next tape must be started from the beginning of a tape (ie unlabeled tape).

    Is that what you are seeing?

    Donna
  • 5. Re: labelvol and Created date
    user1395390 Newbie
    Currently Being Moderated
    Donna,

    That is exactly what is happening! The waiting job had successfully mounted, written to, and filled, a volume, and was then looking for another one. And there are no volumes in this family are are unlabelled (actually none in that media family that appear with this command "obtool lsvol --novid"). I now recall that we discussed this once before. Thanks very much for the explanation. It explains what I'm seeing. The logic, however, creates quite a constraint for us. I have many volumes that are open and have free space. A large backup that fills up one of the volumes will then go into a wait state. My only options are to 1) cancel the job, 2) relabel some volumes and answer the prompts to load and go using a newly labelled volume 3) or (longer term) allocate more volumes in the library.

    Thanks,
    Rich

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points