3 Replies Latest reply: Apr 3, 2012 10:57 AM by rdoogan-Oracle RSS

    How to re-use expired tapes?

    525819
      Hello,

      OSB 10.3.0.3, Oracle 11.2.0.1

      I deleted old backups via OEM using "delete all obsolete" and "delete all expired". All volumes in this media family (GENERIC) have "contents manages re-use" flag. A particular [example] volume visibly has no contents, as judged by:

      ob> lsvol -l --library taperobot
      in 16: volume GENERIC-000015, barcode CJ6049L1, oid 496

      ob> lsvol -b CJ6049L1 --contents
      VOID OOID Seq Volume ID Barcode Family Created Attributes
      496 496 GENERIC-000015 CJ6049L1 never closes



      Despite that, OSB does not re-use it, the command "reusevol" does not work either:
      ob> reusevol --drive tape1 16
      Error: can't overwrite volume GENERIC-000015 - volume contains non-deleted backup section(s)

      I know there is --force option for "reusevol", but I would like to understand what is wrong, because using the command "reusevol" in a long run is not an option.
      More generally speaking, what should I do to ensure automatic recycling of expired tapes?

      Thanks a lot for your answers.
      Dmitry.
        • 1. Re: How to re-use expired tapes?
          rdoogan-Oracle
          Firstly I suggest you upgrade to OSB10.4.0.1.0 as that includes several bug fixes and enhancements, including handling media expiration.

          But you can query the tape to list the contents, for example I have this

          obtool lsvol -c -b BDN20661
          VOID OOID Seq Volume ID Barcode Family Created Attributes
          21957 21957 4 RMAN-Backups-005180 BDN20661 RMAN-Backups 2010/08/09 closed; content manages reuse
          BSOID File Sect Level Host Size Created Attributes
          288570 337 2 0 dadbeh01 18.7 GB 2010/08/24 deleted
          288577 338 1 0 dadbeh01 54.8 GB 2010/08/24 deleted
          288591 339 1 0 dadbeh01 54.8 GB 2010/08/24 deleted
          288595 340 1 0 dadbeh01 54.5 GB 2010/08/24 deleted
          288599 341 1 0 dadbeh01 54.4 GB 2010/08/24 deleted
          288603 342 1 0 dadbeh01 54.2 GB 2010/08/24 deleted
          288604 343 1 0 dadbdh01 14.4 GB 2010/08/24 deleted
          288606 344 1 0 dadbdh01 28.5 GB 2010/08/24 deleted
          288607 345 1 0 dadbdh01 90.8 MB 2010/08/24 deleted
          288608 346 1 0 dadbdh01 90.8 MB 2010/08/24 deleted
          288613 347 1 0 dadbdh11 2.7 GB 2010/08/24 deleted
          288614 348 1 0 dadbdh11 28.5 MB 2010/08/24 deleted
          288616 349 1 0 dadbdh11 28.5 MB 2010/08/24 deleted
          295827 350 1 0 dadbeh07 4.2 GB 2010/09/06 deleted
          295828 351 1 0 dadbeh07 4.3 GB 2010/09/06 deleted
          295829 352 1 0 dadbeh07 2010/09/06 content manages reuse


          So from my example there is a piece still holding this tape from expiring. We can then use "obtool lspiece" to see if the piece is still really there :

          obtool lspiece | more
          POID Database Content Copy Created Host Piece name
          316137 stproj full 0 10/07.02:34 dadbdh07 oamof9co_1_1
          316144 stproj incremental 0 10/07.02:58 dadbdh07 o6mof7n9_1_2
          316474 stproj incremental 0 10/08.03:22 dadbdh07 ocmog432_1_2
          316481 stproj incremental 0 10/08.03:29 dadbdh07 oemoh6vm_1_2
          316490 stproj incremental 0 10/08.03:37 dadbdh07 ogmohs7u_1_2
          316746 stproj incremental 0 10/09.02:41 dadbdh07 olmoioa0_1_2
          316748 stproj incremental 0 10/09.02:46 dadbdh07 onmojrb1_1_2
          316752 stproj incremental 0 10/09.02:50 dadbdh07 opmokgdj_1_2
          317025 stproj incremental 0 10/10.02:48 dadbdh07 oumolcoi_1_2
          317027 stproj incremental 0 10/10.02:52 dadbdh07 p0momfks_1_2
          317029 stproj incremental 0 10/10.02:57 dadbdh07 p2mon4o7_1_2
          317248 stproj incremental 0 10/11.02:54 dadbdh07 p7moo129_1_2
          317250 stproj incremental 0 10/11.02:59 dadbdh07 p9mop41f_1_2
          317252 stproj incremental 0 10/11.03:04 dadbdh07 pbmopp5h_1_2
          317529 stproj incremental 0 10/12.02:49 dadbdh07 pgmoqlb9_1_2
          317531 stproj incremental 0 10/12.02:53 dadbdh07 pimorof6_1_2
          334848 repos archivelog 0 12/16.06:44 dadbdo01(DELETED) gvmuar1k_1_1
          334849 repos archivelog 0 12/16.06:45 dadbdo01(DELETED) h2muar1l_1_1
          334850 repos archivelog 0 12/16.06:47 dadbdo01(DELETED) h5muar1m_1_1
          334852 repos archivelog 0 12/16.06:44 dadbdo01(DELETED) gumuar1k_1_1
          334854 repos archivelog 0 12/16.06:49 dadbdo01(DELETED) h3muar1l_1_1
          334855 repos archivelog 0 12/16.06:47 dadbdo01(DELETED) h4muar1m_1_1
          334888 repos autobackup 0 12/16.07:40 dadbdo01(DELETED) c-1742670991-20111216-01
          334926 iasdb full 0 12/16.19:03 dadbdh11 hpmuc6eh_1_1

          From that list I can see there is nothing in lspiece that was created back in 2010, so for whatever reason that section on the tape didn't delete out.

          So in this case we can reusevol (with force) to blank the tape out.

          Hope that helps.

          Rich
          • 2. Re: How to re-use expired tapes?
            525819
            Hi Rich,

            Yes, I firstly listed backup pieces (via web obtool) registered on tapes in question (there were no pieces). Then I made sure that all backup sections on these tapes are deleted. Then I "removed" these tapes using button "remove". Then I listed volumes, and finally issued command "reusevol --force ..." in command line mode.

            Kind of a hassle.. Hope new OSB 10.4 can manage tape recycling as it described in the documentation.

            I assume upgrade to 10.4 retains the database of backups, is that correct?

            Thanks.
            Dmitry
            • 3. Re: How to re-use expired tapes?
              rdoogan-Oracle
              Yes the upgrade will just update the software, all your configuration is held in the admin folder and is retained during that process. You just have to upgrade your clients too.

              Thanks

              Rich