Can I use GlusterFS volume storage directly without mounting?
Asked Answered
K

2

7

I have setup small cluster of GlusterFS with 3+1 nodes. They're all on the same LAN. There are 3 servers and 1 laptop (via Wifi) that is also GlusterFS node. A laptop often disconnects from the network. ;)

Use case I want to achieve is this:
I want my laptop to automatically synchronize with GlusterFS filesystem when it reconnects. (That's easy and done.) But, when laptop is disconnected from cluster I still want to access filesystem "offline". Modify, add, remove files..

Obviously the only way I can access GlusterFS filesystem when it's offline from cluster, is accessing volume storage directly. The one I configured creating a gluster volume. I guess it's the brick.

Is it safe to modify files inside storage? Will they be replicated to the cluster when the node re-connects?

Kaohsiung answered 24/8, 2015 at 12:9 Comment(1)
I'd recommend using other technologies like Syncthing.Tetrabrach
D
4

There are multiple questions in your list:

First: Can I access GlusterFS when my system is not connected to it:

If you setup a GlusterFS daemon & brick on your system, mount this local daemon through gluster how you would usually do that and add a replication target also, you can access your brick through gluster as if it was not on your local system. The data will then be synchronized with the replication target once you re-connect your system to the network.

Second: Can I edit files in my brick directly:

Technically you can: You can just navigate to your brick and edit a file, however since gluster will not know what you changed, the changes will not be replicated and you will create a split brain situation. So it is certainly not advisable (so don't do that unless you want to change it manually in your replication brick also).

Damson answered 1/4, 2016 at 17:55 Comment(0)
T
1

Tomasz, it is definitely not a good idea to directly manipulate the backend volume. Say you add a new file to the backend volume, glusterfs is not aware of this change and the file appears as spurious file when the parent directory is accessed via the glusterfs volume. I am not sure if glusterfs is ideal for your usecase

Tahoe answered 15/11, 2018 at 20:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.