Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

15
Ceph-Dokan A Native Windows Ceph Client Meng Shengzhi @UnitedStack [email protected] 2015-6-6

Transcript of Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Page 1: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Ceph-Dokan A Native Windows Ceph Client

Meng Shengzhi @UnitedStack [email protected]

2015-6-6

Page 2: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Overview

Why Ceph-Dokan

Ceph-Dokan Developing

How to use Ceph-Dokan

Roadmap

Page 3: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Why Ceph-DokanCeph now run on Linux

No way to access Ceph directly on Win32

librbd, libcephfs, librados is needed on Win32

Samba is too slow

Page 4: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

What is Ceph-DokanAll code compiled to Win32 platform

No translation dll is needed

Use Dokan like linux fuse

Directly mount CephFS like a local drive

libcephfs, librbd, librados

Page 5: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

How to run Ceph Code on Windows

MSVC

Cygwin

MinGW32

Page 6: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

How to run Ceph Code on Windows

ceph-mingw-types.h

pthread

mutex

memory mgmt

Page 7: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

How to run Ceph Code on Windows

boost library

poll -> select

linux socket -> winsock2

other system call (backtrace, Sleep, etc)

Page 8: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Linux POSIX to Win32 FS

Dokan implements Win32 FS API

Ceph implements Linux POSIX API

Win32 and POSIX is very different

Page 9: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Linux POSIX to Win32 FS

open -> CreateFile

readdir, stat -> FindFiles

char* <-> wchar

UTF8 <-> GBK

Page 10: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Compile Ceph-DokanDownload MinGW from http://ceph.com/misc/MinGW-20150115.zip

Unzip the MinGW-20150115.zip to C:\

Open C:\MinGW\msys\1.0\msys.bat you will get a MINGW32 bash shell.

Git clone the ceph-dokan

Make

Page 11: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Use Ceph-Dokan Install Dokan 0.6.0 on your Windows.Thread model

Dokan 0.6.0 support Windows XP/Vista/7/2008/8/2012

If you use Win8 or Win2012, you need install Dokan in Windows 7 compatibility mode.

Compile Ceph-Dokan

Mount:

Page 12: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Using Ceph-Dokan

Page 13: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Using Ceph-Dokan

Page 14: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Roadmap

cephx

librados.dll

librbd.dll

merge to upstream

Page 15: Ceph Day Beijing: Ceph-Dokan: A Native Windows Ceph Client

Thank You!

https://github.com/ceph/ceph-dokan