Revert "Revert "fix(server): only set NOCOW for log file""
This reverts commit 9540575690
.
Conflicts:
etcd/etcd.go
This commit is contained in:
@ -103,11 +103,6 @@ func (e *Etcd) Run() {
|
|||||||
log.Warnf("All cached configuration is now ignored. The file %s can be removed.", info)
|
log.Warnf("All cached configuration is now ignored. The file %s can be removed.", info)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set NOCOW for data directory in btrfs
|
|
||||||
if btrfs.IsBtrfs(e.Config.DataDir) {
|
|
||||||
btrfs.SetNOCOWDir(e.Config.DataDir)
|
|
||||||
}
|
|
||||||
|
|
||||||
var mbName string
|
var mbName string
|
||||||
if e.Config.Trace() {
|
if e.Config.Trace() {
|
||||||
mbName = e.Config.MetricsBucketName()
|
mbName = e.Config.MetricsBucketName()
|
||||||
|
@ -19,6 +19,7 @@ import (
|
|||||||
etcdErr "github.com/coreos/etcd/error"
|
etcdErr "github.com/coreos/etcd/error"
|
||||||
"github.com/coreos/etcd/log"
|
"github.com/coreos/etcd/log"
|
||||||
"github.com/coreos/etcd/metrics"
|
"github.com/coreos/etcd/metrics"
|
||||||
|
"github.com/coreos/etcd/pkg/btrfs"
|
||||||
"github.com/coreos/etcd/store"
|
"github.com/coreos/etcd/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -291,6 +292,11 @@ func (s *PeerServer) Start(snapshot bool, discoverURL string, peers []string) er
|
|||||||
|
|
||||||
s.raftServer.Init()
|
s.raftServer.Init()
|
||||||
|
|
||||||
|
// Set NOCOW for data directory in btrfs
|
||||||
|
if btrfs.IsBtrfs(s.raftServer.LogPath()) {
|
||||||
|
btrfs.SetNOCOW(s.raftServer.LogPath())
|
||||||
|
}
|
||||||
|
|
||||||
s.findCluster(discoverURL, peers)
|
s.findCluster(discoverURL, peers)
|
||||||
|
|
||||||
s.closeChan = make(chan bool)
|
s.closeChan = make(chan bool)
|
||||||
|
Reference in New Issue
Block a user