]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | ======================= |
2 | Mount CephFS on Windows | |
3 | ======================= | |
4 | ||
5 | ``ceph-dokan`` can be used for mounting CephFS filesystems on Windows. | |
6 | It leverages Dokany, a Windows driver that allows implementing filesystems in | |
7 | userspace, pretty much like FUSE. | |
8 | ||
9 | Please check the `installation guide`_ to get started. | |
10 | ||
11 | Usage | |
12 | ===== | |
13 | ||
14 | Mounting filesystems | |
15 | -------------------- | |
16 | ||
17 | In order to mount a ceph filesystem, the following command can be used:: | |
18 | ||
19 | ceph-dokan.exe -c c:\ceph.conf -l x | |
20 | ||
21 | This will mount the default ceph filesystem using the drive letter ``x``. | |
22 | If ``ceph.conf`` is placed at the default location, which is | |
23 | ``%ProgramData%\ceph\ceph.conf``, then this argument becomes optional. | |
24 | ||
25 | The ``-l`` argument also allows using an empty folder as a mountpoint | |
26 | instead of a drive letter. | |
27 | ||
28 | The uid and gid used for mounting the filesystem default to 0 and may be | |
29 | changed using the following ``ceph.conf`` options:: | |
30 | ||
31 | [client] | |
32 | # client_permissions = true | |
33 | client_mount_uid = 1000 | |
34 | client_mount_gid = 1000 | |
35 | ||
36 | If you have more than one FS on your Ceph cluster, use the option | |
37 | ``--client_fs`` to mount the non-default FS:: | |
38 | ||
39 | mkdir -Force C:\mnt\mycephfs2 | |
40 | ceph-dokan.exe --mountpoint C:\mnt\mycephfs2 --client_fs mycephfs2 | |
41 | ||
42 | CephFS subdirectories can be mounted using the ``--root-path`` parameter:: | |
43 | ||
44 | ceph-dokan -l y --root-path /a | |
45 | ||
46 | If the ``-o --removable`` flags are set, the mounts will show up in the | |
47 | ``Get-Volume`` results:: | |
48 | ||
49 | PS C:\> Get-Volume -FriendlyName "Ceph*" | ` | |
50 | Select-Object -Property @("DriveLetter", "Filesystem", "FilesystemLabel") | |
51 | ||
52 | DriveLetter Filesystem FilesystemLabel | |
53 | ----------- ---------- --------------- | |
54 | Z Ceph Ceph | |
55 | W Ceph Ceph - new_fs | |
56 | ||
57 | Please use ``ceph-dokan --help`` for a full list of arguments. | |
58 | ||
59 | Credentials | |
60 | ----------- | |
61 | ||
62 | The ``--id`` option passes the name of the CephX user whose keyring we intend to | |
63 | use for mounting CephFS. The following commands are equivalent:: | |
64 | ||
65 | ceph-dokan --id foo -l x | |
66 | ceph-dokan --name client.foo -l x | |
67 | ||
68 | Unmounting filesystems | |
69 | ---------------------- | |
70 | ||
71 | The mount can be removed by either issuing ctrl-c or using the unmap command, | |
72 | like so:: | |
73 | ||
74 | ceph-dokan.exe unmap -l x | |
75 | ||
76 | Note that when unmapping Ceph filesystems, the exact same mountpoint argument | |
77 | must be used as when the mapping was created. | |
78 | ||
79 | Limitations | |
80 | ----------- | |
81 | ||
82 | Be aware that Windows ACLs are ignored. Posix ACLs are supported but cannot be | |
83 | modified using the current CLI. In the future, we may add some command actions | |
84 | to change file ownership or permissions. | |
85 | ||
86 | Another thing to note is that cephfs doesn't support mandatory file locks, which | |
87 | Windows is heavily rely upon. At the moment, we're letting Dokan handle file | |
88 | locks, which are only enforced locally. | |
89 | ||
90 | Unlike ``rbd-wnbd``, ``ceph-dokan`` doesn't currently provide a ``service`` | |
91 | command. In order for the cephfs mount to survive host reboots, consider using | |
92 | ``NSSM``. | |
93 | ||
94 | Troubleshooting | |
95 | =============== | |
96 | ||
97 | Please consult the `Windows troubleshooting`_ page. | |
98 | ||
99 | .. _Windows troubleshooting: ../../install/windows-troubleshooting | |
100 | .. _installation guide: ../../install/windows-install |