Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在容器中往/rootfs/etc写文件,报:Read-only file system #50

Open
silenceper opened this issue Feb 28, 2022 · 4 comments
Open

Comments

@silenceper
Copy link

if !util.InHostNamespace {
projectsPath = path.Join(types.RootFS, projectsPath)
projidPath = path.Join(types.RootFS, projidPath)
}

看已经直接挂载/etc/进入容器中,这里是否可以不需要了?

@ddongchen
Copy link
Collaborator

@silenceper 目前看确实是可以的。但/etc挂载是因为cadvisor在容器里运行需要,不是为diskquota单独配置的。

@silenceper
Copy link
Author

@ddongchen 我这边设置diskquota,看log写入/rootfs/etc/ 的一个temp文件遇到Read-only file system导致无法写入/rootfs/etc/projects的错误,确认下是否有这个问题?

@ddongchen
Copy link
Collaborator

@silenceper 确实有这个问题,因/rootfs挂载为readonly模式。像您说的,因/etc已挂载,可直接操作/etc/projects即可。

@silenceper
Copy link
Author

还有个问题,这两个文件 "/etc/projects", "/etc/projid"的内容完全由caelus来写入,而不是追加的形式,看到只在实例化的时候执行了一次DumpProjectIds,后续非caelus进程写入的信息,内容是不是会丢失?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants