Bug 2548920

Summary: Failed to write bfq to sysfs because device or resource busy
Product: [Fedora] Fedora Reporter: Alex Hedges <fedora>
Component: systemdAssignee: systemd-maint
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 44CC: daan.j.demeyer, fedoraproject, lnykryn, msekleta, suraj.ghimire7, systemd-maint, vmihalko, yuwatana, zbyszek
Target Milestone: ---Keywords: Regression, Reproducer
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproducer script none

Description Alex Hedges 2026-10-09 21:58:20 UTC
Created attachment 2160586 [details]
Reproducer script

When booting recent versions of Fedora (appeared on both Fedora 44 and 45 within the past month or two) in a libvirt VM with multiple hard drives, I noticed the error `Failed to write "bfq" to sysfs attribute "queue/scheduler", ignoring: Device or resource busy` in the system logs.

The number of errors reported seems to correlate with the number of (emulated) hard drives attached to the VM. The errors are not deterministic, but my reproducer script uses 4 HDs, and that appears to be enough to trigger at least one error on most runs.

Reproducible: Sometimes

Steps to Reproduce:
1. Boot disk image with libvirt using a VM with several hard drives attached
2. Log into VM
3. Check for errors with `journalctl --all --boot --priority err --unit systemd-udevd`

This can be done automatically by running the attached script `fcos_udev_bug.sh` on a Fedora system. I believe only the following packages are needed over a base Fedora 44 CoreOS stable image:

- `butane`
- `libvirt-client-qemu`
- `libvirt-daemon-config-network`
- `libvirt-daemon-driver-qemu`
- `libvirt-daemon-kvm virt-install`

There is probably a _significantly_ shorter reproducer possible with CoreOS Assembler, but I gave up on that approach after a couple of hours without success. (I think it might be missing the ability to emulate the hardware that causes the problem.)

Actual Results:
I see an error like the following in the logs:

```log
Oct 08 20:56:36 localhost (udev-worker)[1274]: sdd: /usr/lib/udev/rules.d/60-block-scheduler.rules:3 ATTR{queue/scheduler}="bfq": Failed to write "bfq" to sysfs attribute "queue/scheduler", ignoring: Device or resource busy
```

Expected Results:
It should not return an error.

Additional Information:
I discovered this while testing Fedora CoreOS setup on emulated NAS hardware, but I'm reporting it here because it doesn't seem like a CoreOS-specific problem. The problematic rule is in `60-block-scheduler.rules` (https://src.fedoraproject.org/rpms/systemd/blob/33f684e50f8e359171a8b2137b573313c4be1bb7/f/60-block-scheduler.rules ), a Fedora-specific addition, so I am also not reporting it upstream.