Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tesxt files becoming data files

Status
Not open for further replies.

bluedragon2

IS-IT--Management
Jan 24, 2003
2,642
0
0
US
I have text files that reside on a NAS drive that are text files. Over the past couple of months, three of the files are now data files. They are shared on three different servers and today when I noticed another file has converted, if I look at the same file on another server it is still text. Running a file on it, I get data on one server and text on another server. The magic file on both servers is identical.

Any suggestions?

Thanks,

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
I don't understand, text is data. What exactly do you mean? Can you give an example?

 
sorry, binary/exe type file. If you cat it, it comes back like cat'ing an executable.

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Since it still looks like text from at least one server, I assume the file isn't actually being changed. Confirm this with the file modification date/time.

Try running [tt]cksum[/tt] on the file from each system. This gives a checksum of the contents of the file. This will let you know if the file is actually the same, or different.

If the [tt]cksum[/tt] command shows the same numbers, then it's how the file is being interpreted or displayed that's different.

I would first start by looking at mount options. Maybe the filesystem is being mounted on one system in a way that the file isn't being seen properly.

Check the file with [tt]cat[/tt]'s "[tt]-vet[/tt]" options ([tt]man cat[/tt]). This will show unprintable characters. It's possible your terminal/session settings on one system cause binary characters to be displayed on one system, but ignored on another.

Check the file with [tt]od[/tt] on both systems. Again, this will show you what's really in the file. This will let you know if the difference is a real difference between systems, or that they are just displaying differently.

Last would check for differences in your sessions' [tt]stty[/tt] settings, terminal program settings (putty?), environment settings, and anything else that could be affecting how the terminal program is interpreting characters. [tt]cat[/tt] just throws the file to the attached terminal. Differences in terminal settings can change how that file is displayed.

Have you tried making a local copy of the file and checking it?

 
Overview of setup: Sunray DTU session. Using terminal console to ssh to two different servers. The file resides on a NAS mount that has the same mount parameters on both servers.

I have a copy of the original file on another server that is not on a NAS mount and it is still text.

Some results of your comments (which are greatly appreciated):

cat -vet shows normal for copied test file and shows many ^(various characters/symbols) part way down the file then normal text.

checksum's are different for the files

od is different for the files.

diff will not compare the files.

running file on the copied file results in ascii text and on the actual file shows data.

The second server that the file was still text on (not the copied file) is now data and the same as the first server.

Could the NAS server cause these issues?

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Wow, this is a puzzle.

You say it's happened to three different files. Are these used by an application? Could the app be making changes to the files? Possibly corrupting them?

Do you have other text files on the NAS that are OK? Or is it just specific files?

Do you have any kind of cacheing on those volumes?

Are there any 'events' that happen between a file being text, and then showing up as binary? For instance, a system with the NAS mounted rebooting, a backup, a batch or report running, an upload of something, or anything that could be stepping on it somehow.

Does the file ever show up correctly as text on all systems? Liek when it's first put there? Or does it display as binary from the get-go on some systems?

What are you using as a volume manager for the NAS on Solaris?

 
Yes, this is a puzzle.

These are application files. The application will append two of them, but the third is a read only for the application. The caveat to that is I have six different deployments of this setup and this is the only one it is happening on.

The NAS is using VERITAS volume management.

Another caveat is I have several systems using this NAS and have not seen anything similar, but this application only uses this slice.

I am having my data center retrieve some point in time backups of these files to see if I can narrow anything down through the logs or whatever I can correlate anything to.

Again, I appreciate your input and suggestions. Thought I would throw it out here to see if anyone had a similar issue.

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top