CephFS: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 156: Line 156:
</li>
</li>
<li><p>Mount the filesystem</p>
<li><p>Mount the filesystem</p>
<ul>
<ul>
<li>Create a mount point directory somewhere in your host (<code>/cephfs</code>, is used here)</li>
<li>Create a mount point directory somewhere in your host (<code>/cephfs</code>, is used here)</li>
<source lang="bash">
  mkdir /cephfs
  mkdir /cephfs
</source>
<li>Via kernel mount using the ceph driver. You can do a permanent mount by adding the followin in the VM fstab
<li>Via kernel mount using the ceph driver. You can do a permanent mount by adding the followin in the VM fstab
<tabs>
<tabs>
Line 168: Line 168:
   |lang="txt"
   |lang="txt"
   |contents=
   |contents=
10.30.201.3:6789,10.30.202.3:6789,10.30.203.3:6789:/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ ceph name=MyCephFS-RW 0  2
:/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ ceph name=MyCephFS-RW 0  2
}}
}}
</tab>
</tab>
Line 176: Line 176:
   |lang="txt"
   |lang="txt"
   |contents=
   |contents=
10.65.0.10:6789,10.65.0.12:6789,10.65.0.11:6789:/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ ceph name=MyCephFS-RW,mds_namespace=cephfs_4_2,x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw 0  2
:/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ ceph name=MyCephFS-RW,mds_namespace=cephfs_4_2,x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw 0  2
}}
}}
</tab>
</tab>
</tabs>
</tabs>


Note that the mount options are different on different systems. The namespace option is requires for SD4H/Juno while other option are performance tweaks.
Note  
<li> There is a non-standar/funky <code>:</code> before the device path, it is not a typo!
The mount options are different on different systems.  
The namespace option is requires for SD4H/Juno while other option are performance tweaks.


<li>It can also be done from the command line:</li>  
<li>It can also be done from the command line:</li>  
Line 187: Line 190:
<tab name="Arbutus">
<tab name="Arbutus">
<code>
<code>
sudo mount -t ceph 10.30.201.3:6789,10.30.202.3:6789,10.30.203.3:6789:/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ -o name=MyCephFS-RW
sudo mount -t ceph :/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ -o name=MyCephFS-RW
</code>
</code>
</tab>
</tab>
<tab name="SD4H/Juno">
<tab name="SD4H/Juno">
<code>
<code>
sudo mount -t ceph 10.65.0.10:6789,10.65.0.12:6789,10.65.0.11:6789:/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ -o name=MyCephFS-RW,mds_namespace=cephfs_4_2,x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw
sudo mount -t ceph :/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c /cephfs/ -o name=MyCephFS-RW,mds_namespace=cephfs_4_2,x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw
</code>
</code>
</tab>
</tab>
</tabs>
</tabs>


<li>Via ceph-fuse
<li>Or via ceph-fuse if the file system needs to be mounted in user space
<ul>
 
<li>Need to install ceph-fuse</li>
<li>Install ceph-fuse</li>
<li>Syntax: <code>sudo ceph-fuse &lt;mountPoint&gt; --id=&lt;shareKeyName&gt; --conf=&lt;pathtoCeph.conf&gt; --keyring=&lt;fullKeyringLocation&gt; --client-mountpoint=pathFromShareDetails</code>
 
<ul>
<source lang="bash">
<li>e.g. <code>sudo ceph-fuse /mnt/WebServerShare --id=def-project-shareName-read-write --conf=/etc/ceph/ceph.conf --keyring=/etc/ceph/client.fullkey.def-project-shareName-read-write --client-mountpoint=/volumes/_nogroup/a87b5ef3-b266-4664-a5ed-026cddfdcdb7</code></li></ul>
sudo dnf install ceph-fuse
</source>
<li>Let the fuse mount be accessible in userspace by uncommenting  <code>user_allow_other</code> in the <code>fuse.conf</code> file
 
{{File
  |name=/etc/fstab
  |lang="txt"
  |contents=
# mount_max = 1000
user_allow_other
}}
 
<li> You can now mount cephFS in a user home:
<source lang="bash">
mkdir ~/my_cephfs
ceph-fuse my_cephfs/ --id=MyCephFS-RW --conf=~/ceph.conf --keyring=~/ceph.keyring  --client-mountpoint=/volumes/_nogroup/f6cb8f06-f0a4-4b88-b261-f8bd6b03582c
</source>
Note that the client name is here the <code>--id</code> and that the <code>ceph.conf</code> and <code>ceph.keyring</code>  
 
</li></ul>
</li></ul>
</li></ul>
</li></ul>
cc_staff
127

edits

Navigation menu