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

Is this normal to enable fscache? #1664

Open
yulinor opened this issue Feb 7, 2025 · 7 comments
Open

Is this normal to enable fscache? #1664

yulinor opened this issue Feb 7, 2025 · 7 comments

Comments

@yulinor
Copy link

yulinor commented Feb 7, 2025

OS debian 12.9
Kernel 6.11.10+bpo-amd64

Follow https://github.com/dragonflyoss/nydus/blob/master/docs/nydus-fscache.md

$ apt install cachefilesd
$ systemctl start cachefilesd
$ [ -c /dev/cachefiles ] && echo ok
$ lsof /dev/cachefiles
lsof: status error on /dev/cachefiles: No such file or directory

$  journalctl -f -u cachefilesd
Feb 07 16:54:36 yulinor systemd[1]: Starting cachefilesd.service - LSB: CacheFiles daemon...
Feb 07 16:54:36 yulinor cachefilesd[594]: cachefilesd disabled, please set RUN=yes in /etc/default/cachefilesd ... failed!
Feb 07 16:54:36 yulinor systemd[1]: Started cachefilesd.service - LSB: CacheFiles daemon.

# modify config,Remove comment symbols
$ vim  /etc/default/cachefilesd
# old 
# RUN=yes
# new
RUN=yes

$ systemctl restart cachefilesd
$ lsof /dev/cachefiles
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
cachefile 1995 root    3u   CHR 10,123      0t0  538 /dev/cachefiles
$ [ -c /dev/cachefiles ] && echo ok
ok

so,Is this normal to enable fscache?

There is a sentence in the article: Ensure the device file /dev/cachefiles is not occupied. If your result is not empty, please kill all processes the result shows.

Does this mean I still need to kill the cachefile process?
Or is there another problem with this?

@hsiangkao
Copy link
Contributor

the cachefile process needs to be killed, since it's incompatible with erofs+fscache feature.

@yulinor
Copy link
Author

yulinor commented Feb 7, 2025

the cachefile process needs to be killed, since it's incompatible with erofs+fscache feature.

按照配置文档和nydus文档,我理解的是已经合并入5.19内核了,所以默认就Linux启动相关模块就能支持到这个erofs over fscache模式。
我刚才注释了RUN=yes重启服务器,确认回到了lsof提示No such file or directory后执行了如下步骤

root@yulinor:~# cat /proc/modules | grep cachefiles
root@yulinor:~# modprobe cachefiles
root@yulinor:~# cat /proc/modules | grep cachefiles
cachefiles 172032 0 - Live 0xffffffffc0bcd000
netfs 552960 1 cachefiles, Live 0xffffffffc0b26000
root@yulinor:~# [ -c /dev/cachefiles ] && echo ok
ok
root@yulinor:~# cat /boot/config-6.11.10+bpo-amd64 |grep -i CONFIG_EROFS_FS^C
root@yulinor:~# lsof /dev/cachefiles
root@yulinor:~#

这样的步骤倒是可以与文档保持一致。
所以文档是不是还要更新说明下启动模块?anolisos8.9(kernel config-5.10.134-13)没有验证模块命令,不过我看了下[ -c /dev/cachefiles ] && echo ok没有输出,且lsof也是No such file or directory

@hsiangkao
Copy link
Contributor

hsiangkao commented Feb 7, 2025

apt install cachefilesd is NOT needed, erofs fscache doesn't use cachefilesd itself.

anolis kernel 5.10.134-13 is too old kernel, you should use a newer kernel instead.

@yulinor
Copy link
Author

yulinor commented Feb 7, 2025

apt install cachefilesd is NOT needed, erofs fscache doesn't use cachefilesd itself.

anolis kernel 5.10.134-13 is too old kernel, you should use a newer kernel instead.

如果不需要 cachefilesd ,那这文档是否有点过时了?

@hsiangkao
Copy link
Contributor

apt install cachefilesd is NOT needed, erofs fscache doesn't use cachefilesd itself.
anolis kernel 5.10.134-13 is too old kernel, you should use a newer kernel instead.

如果不需要 cachefilesd ,那这文档是否有点过时了?

There is a bad commit cdc41de

@yulinor
Copy link
Author

yulinor commented Feb 8, 2025

apt install cachefilesd is NOT needed, erofs fscache doesn't use cachefilesd itself.
anolis kernel 5.10.134-13 is too old kernel, you should use a newer kernel instead.

如果不需要 cachefilesd ,那这文档是否有点过时了?

There is a bad commit cdc41de

期待更新一份正确的、完整验证步骤的配置文档。

@hsiangkao
Copy link
Contributor

你可以适用后提个PR更新下手册。

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