2021-08-12 10:02:52 +00:00
|
|
|
package admin
|
|
|
|
|
|
|
|
import (
|
2022-02-21 20:13:09 +00:00
|
|
|
"github.com/ceph/go-ceph/common/admin/manager"
|
2021-08-12 10:02:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const mirroring = "mirroring"
|
|
|
|
|
|
|
|
// EnableMirroringModule will enable the mirroring module for cephfs.
|
|
|
|
//
|
|
|
|
// Similar To:
|
2023-04-26 07:05:57 +00:00
|
|
|
//
|
|
|
|
// ceph mgr module enable mirroring [--force]
|
2021-08-12 10:02:52 +00:00
|
|
|
func (fsa *FSAdmin) EnableMirroringModule(force bool) error {
|
2022-02-21 20:13:09 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.EnableModule(mirroring, force)
|
2021-08-12 10:02:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DisableMirroringModule will disable the mirroring module for cephfs.
|
|
|
|
//
|
|
|
|
// Similar To:
|
2023-04-26 07:05:57 +00:00
|
|
|
//
|
|
|
|
// ceph mgr module disable mirroring
|
2021-08-12 10:02:52 +00:00
|
|
|
func (fsa *FSAdmin) DisableMirroringModule() error {
|
2022-02-21 20:13:09 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.DisableModule(mirroring)
|
2021-12-15 05:26:34 +00:00
|
|
|
}
|