1. Ceph cluster construction and CephFS creation
Refer to the previous article
Centos stream 8 uses cephadm to install Ceph (17.2.6 quincy) cluster_Apollo.2012 Blog-CSDN Blog
2. Mount CephFS to Windows Server 2019
1. Prepare Dokany
Download address: Release 1.5.1.1000 · dokan-dev/dokany · GitHub
Download version 1.5.1. The latest 2.0 version will have an exception when mounting, I don't know why.
2. Download Ceph for Windows
Ceph for Windows MSI installer download link: Ceph for Windows - Cloudbase Solutions
Download the corresponding Q version
3. Install Dokany first, then install Ceph for Windows MSI and follow the prompts to complete.
4. Configuration
a. Copy the ceph.client.admin.keyring file on the ceph cluster (the file is usually in the /etc/ceph/ directory) to the C:\ProgramData\Ceph folder.
b. Create a ceph.conf file in the C:\ProgramData\Ceph directory, and change the mon host to the address of the ceph node. The content is as follows:
# minimal ceph.conf for 9621bcc6-fc83-11ed-9be2-0050568b3a3f
[global]
log to stderr = true
; Uncomment the following in order to use the Windows Event Log
; log to syslog = true
run dir = C:/ProgramData/ceph/out
crash dir = C:/ProgramData/ceph/out
; Use the following to change the cephfs client log level
; debug client = 2
[client]
keyring = C:/ProgramData/ceph/ceph.client.admin.keyring
; log file = C:/ProgramData/ceph/out/$name.$pid.log
admin socket = C:/ProgramData/ceph/out/$name.$pid.asok
#client_permissions = true
;client_mount_uid = 1000
;client_mount_gid = 1000
[global]
mon host = 10.0.49.120,10.0.49.121,10.0.49.122
5. Mount the file system
C:\Users\Administrator>ceph-dokan.exe -c c:\ProgramData\Ceph\ceph.conf -l x
2023-06-07T17:01:07.582中国标准时间 1 0 ceph-dokan: Mounted cephfs directory: /. Mountpoint: x
If there are multiple CephFS, you can use the --client_fs parameter to specify the CephFS name
ceph-dokan.exe -c c:\ProgramData\Ceph\ceph.conf -l y --client_fs Cephfs_b
# 卸载
ceph-dokan.exe unmap -l x