Skip to content
This repository was archived by the owner on Mar 26, 2020. It is now read-only.

Commit 4ce21c4

Browse files
committed
Merge branch 'master' of https://github.com/gluster/glusterd2 into cluster-wide-options
2 parents 95ef5aa + ea22407 commit 4ce21c4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

glusterd2/options/cluster.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ type validateFunc func(string, string) error
2727

2828
// ClusterOptMap contains list of supported cluster-wide options, default values and value types
2929
var ClusterOptMap = map[string]*ClusterOption{
30-
"cluster.shared-storage": {"cluster.shared-storage", "off", OptionTypeBool, nil},
3130
"cluster.op-version": {"cluster.op-version", strconv.Itoa(gdctx.OpVersion), OptionTypeInt, nil},
3231
"cluster.max-op-version": {"cluster.max-op-version", strconv.Itoa(gdctx.OpVersion), OptionTypeInt, nil},
3332
"cluster.brick-multiplex": {"cluster.brick-multiplex", "off", OptionTypeBool, nil},
3433
"cluster.max-bricks-per-process": {"cluster.max-bricks-per-process", "250", OptionTypeInt, nil},
35-
"cluster.localtime-logging": {"cluster.localtime-logging", "off", OptionTypeBool, nil},
3634
}
3735

3836
// RegisterClusterOpValidationFunc registers a validation function for provided

pkg/lvmutils/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func RemovePV(device string) error {
7171

7272
// GetVgAvailableSize gets available size of given Vg
7373
func GetVgAvailableSize(vgname string) (uint64, uint64, error) {
74-
out, err := exec.Command("vgdisplay", "-c", vgname).Output()
74+
out, err := exec.Command("vgdisplay", "-c", "--readonly", vgname).Output()
7575
if err != nil {
7676
return 0, 0, err
7777
}
@@ -158,7 +158,7 @@ func RemoveLV(vgName, lvName string) error {
158158
func NumberOfLvs(vgname, tpname string) (int, error) {
159159
nlv := 0
160160
out, err := utils.ExecuteCommandOutput(
161-
"lvs", "--no-headings", "--select",
161+
"lvs", "--no-headings", "--readonly", "--select",
162162
fmt.Sprintf("vg_name=%s&&pool_lv=%s", vgname, tpname),
163163
)
164164

@@ -176,7 +176,7 @@ func NumberOfLvs(vgname, tpname string) (int, error) {
176176
// GetThinpoolName gets thinpool name for a given LV
177177
func GetThinpoolName(vgname, lvname string) (string, error) {
178178
out, err := utils.ExecuteCommandOutput(
179-
"lvs", "--no-headings", "--select",
179+
"lvs", "--no-headings", "--readonly", "--select",
180180
fmt.Sprintf("vg_name=%s&&lv_name=%s", vgname, lvname),
181181
"-o", "pool_lv",
182182
)

0 commit comments

Comments
 (0)