While creating auto provisioned volume, support added to automatically
calculate the distribute count based on max brick size specified in
the request.
For example, below command creates 2x3(Distributed replicate) volume
```
glustercli volume create gv1 --replica 3 --size 1G \
--max-brick-size 512M
```
Fixes: #999
Signed-off-by: Aravinda VK <avishwan@redhat.com>
This patch creates the arbiter brick for the smart volume as per the
calculation:
brick size = 4 KB * ( size in KB of largest data brick in volume or
replica set / average file size in KB)
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
Snapshot bricks are provisoned by glusterd. During a glusterd
restart, we should check for brick mounts for activated
snapshots.
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
'--advanced' in the CLI and REST API during volume create doesn't intuitively
and clearly indicate that it's for the volume options. A new user may read this
as creation of an "advanced volume" which isn't true.
The flags have now been prepended with 'allow' in the fields of request structs.
The API has been renamed as 'allow-<type>-options'.
Also, created 'VolOptionFlags' struct for flags of options and embeded it in
all request structs.
Signed-off-by: Prashanth Pai <ppai@redhat.com>
add Xlator action function to start
daemons if volume starts
add Xlator action function to stop
daemons if volume stops and if daemon
is not managing any other volumes.
update volinfo in ETCD and notify
all nodes about newly generated volfiles
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
On `glusterd2` restart, it checks the list of auto provisioned bricks
and mounts if not mounted already.
Updates: #851
Signed-off-by: Aravinda VK <avishwan@redhat.com>
volume create and volume expand
added additional flag to create brick dir if its not exists
exposed flags for volume create and expand
in glustercli
added e2e test cases for flags in
volume create and volume expand
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
Also change the way profile disable is implemented, offvalue
is not required and having it can create confusion and is not
readable in vol info output.
Signed-off-by: Poornima G <pgurusid@redhat.com>
Merged duplicate code, simplified interface for volfiles.
Now it is easy to support both interface code and template for
volfile generation
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Sub volumes support is added to Volinfo. Code based volfile generation
is implemented(Still exploring the possible approach to do that based on
input json/yml/toml)
All volfiles available in `$SRC/glusterd2/volgen2/volfile_*.go`
Features:
- Easy to add condition while generating volfile(For example, bitrot
volfile only contains local bricks information)
- Easy to generate Cluster level, Volume level and Brick level volfiles
- Adding new volfile support is easy(Add one file)
- Full access to Cluster Info/Volume Info/Brick Info
- All supported volfiles are available now
- All generated volfiles are stored in etcd
- REST endpoint available to trigger regeneration of volfiles(Selective
regeneration not yet available)
Limitations:
- Currently limited to code based volfile generation. If new volfile
added or modified, Glusterd2 need to be recompiled. I tried template
based approach to support cluster volfiles but it is getting over
complecated. If this is not blocker now, we can proceed with this
approach.
Future:
- Template file(json/yml/toml) support can be added on top of
this if required.
Fixes: #388
Signed-off-by: Aravinda VK <avishwan@redhat.com>
This patch adds partial support for arbiter volume creation and
displaying volume info in the output. brick volgen support is still
pending, wherein we need to insert the arbiter xlator into every 3rd
brick of the replica. For now, even if you create arbiter volume, the
3rd brick becomes a full fledged data brick.
Signed-off-by: Ravishankar N <ravishankar@redhat.com>