Comments (7)
it seems the nfs csi driver does not have permission to mkdir /var/snap
from csi-driver-nfs.
I have pretty same setup and facing the same problem
- MicroK8s v1.27.5 revision 5891
- TrueNAS-13.0-U5.3
- CSI Driver version: helm.sh/chart: csi-driver-nfs-v4.4.0
Error message for the pod being created
MountVolume.SetUp failed for volume "pvc-dd295906-c30a-489a-b129-2779783d6a26" : rpc error: code = Internal desc = mkdir /var/snap: read-only file system
Can confirm that other NFS-based persistence implementations, like https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/ do not suffer from this problem, i am able to create PVC+PV with this solution and it mounted on the node under
/var/snap/microk8s/common/var/lib/kubelet/pods/1f78a43a-6fef-4353-b51b-3aeb66e999c8/volumes/kubernetes.io~nfs/pvc-3901c382-754c-427d-b972-c415c6f98afc
from csi-driver-nfs.
it seems the nfs csi driver does not have permission to
mkdir /var/snap
Yeah, though that's the error quoted from the digging that I've done that error doesn't make any sense. The pod isn't mounting any internal volumes under /var/snap, so it should/will have permission to that path (if it even exists within the pod). That would mean it's the driver itself trying to mkdir /var/snap
on the host machine, but that probably shouldn't happen either. I can confirm that the nfs csi driver is able to make directories on the attached storage, as it makes the root directory following the naming scheme described in the storage class.
if the nfs csi driver is attempting to make any directories under /var/snap and not under directories that belong to microk8s itself or something similar, there'll be obvious permission problems because Snap locks down the filesystem to prevent abuse. I did try opening up the permissions in /var/snap just to see if that changed anything, but it caused my entire cluster to fail.
from csi-driver-nfs.
I was able to install version 4.2.0 and I am now able to mount PVCs to my NAS. I have found file permission issues that seem to appear to stem from the csi-driver-nfs itself, as I can use the same mount command via CLI and have no issues. So the original issue reported appears to be with newer versions of the csi driver
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
csi-driver-nfs kube-system 5 2023-10-23 04:41:03.869148025 +0000 UTC deployed csi-driver-nfs-v4.2.0 v4.2.0
from csi-driver-nfs.
I also have the same error...
- microk8s 1.24.17
- csi-provisioner:v3.5.0
- livenessprobe:v2.10.0
- snapshot-controller:v6.2.2
My error is...
MountVolume.SetUp failed for volume "pvc-68e70909-9c25-44bc-933a-c1ddffcf02d9" : rpc error: code = Internal desc = mkdir /var/snap: read-only file system
from csi-driver-nfs.
I was able to fix the immediate error mkdir /var/snap: read-only file system
by downgrading to v4.2.0, however I still had issues actually writing not to the NFS but to the intermediate file at /tmp/pvc-*
. This was because the official documentation suggests to use the flag --set linux.kubelet="/var/snap/microk8s/common/var/lib/kubelet"
, however per the microk8s docs we should actually use --set kubeletDir=/var/snap/microk8s/common/var/lib/kubelet
, exluding the linux.
prefix. This fixed all issues for me, and it may fix the mkdir /var/snap: read-only file system
error in later versions.
from csi-driver-nfs.
--set kubeletDir
is the right setting, I have worked out a doc PR to fix this issue: #537
from csi-driver-nfs.
Related Issues (20)
- Enhance NFS Mount Efficiency with Stage/Unstage Volume Capability HOT 6
- [BUG][GKE] Upgrade to 4.5.0 fails if cluster role snapshot-controller-runner already exist in cluster HOT 6
- Time helm-chart release after image release HOT 5
- VolumeFailedDelete, when i deleted pvc but pv wasn't deleted HOT 9
- dynamic provisioning of existing data HOT 2
- Race condition: terminating pod destroys PV mount on new pod HOT 6
- Pod usage error after pvc mounting HOT 2
- Unable to mount nfs without "nolock" option HOT 2
- Link to MicroK8S Documentation in Readme leads to 404-page
- Please publish Helm Chart to OCI HOT 3
- helm chart volumesnapshot rbac problem HOT 1
- configMap can't mounted as file on the NFS PVC HOT 2
- [Feature Request] Share a PV across namespaces HOT 6
- Warning VolumeResizeFailed pod/pueel-sxx-0 NodeExpandVolume.NodeExpandVolume failed for volume "logging-nfs-pv" : Expander.NodeExpand found CSI plugin kubernetes.io/csi/nfs.csi.k8s.io to not support node expansion HOT 3
- csi-driver-nfs stops working for new PVC on randomly affected nodes. HOT 9
- Documentation for fsGroupPolicy is outdated HOT 1
- Single-node (WIP) cluster can't schedule controller HOT 3
- Failed to pull image "registry.k8s.io/sig-storage/nfsplugin:v4.7.0": rpc error: code = NotFound HOT 2
- wrong chart intent when using multiple mountOptions
- Remount when connection lost HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csi-driver-nfs.