Open fu7100 opened 4 months ago
// pvc绑定成功 [root@ide-k8s-single ~]# kubectl get pvc -n test-minio NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE minio-s3fs-pvc Bound pvc-893855bc-f19c-4e93-84d9-8d8a727c29c2 1Gi RWO minio-s3fs-sc 12m [root@ide-k8s-single ~]#
//进入容器查看挂载,大小不对,我的pv只有1GB,这里显示16E [root@ide-k8s-single ~]# kubectl exec -it test-minio-58c5776877-splfh sh -n test-minio kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. / # / # df -h Filesystem Size Used Available Use% Mounted on overlay 91.1G 30.8G 60.3G 34% / tmpfs 64.0M 0 64.0M 0% /dev tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup s3fs 16.0E 0 16.0E 0% /app /dev/mapper/centos-root 91.1G 30.8G 60.3G 34% /etc/hosts /dev/mapper/centos-root 91.1G 30.8G 60.3G 34% /dev/termination-log /dev/mapper/centos-root 91.1G 30.8G 60.3G 34% /etc/hostname
//进入 /app后创建文件,创建文件没报错,但是ls看不到,创建目录都会提示File exists / # cd /app /app # ls /app # mkdir abc mkdir: can't create directory 'abc': File exists /app # touch abc /app # ls /app # /app # mkdir 123 mkdir: can't create directory '123': File exists /app # mkdir 1212121 mkdir: can't create directory '1212121': File exists /app # mkdir test111 mkdir: can't create directory 'test111': File exists
OK ,我今天下班看下这个问题!
你好,这个问题我解决了,是连接minio的端口问题,不是web ui的端口是api的端口9000,但是您的容器没有相关错误日志,我尝试了很久才找到。
现在有一个更重要的问题麻烦看下,就是使用s3fs挂载到容器,如果容器是以普通用户启动则,则无法创建挂载目录提示没权限。
OK 我查看下
// pvc绑定成功 [root@ide-k8s-single ~]# kubectl get pvc -n test-minio NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE minio-s3fs-pvc Bound pvc-893855bc-f19c-4e93-84d9-8d8a727c29c2 1Gi RWO minio-s3fs-sc 12m [root@ide-k8s-single ~]#
//进入容器查看挂载,大小不对,我的pv只有1GB,这里显示16E [root@ide-k8s-single ~]# kubectl exec -it test-minio-58c5776877-splfh sh -n test-minio kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. / # / # df -h Filesystem Size Used Available Use% Mounted on overlay 91.1G 30.8G 60.3G 34% / tmpfs 64.0M 0 64.0M 0% /dev tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup s3fs 16.0E 0 16.0E 0% /app /dev/mapper/centos-root 91.1G 30.8G 60.3G 34% /etc/hosts /dev/mapper/centos-root 91.1G 30.8G 60.3G 34% /dev/termination-log /dev/mapper/centos-root 91.1G 30.8G 60.3G 34% /etc/hostname
//进入 /app后创建文件,创建文件没报错,但是ls看不到,创建目录都会提示File exists / # cd /app /app # ls /app # mkdir abc mkdir: can't create directory 'abc': File exists /app # touch abc /app # ls /app # /app # mkdir 123 mkdir: can't create directory '123': File exists /app # mkdir 1212121 mkdir: can't create directory '1212121': File exists /app # mkdir test111 mkdir: can't create directory 'test111': File exists