Exclude filename from gluster replication - glusterfs

In glusterfs 3.5.2, is it possible to not replicate some file based on filename ?
I don't see this feature in filter or translator.

No. If you have a replicate configuration, all files will get replicated.

Related

Multiple data file directories with different sizes

can you configure multiple data_file_directories with different sizes and Cassandra will manage it without issue ?
For example:
data_file_directories:
- /data1/cassandra/data
- /data4/cassandra/data
where data1 is 450 GB and data4 is 1 TB.
Thank you !
Different size will not be an issue, however there are some gotchas when it comes to using multiple dirs for data_file_directories. I'd encourage you to read through TLP's blog that highlights most of them.
The summary is that there are bugs that hit usage of multiple data dirs in older versions of cassandra. With more modern versions there are still issues where removing one of the data directories could render the node unrecognisable to the rest of the cluster, although this is not really a bug, you are removing the system tables that store cluster membership information.
It should be fine. Just mention all the directories in cassandra.yaml file and restart if needed.

Can glusterfs volume be created out of directory instead of partition?

I want to create volume using glusterfs. Can glusterfs volume be created out of directory instead of partition ?
Yes, that should work. I pretty much use it that way during development/testing:
gluster volume create testvol replica 3 myhost:/home/ravi/bricks/brick{1..6} force
Unless you want to use features like snapshot which require thinly provisioned lvms as partitions.
Might I also add that if you place multiple bricks of different distribute subvols on the same folder, things like df and quotas might not always work as intended.

Un-glusterize a disk?

How can I get back a bare disk (with the data) that was used in a simple 2 nodes replicas GlusterFS cluster ?
Would removing the .glusterfs directory be sufficient or are the files themselves somehow tied to GlusterFS?
In addition to removing the .glusterfs directory, you would also need to remove the various extended attributes which gluster sets on each of the files/directorys in the brick.

How to inspect the local hints directory on a Cassandra node?

I'm encountering the same problem as Cassandra system.hints table is empty even when the one of the node is down:
I am learning Cassandra from academy.datastax.com. I am trying the Replication and Consistency demo on local machine. RF = 3 and Consistency = 1.
When my Node3 is down and I am updating my table using update command, the SYSTEM.HINTS table is expected to store hint for node3 but it is always empty.
#amalober pointed out that this was due to a difference the Cassandra version being used. From the Cassandra docs at DataStax:
In Cassandra 3.0 and later, the hint is stored in a local hints directory on each node for improved replay.
This same question was asked 3 years ago, How to access the local data of a Cassandra node, but the accepted solution was to
...Hack something together using the Cassandra source that reads SSTables and have that feed the local client you're hoping to build. A great starting point would be looking at the source of org.apache.cassandra.tools.SSTableExport which is used in the sstable2json tool.
Is there an easier way to access the local hints directory of a Cassandra node?
Is there an easier way to access the local hints directory of a Cassandra node?
The hint directory is defined in $CASSANDRA_HOME/conf/cassandra.yaml file (sometimes it is located under /etc/cassandra also, depending on how you install Cassandra)
Look for the property hints_directory
I guess you are using ccm. So, the hint file should be in $CASSANDRA_HOME/.ccm/yourcluster/yournode/hints directory
I haven't been able to reproduce your issue with not getting a hints file. Every attempt I had resulted in the hints file as expected. There is a way to view the hints easier now.
We added a dump for hints in sstable-tools that you can use to view the mutations in the HH files. We may in the future add ability to use the HH files like sstables in the shell (use mutations to build memtable and include in queries) but for now its pretty raw.
Its pretty simple (sans metadata setup) if you wanna do analysis of data yourself. You can see what we did here and change to your needs: https://github.com/tolbertam/sstable-tools/blob/master/src/main/java/org/apache/cassandra/hints/HintsTool.java#L39

How can I specify the file_data_directories for a keyspace

When I defines several file_data_directories in cassandra.yaml, would it be possible to specify the location keyspace and tables ? or it is automatically managed by Cassandra.
Thx.
The only way to do this is to define specific mount points that map to Cassandra's directory structure (i.e. [data]/keyspace/...). This is not a great solution, but there's no other way to do it now.

Resources