I know a volume can span multiple bricks. I was wondering is the converse true where a single brick is used with multiple volumes.
Or we should just use the subdir option.
I know a volume can span multiple bricks. I was wondering is the converse true where a single brick is used with multiple volumes.
Or we should just use the subdir option.
Hei @archimedes, brick is the smallest unit of the components used in gluster. Before creating a volume you need to create bricks which you have to specify in volume creation command. The number of bricks depends upon the level of replication you need to your data. So, the converse doesn't hold.
All a "brick" really needs to be is a directory. It's best practice to make that brick a dedicated filesystem so that its capacity and used space are predictable metrics, but those are just suggestions.
So while in the strictest definition you cannot use a brick for multiple volumes, you can use multiple directories or subvolumes on a single filesystem to provide "bricks" to multiple volumes. The use of storage quotas can help with preventing "noisy neighbor" space exhaustion when using a single filesystem like that, but writes to one volume will still impact the "used" space on other volumes backed by the same filesystem in that model.
I don't recommend sharing a brick like this, though you can. The prescribed storage stack of "drive > LVM > thinLVM > XFS" on all bricks is very stable and allows for volume snapshot support.