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

cas_disk.ko missing? #1414

Open
manwe opened this issue Nov 29, 2022 · 5 comments
Open

cas_disk.ko missing? #1414

manwe opened this issue Nov 29, 2022 · 5 comments

Comments

@manwe
Copy link

manwe commented Nov 29, 2022

Question

Hi. I compiled source and also tried creating packages but I cannot start opencas service.

I see that cas_cache exists but cas_disk is not present in the kernel modules. Nor I can see it compiled or can find it in the modules folder of the source code.

What am I missing? Why I can find cas_cache but not cas_disk?

  • master
  • Operating System: Debian 11 + backports
  • Kernel version: 5.19
@manwe manwe added the question Further information is requested label Nov 29, 2022
@manwe
Copy link
Author

manwe commented Nov 29, 2022

Tied to initialize a new disk as cache using casadm and everything went to hell. My server started to kill processes such as ssh server and dbus!

root@NAS:/usr/src/open-cas-linux# casadm -S -d /dev/disk/by-id/nvme-WD_Red_SN700_2000GB_22026C801363
Starting cache... [|]

Successfully added cache instance 1


Nov 30 00:21:07 NAS kernel: [377410.983193] BUG: using smp_processor_id() in preemptible [00000000] code: cas_cl_cache1/378543
Nov 30 00:21:07 NAS kernel: [377410.983235] caller is _cas_cleaner_thread+0xf5/0x200 [cas_cache]
Nov 30 00:21:07 NAS kernel: [377410.983269] CPU: 0 PID: 378543 Comm: cas_cl_cache1 Tainted: P W OE 5.19.0-0.deb11.2-amd64 #1 Debian 5.19.11-1~bpo11+1
Nov 30 00:21:07 NAS kernel: [377410.983275] Hardware name: To Be Filled By O.E.M. X570 Phantom Gaming 4/X570 Phantom Gaming 4, BIOS P4.30 02/23/2022
Nov 30 00:21:07 NAS kernel: [377410.983278] Call Trace:
Nov 30 00:21:07 NAS kernel: [377410.983281]
Nov 30 00:21:07 NAS kernel: [377410.983284] dump_stack_lvl+0x45/0x5e
Nov 30 00:21:07 NAS kernel: [377410.983292] check_preemption_disabled+0xe1/0xf0
Nov 30 00:21:07 NAS kernel: [377410.983299] _cas_cleaner_thread+0xf5/0x200 [cas_cache]
Nov 30 00:21:07 NAS kernel: [377410.983318] ? dequeue_task_stop+0x70/0x70
Nov 30 00:21:07 NAS kernel: [377410.983324] ? _cas_cleaner_complete+0x20/0x20 [cas_cache]
Nov 30 00:21:07 NAS kernel: [377410.983341] kthread+0xe7/0x110
Nov 30 00:21:07 NAS kernel: [377410.983346] ? kthread_complete_and_exit+0x20/0x20
Nov 30 00:21:07 NAS kernel: [377410.983349] ret_from_fork+0x22/0x30
Nov 30 00:21:07 NAS kernel: [377410.983356]

@kmajzero
Copy link
Contributor

kmajzero commented Nov 30, 2022

Hi,
Thank you for posting your questions.

The cas_disk module was removed as a part of a larger code cleanup and it is not used any more. It seems the package description was not updated in the process.

The other problem you reported is that it seems you are running preemptive kernel. OpenCAS does not support preemptive kernel. You are welcome to file this issue as an improvement request using "enhancement" tag.

Best regards!

@kmajzero kmajzero added P2-medium and removed question Further information is requested labels Nov 30, 2022
@manwe
Copy link
Author

manwe commented Dec 1, 2022

Hi! Thanks for the answer

Regarding the kernel I see that it's not the rt flavoured one but the generic one. Seems like in newer kernels PREEMPT_DYNAMIC is enabled although I don't know what the default policy is in debian.
Should adding 'preempt=none' to grub options be enough in this case or do I need a custom kernel?

@kmajzero
Copy link
Contributor

kmajzero commented Dec 1, 2022

Hi,
I did a quick test run with "preempt=none" added on the following machine:

cristos@debian-virt: ~ $ uname -a
Linux debian-virt 5.19.0-0.deb11.2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1~ bpo11+1 (2022-10-03) x86_64 GNU/Linux

cristos@debian-virt:~ $ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.19.0-0.deb11.2-amd64 root=UUID=36fdbdcd-a392-44fd-9f50-fdf1809139e2 ro preempt=none

and the issue is observable. In fact, neither preempt=none nor preempt=voluntary works.

Standard Debian 11.5 Bullseye kernel has only CONFIG_PREEMPT_VOLUNTARY=y (and PREEMP_VOLUNTARY_BUILD in effect) set, but a 5.19 from bullseye-backports has additional preemption options enabled together with CONFIG_PREEMPT_DYNAMIC, making it incompatible with Open CAS Linux.

@manwe
Copy link
Author

manwe commented Dec 1, 2022

Thank you very much.

Bulleye's kernel is 5.10 AFAIR and PREEMTP_DYNAMIC was mainlined in kernel version 5.12
I'm afraid it will be default in most linux distributions because it allows less kernel images to be shipped in the repositories.
I'd suggest to include a warning in the documentation about this.
I'll try to build a custom kernel and restest.

Thanks again.

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

No branches or pull requests

2 participants