跳转到主内容

启动 Grafana docker 容器时出现权限被拒绝错误

Views:
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用于

  • ONTAP 9
  • NFS
  • Docker 容器

问题描述

  • 在尝试在 Linux 客户端上装载 UNIX 卷并启动容器后,它会报告 permission denied。 
root@host1:/home/rdapiqw/shared_source/apisix_sr_20250722# docker logs -f apisix_grafana
GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
GF_PATHS_DATA='/var/lib/grafana' is not writable.

 
  • Docker Compose 配置

grafana:

  image: grafana/grafana:${GRAFANA_VERSION}
  container_name: apisix_grafana
  ports:
   - "3000:3000"
  environment:
   - GF_SECURITY_ADMIN_USER=${GRAFANA_USER}
   - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
  volumes:
   - /home/rdapiqw/shared source/grafana-storage:/var/lib/grafana:rw
   - ./grafana/provisioning:/etc/grafana/provisioning
  depends_on:
   - prometheus
   - loki
  restart: unless-stopped

  • 卷的导出策略规则设置没有问题。 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.