2021-07-08 14:14:27 +00:00
|
|
|
package admin
|
|
|
|
|
|
|
|
import (
|
2021-12-13 21:49:50 +00:00
|
|
|
"github.com/ceph/go-ceph/common/admin/manager"
|
2021-07-08 14:14:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const mirroring = "mirroring"
|
|
|
|
|
|
|
|
// EnableMirroringModule will enable the mirroring module for cephfs.
|
|
|
|
//
|
|
|
|
// Similar To:
|
2023-02-09 17:23:11 +00:00
|
|
|
//
|
|
|
|
// ceph mgr module enable mirroring [--force]
|
2021-07-08 14:14:27 +00:00
|
|
|
func (fsa *FSAdmin) EnableMirroringModule(force bool) error {
|
2021-12-13 21:49:50 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.EnableModule(mirroring, force)
|
2021-07-08 14:14:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DisableMirroringModule will disable the mirroring module for cephfs.
|
|
|
|
//
|
|
|
|
// Similar To:
|
2023-02-09 17:23:11 +00:00
|
|
|
//
|
|
|
|
// ceph mgr module disable mirroring
|
2021-07-08 14:14:27 +00:00
|
|
|
func (fsa *FSAdmin) DisableMirroringModule() error {
|
2021-12-13 21:49:50 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.DisableModule(mirroring)
|
2021-11-15 15:22:38 +00:00
|
|
|
}
|