Minikube挂载失败,输入/输出错误

时间:2017-08-11 13:39:44

标签: kubernetes minikube

有点在锡上说的话。我尝试minikube mount /some/dir:/home/docker/other_dir &,它失败并出现以下错误:

Mounting /some/dir into /home/docker/other_dir on the minikube VM
This daemon process needs to stay alive for the mount to still be accessible...
ufs starting
ssh command error:
command : 
sudo mkdir -p /home/docker/other_dir || true;
sudo mount -t 9p -o trans=tcp,port=38902,dfltuid=1001,dfltgid=1001,version=9p2000.u,msize=262144 192.168.99.1 /home/docker/other_dir;
sudo chmod 775 /home/docker/other_dir;
err     : exit status 1
output  : chmod: changing permissions of '/home/docker/other_dir': Input/output error

然后,当我在minikube ssh内执行ls -l/home/docker时,我明白了:

$ ls -l
ls: cannot access 'other_dir': Input/output error
total 0
d????????? ? ?   ?   ?            ? other_dir

更新

经过一些实验,当/some/dir的用户不是当前用户时,看起来问题出现了。为什么会出现这种情况尚不清楚。

2 个答案:

答案 0 :(得分:0)

你在运行哪个版本的迷你管?它在minikube版v0.20.0上为我工作。

minikube mount /tmp/moun/:/home/docker/pk Mounting /tmp/moun/ into /home/docker/pk on the minikube VM This daemon process needs to stay alive for the mount to still be accessible... ufs starting 它工作正常,我也可以创建文件,

$ touch /tmp/moun/cool

我们可以查看文件,

$ minikube ssh $ ls /home/docker/pk cool

答案 1 :(得分:0)

https://github.com/kubernetes/minikube/issues/1822 如果要挂载该用户拥有的文件夹,则需要以该用户身份运行minikube mount命令。