Moving a VOB on Windows


This section describes two common procedures:

Moving a VOB Within a Domain

The following procedure describes how to move the VOB \libpub from storage directory C:\ClearCaseStorage\VOBs\libpub.vbs on VOB server host \\sol to a storage directory shared as vobstg on VOB server host \\vobsvr01.

  1. Log on to the VOB’s current server as the VOB owner or privileged user. In this example, the VOB’s current server is \\sol.
  2. Lock the VOB.
  3. Stop ClearCase on the VOB server host.
  4. Copy the VOB storage directory, preserving all ownership information. You must use a copy utility that preserves ownership information contained in the VOB storage directory ACLs. See Preserving NTFS ACLs When Copying a VOB or View Storage Directory. We recommend that you use the ClearCase utility ccase-home-dir\etc\utils\ccopy.exe for this purpose.
  5. C:\ClearCaseStorage\VOBs> net use E: \\vobsvr01\vobstg

    C:\ClearCaseStorage\VOBs> ccopy libpub.vbs E:\libpub.vbs

  6. Restart ClearCase if you have copied the VOB storage directory to a new location on the same VOB server host.
  7. Replace the VOB object and tag with new ones that reference the new VOB storage directory. Use the ClearCase Administration Console or the following commands (this example applies to the destination on server vobsvr01):
  8. cleartool register –vob –replace \\vobsvr01\vobstg\libpub.vbs
    
    cleartool mktag –vob –replace –tag \libpub \\vobsvr01\vobstg\libpub.vbs
  9. Unlock the VOB.
  10. Verify that all clients can access the VOB at the new location.

Moving a VOB to a Different Domain

On Windows, VOBs formatted with schema version 54 store Windows security identifiers (SIDs) to represent users, groups, and resources (hosts). When you move a VOB to a different domain, these SIDs become invalid and must be changed (mapped) to SIDs that are valid in the new domain. ClearCase includes a utility program, vob_sidwalk, that provides a flexible means of mapping SIDs after you move a VOB to a different domain. We strongly recommend that you review the vob_sidwalk reference page before continuing with this procedure.

The following procedure moves the VOB \libpub from storage directory C:\ClearCaseStorage\VOBs\libpub.vbs on VOB server host \\sol, which is in the OLD domain, to a storage directory shared as vobstg on VOB server host \\vobsvr-new, which is in the NEW domain. To execute this procedure, you must be able to log in to both the OLD and NEW domains as the VOB owner of \libpub or as a privileged user.

  1. Verify that the VOB is formatted with schema version 54. Lower-numbered schema versions do not support moving a VOB to a different domain. You can use the ClearCase Administration Console or the cleartool describe command to determine a VOB’s schema version. For more information about VOB schema versions and how to change them, see VOB Schema Versions.
  2. Log on to the VOB server host as the VOB owner or privileged user.
  3. Lock the VOB. This ensures that no new VOB objects are created while you complete Step 4.
  4. Generate a SID file that lists the names of users and groups associated with objects in \libpub. Run vob_siddump to generate a SID file in comma-separated-value (csv) format:
  5. ccase-home-dir\etc\utils\vob_siddump \libpub ^
    C:\ClearCaseStorage\VOBs\libpub.vbs\libpub.csv

    We suggest creating the SID file in the VOB storage directory so that it is available on the new VOB host after the storage directory has been moved. (You need it in Step 10.)

  6. Stop ClearCase on the VOB server host.
  7. Copy the VOB storage directory to the new location.
  8. C:\ClearCaseStorage\VOBs> net use E: \\vobsvr-new\vobstg

    C:\ClearCaseStorage\VOBs> xcopy libpub.vbs E:\libpub.vbs /s

    Note: Because the existing VOB storage directory ACLs are invalid in the new domain, you may use xcopy or another copy utility that does not preserve ACLs for this step.

  9. Fix the VOB storage directory protections. Log on to the VOB server host in the new domain (\\vobsvr-new in our example) as the VOB owner of \libpub or as a privileged user. Run the fix_prot utility. In this example, vobadm is the name of the new VOB owner, ccusers is the name of the VOB’s new principal group, and V:\vobstg\libpub.vbs is the host-local pathname of the VOB storage directory on \\vobsvr-new:
  10. ccase-home-dir\etc\utils\fix_prot –root –r –chown vobadm –chgrp ccusers ^
    V:\vobstg\libpub.vbs

  11. Replace the VOB object and tag with new ones that reference the new VOB storage directory. Use the ClearCase Administration Console or the following commands:
  12. cleartool register –vob –replace \\vobsvr-new\vobstg\libpub.vbs
    
    cleartool mktag –vob –replace –tag \libpub \\vobsvr-new\vobstg\libpub.vbs

    If \\vobsvr-new is not in the same registry region as \\sol, you do not need to use the –replace option to cleartool register and cleartool mktag, but you should remove the old registration and tag for \libpub, which will be invalid after the move.

  13. Lock the VOB. Although the VOB is now registered and has a tag, it will not be usable until you complete this procedure. If you are concerned that users may try to access the VOB before it is ready, lock it now.
  14. Create a map file. Open the SID file generated in Step 4 (\\vobsvr-new\vobstg\libpub.vbs\libpub.csv). It may be easier to edit this file if you use a spreadsheet program that can read the comma-separated-value format. This example shows one line of such a file. It includes a header row for clarity. The SID string has been truncated to save space.
  15. Old-name
    Type
    Old-SID
    New-name
    Type
    New-SID
    Count
    OLD\akp
    USER
    NT:S-1-2-21-532...
    IGNORE
    USER
     
    137

    For each line in the file, replace the string IGNORE in the New-name field with a string made up of the new domain name and the user name from the Old-name field; then delete the last three fields (Type, New-SID, and Count). In this example, old domain’s name is OLD and the new domain’s name is NEW, so the line would change, as shown here:

    Old-name
    Type
    Old-SID
    New-name
    Type
    New-SID
    Count
    OLD\akp
    USER
    NT:S-1-2-21-532...
    NEW\akp
     
     
     

    Although this example shows a user name that is the same in the old and new domains, the procedure can also be used to map a user or group name from the old domain to a different user or group name in the new domain.

    After you have edited all the rows of the SID file, save it as a comma-separated-value file and use it as the mapping file required when you run vob_sidwalk –map. Each line of the mapping file must have exactly four fields, separated by commas. The example row created in this step would look like this in .csv form:

    OLD\akp,USER,NT:S-1-2-21-532...,NEW\akp

    Note: You can reassign ownership of any object in a VOB to the VOB owner by placing the string DELETE in the New-name field. You may also reassign ownership of all objects in a VOB to the VOB owner without creating a mapping file. See Reassigning Ownership to the VOB Owner.

  16. Test the map file. Run vob_sidwalk without the –execute option. The list of mappings in the map file libpub-map.csv is written to the SID file (libpub-test.csv in this example), but no changes are made to the VOB.
  17. ccase-home-dir\etc\utils\vob_sidwalk –map ^
    \\vobsvr-new\vobstg\libpub.vbs\libpub-map.csv \libpub libpub-test.csv

  18. Unlock the VOB. If you are concerned that users may try to access the VOB before this procedure is complete, lock the VOB again for all users except yourself (cleartool lock –nusers you). You must have write access to the VOB to complete this procedure.
  19. Update user and group identities stored in the VOB. When you are satisfied that the map file is correct, run vob_sidwalk. In this example, libpub-map.csv is the map file created in Step 10:
  20. ccase-home-dir\etc\utils\vob_sidwalk –execute –map ^
    \\vobsvr-new\vobstg\libpub.vbs\libpub-map.csv \libpub libpub-exec.csv

    vob_sidwalk remaps ownership as specified in the map file and records the changes made in libpub-exec.csv.

  21. Recover file system ACLs. While you are still logged on to \\vobsvr-new as the VOB owner or privileged user, use vob_sidwalk with the –recover_filesystem option to apply the correct ACLs to the VOB storage directory.
  22. ccase-home-dir\etc\utils\vob_sidwalk –recover_filesystem \libpub recov.csv

    vob_sidwalk logs changes made during this step to the file recov.csv

  23. Verify that all clients in the new domain can access the VOB. Unlock the VOB if it is still locked.
  24. Verify that all ClearCase users in the new domain can access objects in the VOB. Users should be able to create new objects as well as change or remove objects that they own.
  25. Note: If the user’s name in the new domain is not the same as in the old domain, the user loses rights (for example, the right to remove a version that you created) associated with the creator of a version or a branch. These operations can still be executed by a more privileged user (VOB owner, member of the ClearCase administrators group).