이제 곧 여름이 다가오면서 나스의 하드 온도에 대해 신경쓰이기 시작합니다. 도커 컨테이너 중에 Scrutiny는 마운트된 하드,nvme의 기본적인 정보, 온도, 온도 그래프를 보여주면서 혹시나 나스의 사용환경이 너무 가혹하지는 않는지(?) 체크할 수 있도록 해줍니다.
## 설치 과정은 docker-compose 실행으로 끝나지 않고 도커쉘에 접속하여 드라이브들을 마운트해주는 작업을 한번 거치게 됩니다. (2번 과정 중요!)
## 현재 정식이미지는 버그가 있어 임시 수정본 이미지를 사용해야 합니다. (lscr.io/linuxserver/scrutiny:8e34ef8d-ls35)
## 레이드된 하드는 아마도 기본정보/온도 표시가 안될겁니다.
## 웹접속시 별도의 인증이 없기 때문에 내부용으로만 사용해주세요. (저는 authelia와 결합하여 인증을 사용중입니다)
1) docker-compose
---
version: "2.1"
services:
scrutiny:
image: lscr.io/linuxserver/scrutiny:8e34ef8d-ls35 ## lscr.io/linuxserver/scrutiny:latest이미지는 현재 bug가 있음.
container_name: scrutiny
cap_add:
- SYS_RAWIO
- SYS_ADMIN #optional
environment:
- PUID=1000 ## 계정에 맞게 변경
- PGID=1000 ## 계정에 맞게 변경
- TZ=Asia/Seoul
- SCRUTINY_API_ENDPOINT=http://localhost:8080
- SCRUTINY_WEB=true
- SCRUTINY_COLLECTOR=true
volumes:
- /path/to/config:/config ## 설정폴더 지정
- /run/udev:/run/udev:ro
ports:
- 8080:8080 ## 필요에 따라 포트 수정
devices:
- /dev/sda:/dev/sda ## 마운트 드라이브#1 설정
- /dev/sdb:/dev/sdb ## 마운트 드라이브#2 설정
- /dev/nvme1n1:/dev/nvme1n1 ## m.2 설정
restart: unless-stopped
2) 도커 쉘 접속, 마운트
docker exec -it scrutiny /bin/bash
scrutiny-collector-metrics run
exit
ds920 기준으로 장치 접근은
devices:
- /dev/sata1:/dev/sda
- /dev/sata2:/dev/sdb
- /dev/sata3:/dev/sdc
- /dev/sata4:/dev/sdd
- /dev/nvme0:/dev/nvme0
- /dev/nvme1:/dev/nvme1
요래 해주면 되네요.
근데 nvme의 smart 해석(?)은 버그가 좀 있는거 같네요.
smartctl관련 값을 못 읽는 다는 메시지가 지나가더군요
2022/05/26 11:20:21 Loading configuration file: /scrutiny/config/collector.yaml
INFO[0000] Verifying required tools type=metrics
INFO[0000] Executing command: smartctl --scan -j type=metrics
INFO[0000] Executing command: smartctl --info -j /dev/sda type=metrics
INFO[0000] Using WWN Fallbacktype=metrics
INFO[0000] Executing command: smartctl --info -j /dev/sdb type=metrics
INFO[0000] Using WWN Fallbacktype=metrics
INFO[0000] Executing command: smartctl --info -j /dev/sdc type=metrics
INFO[0000] Using WWN Fallbacktype=metrics
INFO[0000] Sending detected devices to API, for filtering & validation type=metrics
INFO[0000] Collecting smartctl results for sda type=metrics
INFO[0000] Executing command: smartctl -x -j /dev/sdatype=metrics
ERRO[0000] smartctl returned an error code (4) while processing sda type=metrics
ERRO[0000] smartctl detected a checksum errortype=metrics
INFO[0000] Publishing smartctl results for 19453k449513 type=metrics
INFO[0001] Collecting smartctl results for sdb type=metrics
INFO[0001] Executing command: smartctl -x -j /dev/sdbtype=metrics
ERRO[0001] smartctl returned an error code (4) while processing sdb type=metrics
ERRO[0001] smartctl detected a checksum errortype=metrics
INFO[0001] Publishing smartctl results for 7hjz1xef type=metrics
INFO[0002] Collecting smartctl results for sdc type=metrics
INFO[0002] Executing command: smartctl -x -j /dev/sdctype=metrics
ERRO[0002] smartctl returned an error code (4) while processing sdc type=metrics
ERRO[0002] smartctl detected a checksum errortype=metrics
INFO[0002] Publishing smartctl results for 7hkyvaaj type=metrics
예) - /dev/sdc:/dev/sdc
근데 devices값은 도커 어디에 들어가있는거에요?
CLI로 생성한거라 작동은 잘 하는데....
시놀로지 도커 앱에서는 해당 값이 어디있는지 볼수가 없네요
smartctl 자체에서 못 읽어오네요... synodisk에선 불러오는데 뭔 문제인지 모르겠어요 ㅎㅎ
뭐 어찌어찌 옵션주면 smartctl도 값을 읽어오긴 하는데 scrutiny가 지원하는 방식이 아닌가봅니다