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

RapidDisk-Cache does not support 4K Logical Drives #59

Open
pkoutoupis opened this issue Jun 11, 2021 · 4 comments
Open

RapidDisk-Cache does not support 4K Logical Drives #59

pkoutoupis opened this issue Jun 11, 2021 · 4 comments
Assignees
Labels

Comments

@pkoutoupis
Copy link
Owner

Format of 4K volume:

petros@dev-machine:~$ sudo mke2fs -F /dev/mapper/rc-wt_sdd
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 1709047808 4k blocks and 213630976 inodes
Filesystem UUID: 951d4a1a-b0f1-4d68-b853-f14932806bbb
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

petros@dev-machine:~$ sudo mount /dev/mapper/rc-wt_sdd /mnt/sdd
[sudo] password for petros:
mount: /mnt/sdd: wrong fs type, bad option, bad superblock on /dev/mapper/rc-wt_sdd, missing codepage or helper program, or other error.

/var/log/kern.log

Jun 11 14:38:32 dev-machine kernel: [ 6790.312491] sd 0:0:1:0: [sdd] tag#1577 request not aligned to the logical block size
Jun 11 14:38:32 dev-machine kernel: [ 6790.312549] blk_update_request: I/O error, dev sdd, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Jun 11 14:38:32 dev-machine kernel: [ 6790.313305] EXT4-fs (dm-0): unable to read superblock

Physical/logical block sizes:

petros@dev-machine:/sys/block/sdd/queue$ cat *block_size
4096
4096
@juanpc2018
Copy link

juanpc2018 commented May 29, 2022

i think the problem is mke2fs
try mkfs -t ext4
https://linux.die.net/man/8/mkfs
or
mkfs.xfs
https://linux.die.net/man/8/mkfs.xfs

@pkoutoupis
Copy link
Owner Author

@juanpc2018 Thank you. However, this is before the file system comes into the picture. The issues stems from the block device's logical block size and the fact that RapidDisk-Cache has issues with a 4K block size.

@alexandru-bagu
Copy link

Any new information on this?

I am trying to use ramdisk-cache on top of an ext4 fs but for some reason I don't get any cache read hits when issuing find commands. I am wondering whether it's got to do with the 4k block size of the underlying system. The operations I am trying to do are to do with file deletions and it simply skips the cache.

It may very well be something else though because when doing fio tests with 8k reads the cache is hit very well.

@pkoutoupis
Copy link
Owner Author

The minimum cache size is 4K, so if you are trying to read something smaller, it won't cache it. Also, in order for a cache read hit to occur, the data must already be staged in the cache. Also, I am not sure how unlinks are handled by the ext4 file system at the moment and whether it too introduces its own fair share of variables impacting cache reads.

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

No branches or pull requests

3 participants