nydus-snapshotter icon indicating copy to clipboard operation
nydus-snapshotter copied to clipboard

Unable to mount erofs in fscache driver mode

Open PKizzle opened this issue 2 months ago • 6 comments

Is there a way to get nydus to work in fscache mode when receiving this error message? I guess fscache only supports a blksize of 4K? Is the only way to get it to work to use fusedev mode?

erofs: unsupported blksize for fscache mode
$ blockdev --getbsz /dev/nvme0n1
8192
$ nydusd --version
Version:        v2.3.8
Git Commit:     b24fbd156c85a45795843747b72cb543629ed54e
Build Time:     2025-10-21T02:17:18.145349377Z
Profile:        release
Rustc:          rustc 1.84.0 (9fc6b4312 2025-01-07)

$ containerd-nydus-grpc --version
Version:     v0.15.4
Revision:    7317cffb615fb1409cf5e2ea06e83590d1113df0
Go version:  go1.24.0
Build time:  2025-09-16T02:37:48

Kernel version 6.17.0-v8-16k

PKizzle avatar Oct 29 '25 12:10 PKizzle

/dev/nvme0n1 is an erofs filesystem? what's the exact page size (it seems 16k page kernels)?

hsiangkao avatar Oct 30 '25 01:10 hsiangkao

Ah I thought that the block size of the underlying file system was the issue. Is the 16k page size the issue?

PKizzle avatar Oct 31 '25 09:10 PKizzle

Ah I thought that the block size of the underlying file system was the issue. Is the 16k page size the issue?

yes, nydus hardcode block size 4k and fscache implies blocksize == PAGESIZE

hsiangkao avatar Oct 31 '25 09:10 hsiangkao

Is there a way to automatically detect this instead? Is this at all related to https://github.com/google/tcmalloc/issues/82 ?

PKizzle avatar Oct 31 '25 10:10 PKizzle

Is there a way to automatically detect this instead? Is this at all related to google/tcmalloc#82 ?

getconf PAGESIZE

hsiangkao avatar Oct 31 '25 11:10 hsiangkao

This is the result:

$ getconf PAGESIZE
16384

So can the source code be altered to use the result of getconf PAGESIZE instead of hardcoding it to 4k?

PKizzle avatar Oct 31 '25 15:10 PKizzle