Very strange file read problem

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Very strange file read problem

Post by pepak »

I have a very strange problem with reading files from NAS here. I suppose it is a Windows issue rather than a FAR issue, but it does apply to FAR, too, as you'll see.

I have a separate PC acting as network storage. It uses FreeNAS for operating system. I have added 4 TB of disk drives, shared that over SMB (Windows Shares) and proceeded to create a large file which takes up all the capacity (TrueCrypt container, if you are curious). So far so good. The file itself is apparently correct as I can mount the container and access the files inside. But I can't read the file contents over the network: I always get a Windows error "There's not enough space to complete this command" (or something like that - I am translating from my localized Windows). If I try to view the file in FAR, I get a blank file (as if it were 0 bytes long). I can only assume that the same will happen with copy since FAR warns me about insufficient disk space and refuses to do at least a partial copy. But I know that TYPE, COPY etc. all fail with the same error. In fact, even TrueCrypt's GUI fails when I try to back up the file header. A tiny utility that I wrote, which just reads the first 64K bytes of a file and writes it to a different file, fails.

What does work, and this is where FAR comes in, is the Extended Copy plugin. This plugin happily reads the correct data while all other Windows applications (other than TrueCrypt GUI when trying to mount the volume) fail.

1) Does anyone have any idea what's different about Extended Copy that it is able to read the file?
2) Does anyone know if it is some strange Windows limitation (accessing >2TB files over SMB)?
3) Could FAR maybe implement the same access method as Extended Copy to be able to read such files?
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: Very strange file read problem

Post by pepak »

Found it: It is because of FILE_FLAG_NO_BUFFERING - if it is present, the file can be read. Otherwise, it can't. I have no idea why and would appreciate any insight.

Could FAR include a workaround for this? Using FILE_FLAG_NO_BUFFERING when opening files larger than 2 TB?
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: Very strange file read problem

Post by pepak »

Found more info:

It's a known bug in Windows XP: http://support.microsoft.com/kb/913872
Considering that, I think it would be very nice if FAR could include the FILE_ATTR_NO_BUFFERING workaround for files >2 TB.
User avatar
HaRT
Moderator
Posts: 10869
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Re: Very strange file read problem

Post by HaRT »

pepak
For this suggestion not to be lost among other messages you'd better file a wish ticket at http://bugs.farmanager.com.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Post Reply

Return to “Support and Troubleshooting”