Cannot delete view-private file - clearcase

In a dynamic ClearCase view on Windows 7, I've got a file with size 0 and name myproject.prj.$$$. I cannot open, delete, rename or modify that file. I'd prefer to delete the file, but when trying to delete it:
Windows Explorer shows the error message “Invalid MS-DOS function”.
cmd.exe’s del: “Incorrect function”.
ClearCase Explorer simply does nothing.
I've created a file with the same name at a different location, and was able to edit and delete that file without any issues - so I guess the file name is not the issue. The file first showed up after the computer had crashed. I'd prefer not to delete and recreate the view.
What can I do to delete this file?

It looks similar to "Delete of view private file fails with error: Cannot find the specified file":
Cause
The view-private file has been moved or deleted from the view storage within the .s directory.
The view database is still aware of the file and is out of sync with the source container.
Note: The most common reason of this occurrence is due to Virus Scanning. The Virus Scanner is configured to either move a file suspected of a virus to quarantine or is configured to delete the file.
Solution 1
Remove and recreate the view.
Solution 2
If removal of the view is not an option, then synchronize the view database and the source container
The Example below is quite complete, but the OP Martin mentions in the comments:
It was not necessary to run the commands:
The mvfs log already contained the name of the missing file several times.
After creating an empty file at the "view storage container path", the file in the view could be deleted.
Example
The view storage container 800011174be29f22Paul.txt of the file Paul.txt was deleted.
M:\niewandt_view5\rn-robin>mvfsstorage Paul.txt
C:\ccstg_c\views\niewandt_view5.vws\.s\00007\800011174be29f22Paul.txt
This is the expected result although the file is not there anymore.
Now we flush the mvfs cache:
M:\niewandt_view5\rn-robin>mvfscache -f mnode
And run the mvfsstorage command again:
M:\niewandt_view5\rn-robin>mvfsstorage Paul.txt
mvfsstorage: Error: Paul.txt - can't fetch cleartext
Now we have a problem to identify which storage container is missing.
Trying to open the file gives:
---------------------------
Editor
---------------------------
Invalid Function.
---------------------------
OK
---------------------------
If we try to delete the file, it is reporting:
---------------------------
Error deleting file or folder
---------------------------
Paul can not be deleted: Invalid MS-DOS function.
---------------------------
OK
---------------------------
To find the view storage container path for that file you need to look in the mvfs log.
The mvfs log is showing:
{89 pid/tid 139400000cf0/883b7838eb6b63d0} cleartext lookup view=niewandt_view5 vob=\rn-robin dbid=0x80001117 - No such file or directory
{90 pid/tid 139400000cf0/883b7838eb6b63d0} cleartext pname= \Device\HarddiskVolume1\ccstg_c\views\niewandt_view5.vws\.s\00007\800011174be29f22Paul.txt
The "\Device\HarddiskVolume1" location can be found on the view properties 'advanced' tab, "Host path" in ClearCase Explorer

I faced this problem recently in windows environment.
*
(Caution : proceed if you are okay to delete local view-private
file which is corrupted and no data of that file can be retrieved)
*
My case was similar to above and was getting the following errors -
1. Windows Explorer shows the error message “Invalid MS-DOS function”.
2. cmd.exe’s del: “Incorrect function”.
I found mvfs log path by typing mvfslog in command prompt and that would output following details
Log priority: error
irpops mask: 0x00000000
vops mask: 0x00000000
vfsops mask: 0x00000000
xops mask: 0x00000000
traps mask: 0x00000000
Kernel logfile: "C:\mvfslogs\20191205.log"
Now open the log file from above path
"C:\mvfslogs\20191205.log"
So if you have got incorrect function recently, then that would be the last data logged as error in above log file.
Opening the log file and observe at the end of file, it reads something similar to below-
line #(last-1) - mvfs: Error: ....da..da..da...da... - No such file or directory
line #(last) - mvfs: Error: ....da...da...da...da... \your_container_location\..da..\..da..\..da..your_view_name.vws\.s\00037\800001765bf06476cc3080a
So that last word in above path(800001765bf06476cc3080a) is you actual file reference of your file in your_container_location. (Some times it might read as 800001765bf06476cc3080ayour_file_name.extension).
So now what is happening is
it is looking for your file reference 800001765bf06476cc3080a in
your_container_location path
(\your_container_location..da....da....da..your_view_name.vws.s\00037)
but it is not found(As data is not synchronized between your local
view and your_container_location).
So now all is required is
Step 1-to create a file named as 800001765bf06476cc3080a (as per your file name) in \your_container_location\..da..\..da..\..da..your_view_name.vws\.s\00037
Step 2-refresh your local view.
Step 3-Delete the file.
Now that the file should be able to delete permanently. And you can reuse your view.

Related

I can't delete file type "File"

Basically, my code failed to download this image from the internet, and it created this kind of ghost file that the file type is just called File, and it has 0 bytes of data. But it just lingers in my file and I can't delete it under any circumstances. I have tried deleted in cmd as well but it says it doesn't exist even though it shows up in my dir. I can't find anything online.

Copy a file from network share system cannot find path specified

I have a seriously weird problem, and I suspect it has something to do with the length of the filename - but I cannot alter it (for now).
I'm trying to copy a file from a network share to the users local %temp% with a logon script. The reason for this, is that each user needs to have an individual copy of the file when opening it so that the next users doesn't get a "file is locked" message.
If I run the command manually in a CMD window, the file gets copied, but if I place it in a login.bat-file on the domains netlogon-folder and tries to run the bat-file, I get "The system cannot find the path specified."
This is the actually command:
COPY /Y "\\SERVER\Felles\Administrasjon\Customer KS-manual\Kvalitetshåndbok\2000 org. kart\2 0 B 01-14 Customer Name Arbeids-Prosess-flyt_NO.odg" %TEMP%\Kvalitetshaandbok.odg
So as I said - if I type that in CMD, the file gets copied. If I place it in \customer.local\NETLOGON\login.bat and run the BAT-file, I get "The system cannot find the path specified."
I also tried earlier to just open the file, and that only worked if I opened \customer.local\NETLOGON\shortcut.lnk and shortcut.lnk pointed to the UNC-path of the file. The problem is that I cannot copy a file using a shortcut.lnk AFAIK.
My main object is to have each user get a unique copy of the file and opened on logon.
Is the problem isolated to the length, or is there something else I miss out on?
Try "%TEMP%\Kvalitetshaandbok.odg" with the double quotes because the username can contain spaces etc, which trickles down to the %temp% path.
There are also non-latin characters in the path and the code page being used may need to be altered to match the character set.

checked out file not visible in clearcase view?

I created this new clearcase element and checked out but when I try to check in, it is giving an error saying "no such file or directory". I can see this file checked out in an activity so how can I get this file check in?
Thanks.
The easiest way to debug this is through a shell
cd /path/to/parent/directory/of/the/file
cleartool ls
Look for the version and selection rule for that file.
Check also the config spec of your view
cleartool catcs
# or
cleartool edcs
See if the config spec does start with a:
element * CHECKEDOUT
For a "checked out but removed" status, you can refer to "How to recover a file from “Checkout but removed” state?".
The idea is to "undo checkout" a dummy file (same name, but empty), in order to recover it as before any local change.
There is no easy way to recover the local changes done while that file was ched out and present (except for some file recovery tool like Recuva, but it is a long shot).

Clearcase issue while "add file to source control"

I am facing a following issue while adding a file to clearcase (UCM)
---------------------------
Rational ClearCase Explorer
---------------------------
Error adding 'M:\Myviename\Myvob\Myproj\Implementation\DataSource\Deployment\BOM\SupportFiles\Service.config' to source control.
Created branch "Tm6-Proj-Dev2" from M:\Myviename\Myvob\Myproj\Implementation\DataSource\Deployment\BOM\SupportFiles\Service.config' version "\main\0".
Type manager "text_file_delta" failed create_version operation.
I tried rebase and deleted and added the file again. But facing the same. Why this occured and how to solve it?
You will find all the know cases for this error message in this technote "Knowledge Collection: Type manager <text_file_delta> failed create_version operation"
Type manager size limitation - File too large
Text files that contain binary data - Contains a '\000'
Line exceeding 8000 bytes
Corrupt source container - not the highest on its branch
The main cause is a content incompatible with a text file (line too long, or binary content).
The OP Samselvaprabu adds:
Our IT guys used the following command "chtype Compressed_file".
After that it allowed to check-in.
As they did it in my collegue system, I was not able to ask what does this mean and how it solved the issue?
It does solve the issue (and it has nothing to do with UCM): since the text_manager doesn't recognized the content of the file as text (as illustrated, for instance, in this technote), you need to instruct ClearCase to treat it as binary content.
cleartool chtype compressed_file <filename>
Pro: it allows for checkin/checkouts
Cons: you won't be able to "compare with previous version" anymore.
You might need to instruct that compressed_file to be always copied over instead of merged (see "Clearcase UCM is trying to merge pdf files")
For certain set of files, you could also modify the magic file to automate that process: see "Check in to ClearCase fails".
Which type of view are you using ? Static(Snapshot) or Dynamic ?
check if file is already there on the main.
If the file is already there on main (which means file is Versioned file) then before editing you should check-out file and then after making changes you need to check in.
If you are using versioned file and you if made changes to this versioned file then it will be a hijacked file, (you will see red+green mark for on the file in clear case explorer).
Try out once.

Check in to ClearCase fails

I am trying to add a file into ClearCase, but I am getting the following error:
Error adding 'C:\PATH\file.dbc' to source control.
Changed Protection on "C:\PATH\file.dbc".
Created branch "C:\PATH\file.dbc" version "\main\0".
Type manager "text_file_delta" failed create_version operation.
Checked the following:
There are lines that have over 8000 characters and they must stay that way, so it can not use the "text_file_delta" as the type manager. I changed the type of one file to "compressed_file" and I was able to check it in.
I tried to add dbc compressed_file -name "*.[dD][bB][cC]" ; to the default.magic file. Then, I tried to check it with ct file test.dbc and it said that it is a compressed_file, but when I try to add an actual .dbc file to source control, it still gives me the error about the "text_file_delta" failing.
Is there something that I am missing with this? Maybe I put the line in the wrong part of the default.magic file?
Note: the only default.magic file that I am able to find is on the server side, is this correct? (I would rather it check here instead of everyone having to make one on their client.)
Make sure the default.magic file is taken into account, and is in the right directory, as mentioned in "About the ClearCase Magic file".
Make sure you did add the new rule in the right place in that magic file: see "How file types are determined when creating a new element"
Note: This is the first section in the default.magic file.
Example:
# Match by name without examining data
core file : -name "core" ;
compressed_file : -name "*.[nN][eE][wW]";
Note: The new file-typing rule that you add must come before the following line in the magic file:
text_file : -printable ;
compressed_file : !-printable ;
Use a personal magic file rather than modifying the default one:
Caution: It is highly recommended that you not modify the default.magic file directly as the next time an upgrade is performed, a new default.magic file will be created and your changes will be lost.
Creating a personal magic file with a name that is alphabetically before the "d" in the default.magic file name (such as cc.magic) will allow ClearCase to parse this file before the default.
It is better to create a personal magic file and possibly setting the MAGIC_PATH variable instead.

Resources