Pokazywanie postów oznaczonych etykietą backup. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą backup. Pokaż wszystkie posty

wtorek, 3 lutego 2015

IBM TS3100 - You can reuse cleaning tapes labels

IBM TS3100 is LTO tape library (autoloader). Onboard software offers auto cleaning feature. The library makes decision when to load and use cleaning tape. To use that feature you have to reserve one or more slots for cleaning tapes at management webapp. (Other method is not to use auto cleaning and schedule cleanings at backup software installed on server.)

Screenshot below, active slots set to 21, so slots no. 22 and 23 are reserved for cleaning tapes (Symantec BackupExec can see only 1-21 slots and the portal slot)



This is cleaning tape from IBM with genuine label (included with TS3100 device). You can see label which begins with CLNU prefix and L1 suffix.


This is reorder code included on that tape (photo below) - 35L2086:


The LTO library alerted me that both of our cleaning tapes are worn out (50 loads per tape). I did ordered another two tapes using reorder code 35L2086.

But the new 35L2086 came without labels (photo below):


Some questions appeared in my head:

  • Does library really need a label on a tape? There are slots reserved for cleaning tapes. LTO tapes have got number of uses stored on chip - so library does not have to store it in own memory and to refer by label ID, does it? Empty slot in magazine has its own label - so library can recognize if slot is occupied even if tape has not a label on it, can't it?
  • Can I use any new label on a tape with auto cleaning feature (with no CLNU prefix)?
  • Can I reuse a label from old tape? Can it be safely removed without being damaged? How onboard software manage new tape (new chip) and label with already known ID.
  • Will I have to make an order for new custom labels (which is not cheap and takes time)?
All screenshot below are taken after first new tape (slot 23) was forced to work with the library. Watch slot 22 at screenshots below.

The management webapp alerts "end of life" of tape at 22 (50 media loads):



I am taking away old tape from 22 slot (by removing whole right magazine).

Slot 22 is empty. Label value is "-----------".

I am exchanging tape at 22 with new cleaning tape WITHOUT any label on it (by removing whole right magazine).
The unlabeled tape is at slot 22 (screenshot above). Label value is "Unknown". The library can notice that slot is occupied but it does not try to read a tape. There is NO "Cleaning Tape" in a "Comment" column. You cannot also choose slot 22 for cleaning task from webapp (only 23 slot is on dropdown list).

Now I am removing genuine label sticker from old IBM tape. I have to use Victorinox knife to catch a corner at first. Then I am pulling a label. The label sticker is strong enough. It's in one piece after operation. Then I putting a label back to new tape. It sticks very well. It won't fall off.

I am putting new tape labeled with old sticker into slot 22 once again.

Now slot 22 is recognized as "Cleaning Tape" (still don't know if "CLNU" prefix has something in common). Notice that "Media Loads" is without value (it was 50 earlier with the same label).

Now I am forcing to clean a drive with webapp menu. Slot 22 is available as cleaning tape source.


Works! After job is completed "Media Loads" is incremented to 1 for this tape.

My ass The world is saved!

Conclusions:

  1. You can reuse old labels because they are strong and TS3100 has no problem with duplicating ID on new tape. Still don't know if there is possibility to use any new label - without CLNU prefix. Maybe (I didn't want to loose any of new label for this exercise).
  2. Reorder No. on IBM tape does not determine if the label is included.
  3. While ordering custom labels for new labels - add some labels for future cleaning tapes.




poniedziałek, 6 maja 2013

BACKUP SERVICE MASTER KEY with date in file name

A service master key is created when SQL Server instance is run for the first time. And it's regeneratred every time you change service account or its password. You should protect it with backup.

Syntax for BACKUP SERVICE MASTER KEY is described here:
http://msdn.microsoft.com/en-us/library/ms190337.aspx

Important notice is it does not allow to overwrite previous file. So you have to delete it before executing statement or use unique file names for every day backup.

This is my simple script to have BACKUP SERVICE MASTER KEY done with date in file name (so it's unique per day). It's compatible with SQL Server 2008 and above (older releases does not allow to set value while declaring variable).

Feel free to use it!


DECLARE @tsql NVARCHAR(512)
DECLARE @holder NVARCHAR(16) = '{DATE}'
DECLARE @path_to_file NVARCHAR(256) = 'D:\sqlbackup\keys\service_master_key_{DATE}.bak'
DECLARE @password NVARCHAR(16) = 'mysecretpassword'
DECLARE @current_day_string NCHAR(8) = CONVERT(NCHAR(8),GETDATE(),112)

SET @path_to_file = REPLACE(@path_to_file, @holder, @current_day_string)
SET @tsql = 'BACKUP SERVICE MASTER KEY TO FILE = '''+@path_to_file+''' ENCRYPTION BY PASSWORD = '''+@password+''''

EXECUTE sp_executesql @tsql