EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Max. mountable virtual disks

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#17446
Posted: 09/07/2011 02:41:50
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

Is there max. number of mountables drives in CBFS?
In WS2008, part a physical disk(D:) to 13 partitions and mount each partition to different drive. is it possible?

In my test, mount was OK, but access was denied from the 13th drive.
#17447
Posted: 09/07/2011 03:01:03
by Volodymyr Zinin (EldoS Corp.)

It's possible to create up to 255 virtual disks.

Quote
Sangmin Lee wrote:
In my test, mount was OK, but access was denied from the 13th drive.

Check if you callbacks work correctly for the 13th drive. Try to attach Process Monitor from sysinternals.com and look for "suspicious" operations for this drive in the log (unexpected error or so).
#17448
Posted: 09/07/2011 04:07:59
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

Run Process Monitor to include only our process name.
And do 'dir" command on DOS windows.
To 12th drive, displayed messages on Process Monitor.
But, to 13th drive, displayed nothing. Error message "The filename, directory name, or volume label syntax is incorrect' was out.
#17449
Posted: 09/07/2011 06:33:03
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

Please, check the attached file.

12rd drive properties:
Drive name = N:
Volume label = vol12
Type = Network Drive
File system = GLORY-FS(our file system name)

13th drive properties:
Drive name = F:
Volume label = NULL
Type = Network Drive
File System = NULL

I checked the return value of CbFs.SetFileSystemName(_T("GLORY-FS")).
It returned TRUE.
You can see the log message(vol13:F: SetFileSystemName done) from the Event Viewer.

I don't know why the properties are different....

---- Event Log ---------------------------------------------------------------
vol13:F: SetFileSystemName done.
GetVolumeID(vol13:F:): volume id(23854560).
GetVolumeLabel(vol13:F:): volume label(vol13).
User mount xxx.xxx.xxx.xxx:/vol13 F: 1 0 0 0 1
vol12:N: SetFileSystemName done.
GetVolumeID(vol12:N:): volume id(22478024).
GetVolumeLabel(vol12:N:): volume label(vol12).
User mount xxx.xxx.xxx.xxx:/vol12 N: 1 0 0 0 1


#17452
Posted: 09/07/2011 14:08:46
by Volodymyr Zinin (EldoS Corp.)

Please specify your code snippet which performs the storages creation and mounting point assigning.
Thanks.
#17454
Posted: 09/07/2011 19:24:01
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

Thanks in advance.

Code
// Set Mount Information
   gfsClient.mgt_info.mgt_addr.sin_addr.s_addr = dwMdsIPAddress;
   gfsClient.mgt_info.mgt_addr.sin_family = AF_INET;
   gfsClient.mgt_info.mgt_addr.sin_port = htons(GFS_MGT_PORT);
   wcstombs(gfsClient.volume, volumeName, wcslen(volumeName) + sizeof(WCHAR));
   wcstombs(gfsClient.mount_point, mountPoint, wcslen(mountPoint) +  + sizeof(WCHAR));
   gfsClient.uid = uid;
   gfsClient.gid = gid;
   gfsClient.attrTimeout = attrTimeout;
         try {
      DoMount(&g_CbFs);
   } catch (ECBFSError err) {
      TCHAR w_em2[100];
      wsprintf(w_em2, err.Message(), mdsAddr);
      wsprintf(w_em, _T("mount %s on %s: DoMount() fail.\n%s"), volumeURI, mountPoint, w_em2);
      REPORTEVENTW(EVENTLOG_ERROR_TYPE, 0, w_em);
      return FALSE;
   }

   // Create a storage
   try {
      g_CbFs.CreateStorage();      
   } catch (ECBFSError err) {
      wsprintf(w_em, _T("mount %s on %s: CreateStorage() fail.\n%s"), volumeURI, mountPoint, err.Message());
      REPORTEVENTW(EVENTLOG_ERROR_TYPE, 0, w_em);
      return FALSE;
   }

   // Mount the storage to a drive
   try {
      if (mountType == 1) {
         wchar_t mount[MAX_NAME_LEN];

         wsprintf(mount, _T("%s;%d.%d.%d.%d;%s"),
               mountPoint,  
               (client->mgt_info.mgt_addr.sin_addr.S_un.S_addr)&0xff,
               (client->mgt_info.mgt_addr.sin_addr.S_un.S_addr>>8)&0xff,
               (client->mgt_info.mgt_addr.sin_addr.S_un.S_addr>>16)&0xff,
               (client->mgt_info.mgt_addr.sin_addr.S_un.S_addr>>24)&0xff,
               volumeName);

         g_CbFs.AddMountingPoint(mount, CBFS_SYMLINK_NETWORK, NULL);
      } else {
         g_CbFs.AddMountingPoint(mountPoint, CBFS_SYMLINK_SIMPLE, NULL);
      }
      
   } catch (ECBFSError err) {
      g_CbFs.DeleteStorage(TRUE);

      wsprintf(w_em, _T("mount %s on %s: AddMountingPoint() fail.\n%s"), volumeURI, mountPoint, err.Message());
      REPORTEVENTW(EVENTLOG_ERROR_TYPE, 0, w_em);

      return FALSE;
   }

   // Mount a media
   try {
      g_CbFs.MountMedia(10*1000*100);
} catch (ECBFSError err) {
      g_CbFs.DeleteMountingPoint(mountPoint, 0, NULL);
      g_CbFs.DeleteStorage(TRUE);

      wsprintf(w_em, _T("mount %s on %s: MountMedia() fail.\n%s"), volumeURI, mountPoint, err.Message());
      REPORTEVENTW(EVENTLOG_ERROR_TYPE, 0, w_em);

      return FALSE;
   }

   // disable system metadata cache
   g_CbFs.DisableMetaDataCache(TRUE);

   // set file system name
         BOOL bRet = g_CbFs.SetFileSystemName(_T("GLORY-FS"));
   if (bRet == FALSE)
   {
      REPORTEVENTA(EVENTLOG_ERROR_TYPE, 0, "%ls:%s: SetFileSystemName failed[%d]\n", volumeName, mountPoint, GetLastError());
      return FALSE;
   } else
      REPORTEVENTA(EVENTLOG_INFORMATION_TYPE, 0, "%ls:%s: SetFileSystemName done.\n", volumeName, mountPoint);


Callback Functions
Code
VOID CbFsGetVolumeLabel
(
   CallbackFileSystem*      Sender,
   LPTSTR               VolumeLabel
)
{
   WCHAR   volumeLabel[MAX_NAME_LEN];
   ZeroMemory(volumeLabel, MAX_NAME_LEN);

   mbstowcs(volumeLabel, VOLUME, strlen(VOLUME));
    _tcscpy(VolumeLabel, volumeLabel);

   REPORTEVENTA(EVENTLOG_INFORMATION_TYPE, 0, "GetVolumeLabel(%s:%s): volume label(%ls).\n", VOLUME, MOUNT_POINT, volumeLabel);
}

//-----------------------------------------------------------------------------------------------------------

VOID CbFsSetVolumeLabel
(
   CallbackFileSystem*      Sender,
   LPCTSTR               VolumeLabel
)
{
   // nothing to do
}

//-----------------------------------------------------------------------------------------------------------

VOID CbFsGetVolumeId
(
   CallbackFileSystem*      Sender,
   PDWORD               VolumeID
)
{      
   *VolumeID = 0x12345678 + VOLID;

   REPORTEVENTA(EVENTLOG_INFORMATION_TYPE, 0, "GetVolumeID(%s:%s): volume id(%d).\n", VOLUME, MOUNT_POINT, VolumeID);
}
#17471
Posted: 09/08/2011 13:06:26
by Volodymyr Zinin (EldoS Corp.)

Fixed. The bugfix will be available in the next build.
The bug was associated with network mounting points (i.e. when CBFS_SYMLINK_NETWORK was specified). With the CBFS_SYMLINK_SIMPLE flag it should work correctly.
#17474
Posted: 09/08/2011 20:29:43
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

When can I get the next build?
In our filelsystem, all volumes should be mounted with CBFS_SYMLINK_NETWORK flag.
Thanks for your help.
#17475
Posted: 09/09/2011 00:29:17
by Eugene Mayevski (EldoS Corp.)

Most likely release will be made next week.


Sincerely yours
Eugene Mayevski
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 1405 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!