有点在锡上说的话。我尝试做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
有一个非当前用户的用户时,看起来问题就出现了。为什么会出现这种情况尚不清楚。
您正在运行哪个版本的迷你管?它在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
https://github.com/kubernetes/minikube/issues/1822如果要挂载该用户拥有的文件夹,则需要以该用户身份运行minikube mount命令。