Why are IBM® Rational® ClearCase® elements moved to the VOB's lost+found directory and how do I remove them once there?
Answer
Why Elements Are Moved to the VOB lost+found Directory Removing Objects from lost+found Determining the UCM component to which an element in lost+found belongs
Why Elements Are Moved to the VOB lost+found Directory
An object will be placed in a VOB's lost+found directory when the parent directory namespace has been removed (in which case there is no longer a context in which to show the object) or altered such that it's contents have no reference in a previous directory version. This can happen under the following circumstances:
1. The object's parent directory element is removed with rmelem and there are no other hardlinks to the object elsewhere in the VOB.
Example:
%>cleartool rmelem dir1 CAUTION! This will destroy the element, all its branches and versions, including all data, meta-data and history, and will remove the element from all directory versions that now contain it. Once you destroy the element, there will be no way to restore it to its current state. If you want to preserve the element, but remove references to it from future directory versions, use the "rmname" command.
Element "dir1" has 1 branches, 2 versions, and is entered in 1 directory versions. Destroy element? [no] y cleartool: Warning: Object "foo.c" no longer referenced. cleartool: Warning: Moving object to vob lost+found directory as "foo.c.986de380d90b479db49316560deba2f2". Removed element "dir1".
2. The parent directory is checked out, files and/or directories are added, and then the parent directory is unchecked out.
Example:
%>cleartool co -nc dir1 Checked out "dir1" from version "/main/7".
%>cleartool mkelem -ci -nc foo.c Created element "foo.c" (type "text_file"). Checked in "foo.c" version "/main/1".
%>cleartool unco dir1 cleartool: Warning: Object "foo.c" no longer referenced. cleartool: Warning: Moving object to vob lost+found directory as "foo.c.c7592f61ab0b11db83b5000180f96245". Checkout cancelled for "dir1".
3. The parent directory is checked out, files and/or directories are added, and then the file or directory has its name removed (rmname) before the parent directory is checked in.
Example:
%>cleartool co -nc dir1 Checked out "dir1" from version "/main/7".
%>cleartool mkelem -ci -nc foo.c Created element "foo.c" (type "text_file"). Checked in "foo.c" version "/main/1".
%>cleartool rmname foo.c cleartool: Warning: Object "foo.c" no longer referenced. cleartool: Warning: Moving object to vob lost+found directory as "foo.c.c7592f61ab0b11db83b5000180f96245". Removed "foo.c".
When an object is moved to the lost+found root directory its OID (object ID) is appended to the original filename. For example:
If a directory element is moved to lost+found, all of the subdirectories and elements it contains are moved along with it (the directory structure is kept intact). Since these contents are not located in the lost+found root, however, they are not renamed in the manner described above.
Removing Objects from lost+found
Before taking any steps to clean out the VOB's lost+found, please make a backup of the VOB as a safeguard.
There are two possible ways to remove an object from the root of the lost+found:
1. The object can be moved to a new location in the VOB using the cleartool mv command
2. The object can be permanently deleted from the VOB.
# To move the object to a new location, check out the parent directory of the new location and use the cleartool mv
No comments:
Post a Comment