CephFS Client on Windows based on Dokan 0.6.0

General

The following instructions include what you need to download, install, and compile to run the Ceph-Dokan.exe in order to mount CephFS on your Windows Client.

As of 6/16/16 there is currently no Cephx support with Ceph-Dokan. Cephx is the authentication method for clients/OSDs/Mon/MDS to authenticate to Ceph/CephFS securely using a key. On our online Ceph cluster and online Test Ceph cluster, Cephx is enabled.

However at this time our offline Micro Ceph cluster on the STCNxx nodes -- Cephx is disabled.

The Ceph-dokan developers are discussing Cephx support, see https://github.com/ketor/ceph-dokan/issues/5 for more info.

1. Install MinGW

     a. Go to https://github.com/ketor/ceph-dokan
     b. At the bottom of the Page under the README section, download MinGW from the Dropbox link.
     c. Go to your Downloads folder, right click on the MinGW-xxx.zip, if you have 7-Zip installed choose 7-Zip, then choose Extract files... --> enter C:\ in the location box and click OK.
     d. Now open up My Computer and go to C:\MinGW\msys\1.0\msys.batt to open the MinGW console. Leave the console open but minimize it for now.

2. Install Dokan 0.6.0

     a. Go to https://azuredrive.codeplex.com/downloads/get/354028  and download Dokan-0.6.0.
      b. Go to your Downloads folder and run the DokanInstall_0.6.0.exe -- Chose the default options when installing.
      NOTE: Dokan 0.6.0 must be the version installed. (Do not try Dokan 0.7.4 or any other opposing version).

3. Download & Compile Boost Libs 1.60.0

     a. Go to www.boost.org/doc/libs/1_60_0/more/getting_started/windows.html and download boost_1_60_0.zip
     b. Go to your Downloads folder, right click on boost_1_60_0.zip, choose 7-zip, then choose Extract files... --> enter C:\ in the location box and click OK.
     c. Now open up a Windows Compand Prompt. (Click the Start button, type 'cmd', then press enter).
     d. You need to set the "Path" to the MinGW binary folder. To do so enter
> set PATH=C:\MinGW\bin

     e. Now change the to boost libs directory:

> cd C:\boost_1_60_0\

     f. Now run the bootstrap.bat

> bootstrap.bat mingw

     g. Now Enter:

> b2 toolset=gcc --with-system

4.  Download & Compile Ceph-Dokan

     a. Now you need to get the Ceph-dokan folder with all the contents. You can get this from https://github.com/ketor/ceph-dokan . Once at the page Just click on the green button at the top titled ‘Clone or download’ and choose
         ‘Download ZIP’
     b. Go to your Downloads folder, right click on the file ceph-dokan-master.zip, choose 7-Zip, then Extract files... --> enter C:\ in the location box and click OK.
     c. Now open the MinGW console you minimized earlier (refer to Step 1.d)
     d. Change the directory to the ceph-dokan-master folder

$ cd /c/ceph-dokan-master

     e. Enter the make command. 

$ make

        This will run for a while and eventually fail and complain about a missing file named: BOOST_SYSTEM_LIB=libboost_system-mgw49-mt-1_60.a
    
     f. What you need to do is modify the MakeFile and change a line near the top FROM

-         FROM: BOOST_SYSTEM_LIB=libboost_system-mgw49-mt-1_60.a

-         TO: BOOST_SYSTEM_LIB=C:\boost_1_60_0\stage\lib\libboost_system-mgw48-mt-1_60.a

NOTE: You may notice you are setting the direct path of the file & you are changing the libboost file from mgw49 to mgw48. There is probably a better way to do this. Also, if you are asking yourself why not make this MakeFile change before running 'make', it's because the MakeFile get's overwritten when running the first 'make' pass.

     g. Now rerun the 'make' command in the MinGW console as before and the ceph-dokan.exe should be created successfully.

$ make 

5.  Ceph.conf

     a. Now that you have successfully created the ceph-dokan.exe you need to modify the ceph.conf confuration file for your cluster. The formatting of this file is very sensitive and if you open it with Wordpad, MS Word, or something similar it will mess with the formatting so do the following...
     b. Open Windows Notepad
     c. Go to File > Open > On the bottom right of the Open window change from Text Documents to All Files (*.*) > Open C:\ceph-dokan-master\ceph.conf
     d. The entire configuration file will be in one long line. At the end of the file change the example IP address to your server
         DONT mess with any of the spacing in the file just change the IP ADDRESS to your Ceph cluster MDS.

6. Run Ceph-Dokan

     a. Open the MinGW console (step 1.d)
     b. Change to the directory C:\ceph-dokan-master

$ cd /c/ceph-dokan-master

     c. Enter the command:

$ ceph-dokan.exe -c ceph.conf -l z

     Congratulations! CephFS should now be mounted onto your Z:\ drive (you can change which drive letter you want to mount to by changing the last letter of the command above.
     You must leave the MinGW console open to keep Ceph mounted. To see more ceph-dokan.exe options run ceph-dokan.exe -h
     For more information on this browse through Step 1.a