DPM / NAS "offline"

The technical support forum for Firestreamer (the virtual tape library).
Locked
KMS
Posts: 4
Joined: 12 Mar 2012, 09:28

Post by KMS »

jsf
Cristalink Support
Posts: 300
Joined: 29 Aug 2010, 09:03

Post by jsf »

You can write a script to automatically load and unload tapes as needed, see Automation.

On a side note, I don't think it's a good idea to use NAS in drive media mode as a single tape, see How many tapes of which sizes should I use?
Best regards,
John Smith
Cristalink Support
KMS
Posts: 4
Joined: 12 Mar 2012, 09:28

Post by KMS »

Thank you John, the script does work with media files while we use drive media. Is there any way to get this working with drive media also or do I need to change the type to media files ?

We have configured 4 tapes for each NAS with 2 GB each already, thanks.
jsf
Cristalink Support
Posts: 300
Joined: 29 Aug 2010, 09:03

Post by jsf »

Your script needs to do the following:

1. Detect that NAS goes online or offline (unless the script execution is triggered by some external event).
2. Unlock the library door in DPM.
3. Prepare a new media layout as needed.
4. Update the media layout in Firestreamer.
5. Lock the library door in DPM.

It doesn't matter whether it's drive media or file media. In the first case, the media layout will contain entries like drive://D: or, better, drive://<VolumeName>. In the second case, the entries will look like file://\\ShareName\FolderName\FileName.fsrm.
Best regards,
John Smith
Cristalink Support
KMS
Posts: 4
Joined: 12 Mar 2012, 09:28

Post by KMS »

John, I have prepared the following script to handle the automatic media change:

Crate the media layout file:

________________________________________________________________________________________________________________________

'-------------------------------------------
'
' com.vbs
'
' Before using the Firestreamer COM interface, you need to register it first with the following command line:
'
' For a 32-bit operating system:
' C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase "C:\Program Files\Cristalink\FsChanger\FirestreamerInterface.dll"
'
' For a 64-bit operating system:
' C:\Windows\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase "C:\Program Files\Cristalink\FsChanger\FirestreamerInterface.dll"
'
'-------------------------------------------

' Create the controller object.
set ctl = CreateObject( "Firestreamer.Controller" )

' You have to connect to the Firestreamer Storage Controller driver before sending any commands.
ctl.Connect

' The following commands will use Library #1.
libraryNumber = 1

' Save the initial media layout to a file. The destination file must have a zero length.
set fso = CreateObject("Scripting.FileSystemObject")
file = "D:\Konfiguration\Firestreamer\ChangeMedia\MediaLayout.fsmap"
fso.CreateTextFile( file, true ).close
ctl.ChangerGetInitialMediaMapToFile libraryNumber, file

' Disconnect and clean up.
ctl.Dispose

________________________________________________________________________________________________________________________

Use the created file to load it in the library:

[System.Reflection.Assembly]::LoadFrom("c:\Program files\Cristalink\FsChanger\FirestreamerInterface.dll")
$FireTape = New-Object -TypeName Firestreamer.Driver.Controller
$FireTape.Connect()

$AllLibraries = get-dpmlibrary -dpmservername nuebk002 |where-object {$_.ProtectionGroups -ne ""}
Unlock-DPMLibraryDoor -DPMLibrary $AllLibraries -Confirm:$false
$libraryNumber = 1
Write-Host "Library door unlocked"

$mapfile = "D:\Konfiguration\Firestreamer\ChangeMedia\MediaLayout.fsmap"
$FireTape.ChangerLoadMediaFromfile($libraryNumber,$mapfile)
Write-Host "Media map loaded"

Lock-DPMLibraryDoor -DPMLibrary $AllLibraries
Write-Host "Library door locked"

Start-DPMLibraryInventory -DPMLibrary $AllLibraries -DetailedInventory
Write-Host "Detailed inventory"

________________________________________________________________________________________________________________________

This usually does work well however there seems to be anything wrong with the media file and I do not figure out what the problem is. This media file for example looks like this:

S*||drive://\??\Volume{98dd7777-983b-11e1-a7af-005056b1001d}|190000
S*||drive://\??\Volume{98dd7786-983b-11e1-a7af-005056b1001d}|190001
S*||drive://\??\Volume{98dd7787-983b-11e1-a7af-005056b1001d}|190002
S*||drive://\??\Volume{98dd7788-983b-11e1-a7af-005056b1001d}|190003

I am getting the following errors in FS:

06/20/2012 10:36:25 | Success | M022 | L1 | The media map file was loaded successfully. | |

06/20/2012 10:36:36 | Error | E016 | L1 | Unable to open the medium [\??\Volume{98dd7777-983b-11e1-a7af-005056b1001d}]: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7777-983b-11e1-a7af-005056b1001d} |

06/20/2012 10:36:36 | Error | E025 | L1 | Unable to insert the medium [drive://\??\Volume{98dd7777-983b-11e1-a7af-005056b1001d}] into a tape drive: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7777-983b-11e1-a7af-005056b1001d} |

06/20/2012 10:36:36 | Error | E016 | L1 | Unable to open the medium [\??\Volume{98dd7786-983b-11e1-a7af-005056b1001d}]: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7786-983b-11e1-a7af-005056b1001d} |

06/20/2012 10:36:36 | Error | E025 | L1 | Unable to insert the medium [drive://\??\Volume{98dd7786-983b-11e1-a7af-005056b1001d}] into a tape drive: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7786-983b-11e1-a7af-005056b1001d} |

06/20/2012 10:36:36 | Error | E016 | L1 | Unable to open the medium [\??\Volume{98dd7787-983b-11e1-a7af-005056b1001d}]: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7787-983b-11e1-a7af-005056b1001d} |

06/20/2012 10:36:36 | Error | E025 | L1 | Unable to insert the medium [drive://\??\Volume{98dd7787-983b-11e1-a7af-005056b1001d}] into a tape drive: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7787-983b-11e1-a7af-005056b1001d} |

06/20/2012 10:36:36 | Error | E016 | L1 | Unable to open the medium [\??\Volume{98dd7788-983b-11e1-a7af-005056b1001d}]: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7788-983b-11e1-a7af-005056b1001d} |

06/20/2012 10:36:36 | Error | E025 | L1 | Unable to insert the medium [drive://\??\Volume{98dd7788-983b-11e1-a7af-005056b1001d}] into a tape drive: Das System kann die angegebene Datei nicht finden [C0000034] | drive://\??\Volume{98dd7788-983b-11e1-a7af-005056b1001d} |

Do you have any idea what is going wrong and what I can do to fix this ?
jsf
Cristalink Support
Posts: 300
Joined: 29 Aug 2010, 09:03

Post by jsf »

>>This usually does work well

Are you saying that the problem is intermittent?

Do you change four external drives at a time? Do you have a separate media map for each set of four drives?

What causes the script to run?
Best regards,
John Smith
Cristalink Support
KMS
Posts: 4
Joined: 12 Mar 2012, 09:28

Post by KMS »

Hi John, thanks for your reply. We have 4 drives each represents a tape in 3 small NAS systems running. Those systems are rotating so the tapes do change.

We build on media map for each NAS which we try to call in the script. Before the script is executed a batch file checks which NAS system is attached and does use the correct media map file.

That’s how we like to get it working however this fails with the above errors.

This is a example of the media map file we have loaded at the moment which is working while doing a tape backup:

S1||drive://\??\Volume{b28d417e-8888-11e1-86de-001e4f37641e}|130000
S2||drive://\??\Volume{b28d4181-8888-11e1-86de-001e4f37641e}|130001
S3||drive://\??\Volume{b28d4184-8888-11e1-86de-001e4f37641e}|130002
S4||drive://\??\Volume{b28d4187-8888-11e1-86de-001e4f37641e}|130003

And this is the result if I build a new media map file with the same NAS attached yet:

S1||drive://\??\Volume{b28d417e-8888-11e1-86de-001e4f37641e}|20000
S2||drive://\??\Volume{b28d4181-8888-11e1-86de-001e4f37641e}|20001
S3||drive://\??\Volume{b28d4184-8888-11e1-86de-001e4f37641e}|20002
S4||drive://\??\Volume{b28d4187-8888-11e1-86de-001e4f37641e}|20003

I do notice differences at the end of each drive behind the |.

Might this be a issue or is this just not relevant as this part of the line is ignored ?
jsf
Cristalink Support
Posts: 300
Joined: 29 Aug 2010, 09:03

Post by jsf »

The format of a media map file is described at https://www.cristalink.com/fs/hh.aspx?id=map. The "reserved" field is ignored.

When you save a media map in the Media Layout Editor, the reserved fields in the resulting file are empty. Where did you get the numbers for the reserved field from? In any case, they don't matter.

As to intermittent failures, I guess that your script is triggered by some condition. You need to introduce some delay at the beginning of your script, 10 seconds or so, to give Windows enough time to properly configure the newly arrived volumes before they can be used by Firestreamer.
Best regards,
John Smith
Cristalink Support
Locked