EldoS | Feel safer!

Software components for data protection, secure storage and transfer

XCOPY command failed in Mapper sample

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#18116
Posted: 11/08/2011 00:37:35
by Masashi Harasawa (Priority Standard support level)
Joined: 11/07/2011
Posts: 16

OS : Windows7 64bit
CBFS : 3.2.101

I tried the XCOPY command in Mapper sample.

The XCOPY works in virtual disk with 1.0TB capacity, but
it failed in virtual disk with 1.5TB capacity.

When I set CallbackFileSystem.SectorSize property to 4096, the XCOPY works in virtual disk with 1.5TB capacity.
Does it have the influence by changing CallbackFileSystem.SectorSize property?
Also, Do you have any other ideas?

Thanks a lot for your help.
Masashi Harasawa
#18117
Posted: 11/08/2011 00:53:24
by Eugene Mayevski (EldoS Corp.)

Please specify what exactly error was reported. "It failed" gives little information about the problem.

Also please specify if you actually copied 1.5 Tb of data or it's just the size reported by the virtual file system? As we don't have so large physical storages, we need to understand how we can reproduce the problem.


Sincerely yours
Eugene Mayevski
#18118
Posted: 11/08/2011 02:05:24
by Masashi Harasawa (Priority Standard support level)
Joined: 11/07/2011
Posts: 16

1.5TB is size of virtual disk.
1.5TB is not size of copy data.

I am using HDD that has capacity 1.5 TB, and I mount it's HDD.
I prepared 1KB of copy data(test.txt) and I ran the following command.

XCOPY test.txt Z:\

The above command generates an error.

Thanks a lot for your help.
Masashi Harasawa
#18123
Posted: 11/09/2011 06:33:05
by  Victor Voytko
I'm trying to reproduce your issue in different ways, but still cann't.
XCOPY works fine with 1.5TB capacity virtual disk even if CallbackFileSystem.SectorSize property is not set to 4096.
So please specify what exactly error you've got in your case and whether it can be reproduced on another machine?
#18126
Posted: 11/09/2011 23:11:42
by Masashi Harasawa (Priority Standard support level)
Joined: 11/07/2011
Posts: 16

The error message is following.
"Insufficient disk space on current disk. Insert another disk and type <Return> to continue..."

I tried the XCOPY command on Windows Server 2008R2 64bit, too.
But, The XCOPY command failed in virtual disk with 1.5TB capacity, and in virtual disk with 2.5TB capacity.

I think it reproduce in larger capacity virtual disk (e.g. 2.5TB),
So, Would you try to the XCOPY with larger capacity virtual disk?

And if you don't mind, Would you teach me your environment in which the XCOPY works fine?

Thanks a lot for your help.
Masashi Harasawa
#18129
Posted: 11/10/2011 01:02:49
by Volodymyr Zinin (EldoS Corp.)

Could you perform the following:

1. Run Process Monitor from sysinternals.com.
2. Reproduce the problem.
3. Save the Process Monitor log in the native format (which is ".pml" or so).
4. Give the log to us.

Thanks.
#33228
Posted: 05/05/2015 07:41:17
by William Levra-Juillet (Priority Standard support level)
Joined: 09/05/2013
Posts: 49

Hi,
Sorry to dig up an old problem, but I'm facing the exact same issue with latest cbfs version (5.1.157).

Easily reproducible with the mapper sample.
The key is to have a drive with more than 1TB of free space.
If you don't, an easy tweak is to simulate such a drive in mapper sample by altering:
void CbFsGetVolumeSize(...) with something like:
{
__int64 FreeBytesToCaller, TotalBytes, FreeBytes;

if(!GetDiskFreeSpaceEx(g_RootPath,
(PULARGE_INTEGER)&FreeBytesToCaller,
(PULARGE_INTEGER)&TotalBytes,
(PULARGE_INTEGER)&FreeBytes))
{
throw ECBFSError(GetLastError());
}

TotalBytes = 2L * (__int64)1024 * 1024 * 1024 * 1024L; // 2TB total
FreeBytes = 3L * (__int64)512 * 1024 * 1024 * 1024L; // 1.5TB free

*NumberOfFreeSectors = FreeBytes / g_CbFs.GetSectorSize();
*TotalNumberOfSectors = TotalBytes / g_CbFs.GetSectorSize();
}
You can check that Explorer does report the drive as 2TB with 1.5TB free as expected.
Now, use xcopy to copy any file to the mapped drive (z:):
xcopy c:\blabla\localfile.txt z:\
and it returns error:
Insufficient disk space on current disk.
Insert another disk and type <Return> to continue...

I attach the pml as requested in previous message:
https://dl.dropboxusercontent.com/u/5041676/Logfile.PML

Thx!
#33237
Posted: 05/06/2015 09:36:03
by Volodymyr Zinin (EldoS Corp.)

Hi,

The problem is reproducible. It seems the problem exists only when the disk is "removable" (when the scRemovable characteristic is set).
I have tried to use "fixed" disk (i.e. call g_CbFs.SetStorageCharacteristics( (CallbackFileSystem::CbFsStorageCharacteristics)0)) and XCOPY works as expected. It seems this is not a bug of CBFS.

BTW there is a problem with fixed non-PnP disks. One customer reported that Windows works with such disks slower than with "removable" ones or with the "fixed" PnP disks.
#33249
Posted: 05/07/2015 01:11:03
by William Levra-Juillet (Priority Standard support level)
Joined: 09/05/2013
Posts: 49

Hi Volodymyr,

I suspect it's linked with sector size, and 32bits integer overflow.
Indeed, 1TB / 512 (default sector size) is INT_MAX (2 billions something on signed 32bits). And maybe xcopy (or an api in the middle) does not really support int64 and convert it to int? Just guessing...

I can't repro with a real ntfs drive, because the sector size is 4096, so it should repro with an available size of 8TB (4096 is 512 x 8). And I don't have a drive with 8TB free :)

Quote
One customer reported that Windows works with such disks slower...

I'm that customer :)
I'll do some tests with pnpDisk. What is the difference between disk and pnpDisk?

Thx!
#33251
Posted: 05/07/2015 03:46:05
by William Levra-Juillet (Priority Standard support level)
Joined: 09/05/2013
Posts: 49

Right, I've tried to use StorageType to stDiskPnP and StorageCHaracteristics to 0 (non removable).
I confirm that xcopy seems to work when avail space > 1TB.

But I faced another problem with pnpDisk...
Right-click on my drive and select properties
In the properties dialog, select "Hardware" tab.
Select "StorLib Virtual Storage" disk and click "Properties"
In that new dialog, select "Volumes" tab, and click "Populate".

As soon as I click populate, the dialog disappears, and a few seconds later, my "Unmount" callback is called and the disk stops working :(

Also, if I plug/unplug a usb device, the drive disappears in windows.

Is that a known issue with pnpDisk?
Thx!
Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.

Reply

Statistics

Topic viewed 7413 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!