내 c5 EC2 인스턴스에서 nvme_core.io_timeout을 늘리는 방법

내 c5 EC2 인스턴스에서 nvme_core.io_timeout을 늘리는 방법

mesos 클러스터가 있고 aws에서 centos7 인스턴스를 실행하고 있습니다 c5. 커널 버전은 최신입니다 4.16.1-1.

c5인스턴스 유형 에서 볼륨이 nvme drivers.nvme 볼륨을 사용하는 경우 위와 같은 동작이 나타나는 것 같습니다.여기어디if there is an io timeout on a volume, the volume mount becomes read only and no further writes can happen. So if there is heavy read-write operations on your device like on root drive then after the io timeout no further writes can happen so its dangerous.

AWS에서는문서io 시간 제한을 최대한 높게 설정한다고 언급되어 있는데, 그런 것 같습니다 4294967295 sec.

AWS 설명서에서는 를 지정 default io timeout하지만 30sec이는 최대값이므로 255 sec우리가 알고 있듯이 최대값으로 설정해야 합니다.kernel prior to 4.15 version4294967295 sec for kernel 4.15+.latest 4.16.1 kernel4294967295 sec

그런데 매개변수를 최대값으로 설정하려고 하면 nvme_core.io_timeout반영이 되지 않습니다. 나는 이것을 시도했다

sh-4.2# modprobe nvme_core io_timeout=123457
sh-4.2# cat /sys/module/nvme_core/parameters/io_timeout
30
sh-4.2#

이것을 설정하는 올바른 방법은 무엇입니까 nvme_core.io_timeout?

  1. /etc/default/grub파일 에 설정해 보세요
  2. 시스템 명령
  3. /sys/module/nvme_core/parameters/io_timeout파일 덮어쓰기

하지만 아무것도 도움이 되지 않습니다.

답변1

내 실험에 따르면 AMI를 구축할 때 이 작업을 수행합니다.

cp /etc/default/grub /tmp/grub cat >>/tmp/grub <<'EOF' GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} nvme_core.io_timeout=255" EOF sudo mv /tmp/grub /etc/default/grub sudo update-grub

그런 다음 인스턴스에서 AMI를 생성합니다. AMI에서 새 EC2 인스턴스를 시작하면 올바른 설정이 제공됩니다.

분명히 이것은 커널 매개변수를 설정하기 위해 수정될 수 있습니다.

관련 정보