안녕하세요.
웹서비스 용도로 2대 리플케이션으로 gluster 구축하여 사용중입니다.
액세스가 많을때 파일 편집 작업을하고 저장하면 저장이 안되고 0바이트로 될때가 있고 그런 현상이 있을때 스토리지2에 가면 파일이 정상적으로 있습니다. 때때로 파일이 사라졌다 다시 예전 파일로 복원이 되고 하는데 해결 방법이 있는지 궁금합니다.
gluster 7.9 버전 사용중입니다.
아래 구성 정보와 설정된 옵션입니다.
Volume Name: dist_vol
Type: Replicate
Volume ID: 32c666ab-9350-49c9-8682-364455e6498f
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: storage1:/gludisk1
Brick2: storage2:/gludisk1
Options Reconfigured:
performance.strict-write-ordering: on
performance.cache-max-file-size: 2MB
features.cache-invalidation-timeout: 600
performance.qr-cache-timeout: 600
features.cache-invalidation: on
performance.cache-invalidation: on
performance.nl-cache-positive-entry: on
performance.nl-cache: on
network.inode-lru-limit: 100000
ctime.noatime: on
performance.readdir-ahead: on
performance.nfs.io-threads: on
performance.nfs.stat-prefetch: on
performance.nfs.quick-read: on
performance.nfs.io-cache: on
performance.nfs.read-ahead: on
nfs.outstanding-rpc-limit: 64
performance.cache-size: 10240MB
performance.io-thread-count: 64
transport.address-family: inet
storage.fips-mode-rchecksum: on
nfs.disable: on
performance.client-io-threads: on
gluster는 config 꼬이면 복구하기가 힘들어서 조심스럽긴합니다.
가능하시면 테스트머신을 따로 구성해서 상황을 재현을 하신후에
설정 튜닝값을 확보 하시는게 좋을듯 합니다.
대기시간 따른거면 어딘가에서 최종 집에 안가고 중간 캐싱하고 놀고 있거나, 일관성을 저해하는 요인이 있을것 같습니다.
fuse native 로 마운트 하신거면 test로 direct로 no cache로 해보시거나, 이럴경우 속도가 크게 저하될수도 있을것 같습니다.
아니면 nfs로 바꾸어서 해보시는게 좋을것도 같습니다. <= 권장
방법1) 대기 시간 지연 없애기 (native fuse mount시)
0 . mount direct-io-mode=enable
1. direct-io-mode=enable
2. enable performance.strict-o-direct
3. disable network.remote-dio
방법2) native말고 NFS 활성화해서 쓰는 방법