1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-06 06:45:35 +01:00

27 Commits

Author SHA1 Message Date
Aravinda VK
bebbc65052 Support for loopback bricks
Register the Bricks hosting directory using,

```
glustercli device add <peerid> <path> --provisioner loop
```

Example:

```
glustercli device add 70d79c3f-e7af-43f6-8b65-05dff2423da1 \
	   /exports --provisioner loop
```

Now create the volume using,

```
glustercli volume create gv1 --size 1G \
	   --provisioner loop \
	   --replica 3
```

Fixes: #1418
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2019-02-14 10:49:17 +05:30
Aravinda VK
c896a94589 Skip lvs command during thinpool delete
If a Volume is cloned from another volume, the bricks of cloned volume
will also belong to same LV thinpool as the original Volume. So before
removing the thinpool a check was made to confirm if number of Lvs in
that thinpool is zero. This check was causing hang when parallel
Volume delete commands were issued.

With this PR, number of Lvs check is removed, instead of that captured
the failure of thinpool delete and handled it gracefully.

This PR also adds support for gracefully delete the volume if lv or
thinpool already deleted by previous failed transaction or manual delete.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2019-01-08 15:39:39 +05:30
Madhu Rajanna
e432ed380d Add total and used field to device response
it will be user friendly if we have total,
free,used field in device response.

total size= total size of device.
free size= available size of device for
volume creation.
used size= space used for volume creation.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-12-17 10:34:35 +05:30
Aravinda VK
931b7a2e80 Refactor Device management
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-12-05 11:21:29 +05:30
rishubhjain
3d9707a63a Edit device API 2018-12-05 09:09:14 +05:30
Aravinda VK
af5928bf77 Volume expand: Consider peer id while checking available size
If a device exists with same name in different Peer, it is possible to
get the available size information of the device from different
Peer than getting information locally.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-29 18:00:30 +05:30
Aravinda VK
552d07b7d9 lvm and fs utils code refactor
Moved lvm related functions from `$SRC/glusterd2/snapshot/lvm`
and `$SRC/plugins/device/deviceutils/` to `$SRC/pkg/lvmutils`

Also moved fs related functions from `plugins/deviceutils` to
`$SRC/pkg/fsutils`.

Fixes: #1187
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-11-22 22:38:37 +05:30
Vishal Pandey
48a7ebfd28 Brick resize for volume expand
Signed-off-by: Vishal Pandey <vpandey@redhat.com>
2018-11-22 17:19:02 +05:30
rishubhjain
643fb9dd1b Using bytes instead of KB for volume creation 2018-11-19 15:16:41 +05:30
Hari Gowtham
b5e55a7427 Arbiter brick size calculation for smart volume creation.
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>
2018-11-12 09:58:13 +05:30
Mohammed Rafi KC
73c66caf16 snapshot: Delete parent lv's during restore
During a snapshot restore, we need to delete the parent
lv's if it is auto provisioned or snapshot provisioned

Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-10-16 11:36:06 +05:30
Prashanth Pai
9babdf1037 Use syscall to unmount instead of spawning a process
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-09-07 16:16:23 +05:30
Aravinda VK
1a9d78c8b7 Delete bricks on Volume delete if bricks are auto provisioned
On Volume delete,

- Unmount the Brick if mounted
- Remove LV
- Remove Thinpool if number of Lvs in the thinpool is zero

Fixes: #938
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-08-21 20:01:06 +05:30
rishubhjain
5871918b3e Editing status of device (Enabling/Disabling) 2018-06-29 12:32:08 +05:30
Aravinda VK
5427a32251 Added extra information to os/exec errors
The err string returned by `exec.Command.{Run,Output}` will
not contains `stderr`, Output in log/CLI will just display `exited with
status 1`. This patch adds the content of `stderr` along with the error
message.

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-06-25 17:15:16 +05:30
Madhu Rajanna
e010dd6fdb format error strings: error strings should not
be capitalized,make first letter as lower case

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-06-20 16:21:29 +05:30
rishubhjain
310e76f9b4 Merge branch 'master' of https://github.com/gluster/glusterd2 into usingFetch 2018-06-12 04:36:16 -04:00
rishubhjain
8e1f7fa851 Merge branch 'master' of https://github.com/gluster/glusterd2 into usingFetch 2018-06-11 03:28:33 -04:00
rishubhjain
04f54d8cf2 Merge branch 'master' of https://github.com/gluster/glusterd2 into usingFetch 2018-06-01 01:15:20 -04:00
rishubhjain
bed27b11ae Merge branch 'master' of https://github.com/gluster/glusterd2 into usingFetch
Conflicts:
	plugins/device/deviceutils/store-utils.go
2018-05-30 11:04:06 -04:00
rishubhjain
dc8ec89ff4 Cleaning code 2018-05-30 07:00:51 -04:00
rishubhjain
5c9f279b69 Merge branch 'master' of https://github.com/gluster/glusterd2 into list_device 2018-05-29 13:36:12 -04:00
rishubhjain
07ca83155a List all devices 2018-05-28 02:18:25 -04:00
rishubhjain
9b2b1986be Merge branch 'master' of https://github.com/gluster/glusterd2 into list_device 2018-05-24 10:51:44 -04:00
Aravinda VK
e613a8730c Refactoring for Intelligent Volume Provisioning
Added more device utils and `fstab` handling library

Updates: #466
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-05-24 19:59:38 +05:30
rishubhjain
62273e4c30 Merge branch 'master' of https://github.com/gluster/glusterd2 into group
Conflicts:
	pkg/errors/error.go
2018-05-23 00:16:14 -04:00
rishubhjain
3ed7136984 Renaming commands folder to utils 2018-05-21 00:53:24 -04:00