3

Running Clearcase 7.1.1.09 on a windows server. Lost+found directory element was removed using CCRC from a VOB. I can still see the lost+found directory in main/0. How can I restore the lost+found directory element of a VOB? According to this article http://www-01.ibm.com/support/docview.wss?uid=swg21135672 the lost+found directory element cannot be removed whatever that means.

Thanks for any help.

spaghettiwestern
  • 393
  • 1
  • 6
  • 17

1 Answers1

2

It means the /Vobs/MyVob/main/0 will always contain lost+found.

You may have ln, renamed or moved lost+found in more recent version of that Vob (like, for instance /Vobs/MyVob/main/4), you can always:

cleartool co -nc /Vobs/MyVob
cleartool ln /Vobs/MyVob/main/0/lost+found /Vobs/MyVob/lost+found
cleartool ci -c "restore lost+found" /vobs/MyVob

In Windows:

cleartool startview aDynamicView
cleartool mount \MyVob
cd m:\aDynamicView\MyVob
cleartool co -nc .
cleartool ln .@@/main/0/lost+found ./lost+found
cleartool ci -c "restore lost+found" .

That would create, in this example, a 5th version of the Vob root directory, with in it referenced once again the lost+found directory, effectively restoring it.

(as shown in this thread, see also cleartool man ls)

Since ln isn't available a sa CCRC command, you need to contact a ClearCase admin who will have access to the CCRC server (and the full ClearCase vob server) in order to restore that lost+found directory.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I am new to clearcase but the example given is for a Linux box. I thought that on windows boxes a VOB cannot be accessed directly from cleartool and a view must be used? – spaghettiwestern Feb 26 '13 at 19:58
  • What about simply creating a new view against the vob with a version selection rule of 0. Then copy the lost+found directory element to another view that has LATEST as the selection rul? Would this cause any issues? – spaghettiwestern Feb 26 '13 at 20:01
  • @spaghettiwestern you are always using a view, even in /vobs/aVob linux form (which you obtain with [`cleartool setview`](http://stackoverflow.com/a/10252612/6309). I have edited the answer to include the Windows version. – VonC Feb 26 '13 at 20:03
  • @spaghettiwestern no need to create any new view: any view in which `lost+found` is missing will do, because any view has access to that `.@@/main/0` extended pathname (see http://stackoverflow.com/a/3437635/6309 on the extended pathname notion). – VonC Feb 26 '13 at 20:05
  • @spaghettiwestern the idea is to restore the `lost+found` where you *see* (i.e. in a ClearCase view) it missing: no need to recreate a view for that. – VonC Feb 26 '13 at 20:05
  • I guess what I was trying to say was instead of using cleartool can I simply use the CCRC to restore the lost+found folder by using two views, the first view which has a selection rule of main/0 and another view which has a selection view of main/LATEST. I could then copy the lost+found folder from main/0 to LATEST. – spaghettiwestern Feb 26 '13 at 22:25
  • @spaghettiwestern in a CCRC context, that makes sense, yes. – VonC Feb 26 '13 at 22:32
  • My idea of using CCRC to restore the lost+found folder doesn't work. I can copy over the lost+found folder from main/0 and check it in but when I try and recreate a scenario where an element is placed in the lost+found folder (orphaned element) it fails and instead I find that the orphaned element is placed in the main/0 in lost+found folder. This is confusing. – spaghettiwestern Feb 27 '13 at 00:20
  • @spaghettiwestern in that case, you need to ask a ClearCase CCRC admin (who does have access to the ClearCase main server) to do a `ln` (not a copy, but a cleartool symlink) of `/main/0/lost+found` into the latest version of your Vob, in order for you to see `lost+found` at the next view update. – VonC Feb 27 '13 at 06:11
  • @spaghettiwestern I have edited the answer to include that caveat about CCRC and the need to contact a ClearCase admin. – VonC Feb 27 '13 at 17:46