Rsdiag Examples

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

RsDiag Examples

Example 1: Display the engine database

The following command displays diagnostic information about the Remote Storage Engine database (EngDb).

rsdiag /d e

The Engine database consists of the following three tables:

  • The Segment Table associates the placeholder for a file to the location in remote storage where the file data is stored. This is done by mapping the BAG (migration group) identifier and location to the media storage.

  • The Media Table associates the media identifier to an external media name that is used by the media management subsystem.

  • The BAG Information Table contains global information about each BAG (migration group). There is one entry for each BAG.

Segment Table

Short Name Long Name Description

BagId

BAG ID

A GUID that uniquely identifies the migration group of the file. A BAG is a group of files migrated in the same job and stored in a single data set (MTF/BKF) on the remote media. Remote Storage uses the BAG ID to locate and recall files.

StartLoc

BAG Segment Start Location

The starting position of this segment within the BAG.

SegLen

BAG Segment Length

The length of this segment of the BAG. This length can extend to the entire BAG or only a portion of the BAG.

LocType

Location Type

Indicates whether this location is a media location or a logical redirection to another BAG and location.

PrimPos

Primary Location Position Specifier

For media locations, this is a media identifier. For logical redirections, this is a BAG identifier.

SecPos

Secondary Location Position Specifier

For media locations, a starting location on media. For logical redirections, a BAG start location.

IDB SeqNum

 

The database sequence number, indicating the sequence in which this record was originally added to the database

Segment Table dump example

00000  BagId = {b010419f-fb1b-11d1-a1ba-00a0c9190447}, StartLoc = 3072, SegLen = 52224, LocType = 0, PrimPos = {b0104199-fb1b-11d1-a1ba-00a0c9190447}, SecPos = 0  (IDB SeqNum =      1)

Media Table

Short Name Long Name Description

Id

Media ID

 

NtmsId

 

The media handle of the media identifier for the Media Service. This is a Removable Storage Management (RSM) Media ID.

StoragePoolId

Storage Pool ID

A unique storage pool identifier.

IDB SeqNum

 

The database sequence number, indicating the sequence in which this record was originally added to the database.

Media Table dump example

00000  id = {b0104199-fb1b-11d1-a1ba-00a0c9190447} ntmsId = {da96022d-fb19-11d1-a1ba-00a0c9190447} StoragePoolId = {e5390a42-fb19-11d1-a1ba-00a0c9190447} (IDB SeqNum =      1)

BAG Information Table

Short Name Long Name Description

Type

 

The record type.

BagId

BAG ID

A GUID created when the BAG is initially created.

BirthDate

BAG Birthdate

The date and time the BAG was created.

Len

Original BAG Length

The actual length of the BAG at create time.

Type

BAG Type

Not currently used.

VolId

Volume ID

The managed volume from which the data in this BAG was originally taken.

DeletedAmount

Deleted BAG amount

The amount of space within the BAG that has been deleted. Not currently used.

RemoteDataSet

Remote Data Set Number

The unique ID used on media to identify this session.

IDB SeqNum

 

The database sequence number, indicating the sequence in which this record was originally added to the database.

Bag Information dump example

00000 , Type = 2 BagId = {b010419f-fb1b-11d1-a1ba-00a0c9190447}, BirthDate = 06/03/1998 20:42:20, Len = 47051200, Type = 0, VolId = {9db6f302-fb1b-11d1-a1ba-00a0c9190447}, DeletedAmount = 0, RemoteDataSet = 1 (IDB SeqNum =      1)

Example 2: Display the FSA database

The following command displays the File System Agent (FSA) database. This database contains an entry for each premigrated file.

rsdiag /d f

The following is a sample display of an FSA database generated by using the /d f parameter:

Dump of DB: E:\WINDOWS\system32\RemoteStorage\FsaDb\{C0835F1E-01C1-804D-80B9-FB1600000000}
  version = 1, # record types = 2
RecType =        1, Flags = 00000001, MaxSize =    65760, # keys =    3
  KeyType =        2, Size =       33, Flags = 00000001
  KeyType =        1, Size =       33, Flags = 00000002
  KeyType =        3, Size =       33, Flags = 00000001
RecType =        2, Flags = 00000001, MaxSize =    65708, # keys =    1
  KeyType =        1, Size =      254, Flags = 00000002

** Dump of records of Type = 1 ** 00000 AccessTime = 12/17/2001 21:27:33 BagId = {7A4CBCE5-A0DB-4A74-9B0A-7B9AF561850F}, BagOffset = 1061888, FileId = 36028797018964002 Waiting for close = FALSE, Offset = 0, Path = \test2.bkf, Size = 4002816 RecallTime = 01/01/1601 00:00:00, File USN = 1168 (IDB SeqNum = 2) 00001 AccessTime = 12/20/2001 17:05:56 BagId = {7A4CBCE5-A0DB-4A74-9B0A-7B9AF561850F}, BagOffset = 3072, FileId = 7921831744544702504 Waiting for close = FALSE, Offset = 0, Path = \blslsslsl.txt, Size = 1057792 RecallTime = 01/01/1601 00:00:00, File USN = 920 (IDB SeqNum = 1) 00002 AccessTime = 12/20/2001 17:05:56 BagId = {7A4CBCE5-A0DB-4A74-9B0A-7B9AF561850F}, BagOffset = 5065728, FileId = 281474976710697 Waiting for close = FALSE, Offset = 0, Path = \vrdsgsre.txt, Size = 2884608 RecallTime = 01/01/1601 00:00:00, File USN = 1424 (IDB SeqNum = 3)

** File System Agent Database Dump Complete **

The following table lists and describes the data fields in the record dump.

Property Description

AccessTime

The date and time that the file was last accessed, in Coordinated Universal Time (UTC). Migrating and recalling files does not change this value.

BagID

A GUID that uniquely identifies the migration group of the file. A BAG is a group of files migrated in the same job and stored in a single data set (MTF/BKF) on the remote media. Remote Storage uses the BAG ID to locate and recall files.

BagOffset

The offset of the file into the BAG.

FileId

The remote storage identifier for the file.

Waiting for Close

This field is not currently used.

Offset

This field is not currently used.

Path

The path for this file. This information may be compressed.

Size

The logical size of the premigrated data.

RecallTime

The date and time that the system most recently attempted to retrieve this file from remote storage, in Coordinated Universal Time (UTC). Files that have never been recalled have a recall date of 01/01/1601.

File USN

The Update Sequence Number (USN) for this file.

Example 3: Cancel a validation job

The following series of commands finds a running validation job and then cancels the job before it completes. This procedure can be used on all types of Remote Storage jobs, such as migration jobs and jobs that force truncation to create free space on the volume.

The first command lists the Remote Storage jobs scheduled on the system:

rsdiag /j

In response, RsDiag displays the job list:

Name                                          JobState   IsUsers Done   DoneOk
Manage                                        Idle       False   Ok     Ok
Remote Storage Automatic Validate D           Active     Ok      False  Ok
Remote Storage Remove D                       Idle       Ok      Ok     Ok
Remote Storage Automatic Validate E           Idle       Ok      Ok     Ok
Remote Storage Validate E                     Idle       Ok      Ok     Ok
Remote Storage Copy Files E                   Idle       Ok      Ok     Ok
Remote Storage Free Disk Space E              Idle       Ok      Ok     Ok

The display reveals that the "Remote Storage Automatic Validate D" job is running.

The following command displays more detailed information about this particular job:

rsdiag /j "Remote Storage Automatic Validate D"

  Name             : Remote Storage Automatic Validate D
  Identifier       : {e65a104f-2753-49e2-bf8d-41573e1bbc27}
  Hsm Identifier   : {4d6e0baf-6d9c-4048-af3f-ca10d94cc8f9}
  Run Identifier   : 1
  Max Sessions     : 2
  Is User Defined  : Ok
  Is Active        : True
  Did Finish       : False
  Did Finish Ok    : False

    Resource Name    : SERVER01\NTFS\D:
    State            : Done
    Starting Path    : \
    Current Path     : \
    Start Time       : 03/15/2001 20:22:00
    Stop Time        : 03/15/2001 20:22:00
    Sub-Run Id       : 0

      Phase Name       : Scan
      State            : Done
      Media State      : Idle
      Priority         : Normal
      Start Time       : 03/15/2001 20:22:00
      Stop Time        : False
      Elapsed Time     : 0 days, 00:00:03
      Items            : 0
      Size             : 0
      Skipped Items    : 0
      Skipped Size     : 0
      Error Items      : 0
      Error Size       : 0

The following command stops the job:

rsdiag /c "Remote Storage Automatic Validate D"

Remember that stopping a job does not remove the job from the schedule. Also, stopping a job does not reverse actions already completed by the job. For example, if you cancel a free-disk-space job in progress, it does not restore data to files that were truncated earlier in the job.

Example 4: Determine the tape on which a file is stored

The following series of commands finds the data for a file on a physical tape. The first command uses Rsdir Overview, a tool that enumerates the files in a directory and adds Remote Storage properties to the attributes typically displayed.

C:\Inside Win2K>rsdir

Showing information for <\\?\C:\Inside Win2k\*.*>

Status        Attributes    Physical     Logical        Migrate Time File Name
------        ----------    --------     -------        ------------ ---------
non-HSM      --D--------           0           0                  NA .
non-HSM      --D--------           0           0                  NA ..
non-HSM      A-------R--          47          47                  NA Autorun.inf
non-HSM      --D-----R--           0           0                  NA Debuggers
non-HSM      --D-----R--           0           0                  NA Ebook
truncated    A-----OPR-Z           0       10004 08\11\2001 09:07:27 Readme.txt
non-HSM      --D-----R--           0           0                  NA Setup
non-HSM      --D-----R--           0           0                  NA StartCD
truncated    A-----OPR-Z           0       28672 04\27\2001 17:27:12 StartCD.exe

                3 File(s)              47 bytes
                4 Dir(s)            38676 bytes required to recall offline files

This display shows that the Readme.txt file is truncated and was migrated on 8/11/2001.

The next command displays the location of the Readme.txt file on a remote physical storage medium. This command uses the /w parameter to display the location of the file in secondary storage. It includes the complete path to the file and, because the directory name includes spaces, it encloses the path in quotation marks.

rsdiag /w "c:\inside win2k\readme.txt"

        File <c:\inside win2k\readme.txt> is truncated.
        Located on media <000302> in dataset 28
        Bag ID: <{7eae2dea-6634-4ae5-982a-c987c01ffa38}>

The output displays the BAG ID, the internal media name (00302), and the dataset in which data for this file is stored (28).

The final command displays all media used by Remote Storage on this system:

rsdiag /s

Showing:  <RS-SERVER01-4>
        Description     :  RS-SERVER01-4
        Name            :  000302
        Media ID        :  {4464192f-8164-422d-8541-43577071cb24}
        RSM ID          :  {7cb7bd09-888b-4021-bfda-400cfeb2e792}
        Media type      :  4
        Last update     :  12/20/2001 10:04:03
        Last error      :  Ok
        Recall only     :  FALSE
        Capacity        :  19036958720
        Free Bytes      :  3211743232
        Next Data Set   :  81
        Recreate        :  FALSE

Showing:  <RS-SERVER01-3>
        Description     :  RS-SERVER01-3
        Name            :  000301
        Media ID        :  {f926fccb-aa62-4116-8d4e-1d5b7eb8a4f3}
        RSM ID          :  {85e3bc66-d196-49f0-abf0-eb5c15ba2609}
        Media type      :  4
        Last update     :  08/15/2001 09:06:21
        Last error      :  Ok
        Recall only     :  FALSE
        Capacity        :  19036958720
        Free Bytes      :  20130557952
        Next Data Set   :  4
        Recreate        :  FALSE

The display reveals that the media known internally by the media name 00302 is a tape (media type 4) commonly known as RS-Server01-4. Optical media are listed as media type 3. Therefore, the data for the Readme.exe file is stored on the RS-SERVER01-4 tape.

Example 5: Display the version information for a collection file

The following command displays version information about Remote Storage components:

rsdiag /i

The following fields are included in the output:

Name Description

Title

Component title

Registry Name

Component title in registry

Identifier

Unique identifier of this resource

DB Version

Component's database version

RS Version

Remote Storage build number

Windows Ver

Windows version

Windows Build

Windows build number

DB Path

Path to the component collection file

The command yields the following output:

  RsTools
    Build        :  601

  FSA
    RegistryName   :  Remote_Storage_Server
    Identifier     :  {4d6e0baf-6d9c-4048-af3f-ca10d94cc8f9}
    Db Version     :  1
    RS Version     :  611
    Windows Ver    :  5.1
    Windows Build  :  3590
    DbPath         :  C:\WINDOWS\system32\RemoteStorage\RsFsa.col


  HSM
    RegistryName   :  Remote_Storage_Server
    Identifier     :  {4d6e0baf-6d9c-4048-af3f-ca10d94cc8f9}
    Db Version     :  3
    RS Version     :  611
    Windows Ver    :  5.1
    Windows Build  :  3590

    DbPath         :  C:\WINDOWS\system32\RemoteStorage\RsEng.col

See Also

Concepts

Rsdiag Overview
Rsdiag Syntax
Rsdir Overview