This guide describes how to configure Alluxio with CephFS as the under storage system. Alluxio supports
two different implementations of under storage system for CephFS:
cephfs-java
libcephfs_jni
libcephfs2
Modify conf/alluxio-site.properties
to include:
alluxio.underfs.cephfs.conf.file=<ceph-conf-file>
alluxio.underfs.cephfs.mds.namespace=<ceph-fs-name>
alluxio.underfs.cephfs.mount.point=<ceph-fs-dir>
alluxio.underfs.cephfs.auth.id=<client-id>
alluxio.underfs.cephfs.auth.keyring=<client-keyring-file>
Modify conf/alluxio-site.properties
to include:
alluxio.underfs.hdfs.configuration=${ALLUXIO_HOME}/conf/core-site.xml
Modify conf/core-site.xml
to include:
<configuration>
<property>
<name>fs.default.name</name>
<value>ceph://mon1,mon2,mon3/</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>ceph://mon1,mon2,mon3/</value>
</property>
<property>
<name>ceph.data.pools</name>
<value>${data-pools}</value>
</property>
<property>
<name>ceph.auth.id</name>
<value>${client-id}</value>
</property>
<property>
<name>ceph.conf.options</name>
<value>client_mount_gid=${gid},client_mount_uid=${uid},client_mds_namespace=${ceph-fs-name}</value>
</property>
<property>
<name>ceph.root.dir</name>
<value>${ceph-fs-dir}</value>
</property>
<property>
<name>ceph.mon.address</name>
<value>mon1,mon2,mon3</value>
</property>
<property>
<name>fs.AbstractFileSystem.ceph.impl</name>
<value>org.apache.hadoop.fs.ceph.CephFs</value>
</property>
<property>
<name>fs.ceph.impl</name>
<value>org.apache.hadoop.fs.ceph.CephFileSystem</value>
</property>
<property>
<name>ceph.auth.keyring</name>
<value>${client-keyring-file}</value>
</property>
</configuration>
Start up Alluxio locally to see that everything works.
This should start an Alluxio master and Alluxio worker. You can see the master UI at
http://localhost:19999.
An CephFS location can be mounted at a nested directory in the Alluxio namespace to have unified access
to multiple under storage systems. Alluxio’s Command Line Interface can be used for this purpose.
Issue the following command to use the ufs cephfs:
$ ./bin/alluxio fs mkdir /mnt/cephfs
$ ./bin/alluxio fs mount /mnt/cephfs cephfs://mon1\;mon2\;mon3/
Run a simple example program:
$ ./bin/alluxio runTests --path cephfs://mon1\;mon2\;mon3/
Visit your cephfs to verify the files and directories created by Alluxio exist.
You should see files named like:
In cephfs, you can visit cephfs with ceph-fuse or mount by POSIX APIs. Mounting CephFS
${ceph-fs-dir}/default_tests_files/Basic_CACHE_THROUGH
In Alluxio, you can visit the nested directory in the Alluxio. Alluxio’s Command Line Interface can be used for this purpose.
/mnt/cephfs/default_tests_files/Basic_CACHE_THROUGH
An CephFS location can be mounted at a nested directory in the Alluxio namespace to have unified access
to multiple under storage systems. Alluxio’s Command Line Interface can be used for this purpose.
Issue the following command to use the ufs cephfs:
$ ./bin/alluxio fs mkdir /mnt/cephfs-hadoop
$ ./bin/alluxio fs mount /mnt/cephfs-hadoop ceph://mon1\;mon2\;mon3/
Run a simple example program:
./bin/alluxio runTests --path cephfs://mon1\;mon2\;mon3/
Visit your cephfs to verify the files and directories created by Alluxio exist.
You should see files named like:
In cephfs, you can visit cephfs with ceph-fuse or mount by POSIX APIs. Mounting CephFS
${ceph-fs-dir}/default_tests_files/Basic_CACHE_THROUGH
In Alluxio, you can visit the nested directory in the Alluxio. Alluxio’s Command Line Interface can be used for this purpose.
/mnt/cephfs-hadoop/default_tests_files/Basic_CACHE_THROUGH