* [gentoo-user] fsck operational error
[not found] <41040b25-52a7-484a-9261-1f115f2d5818.ref@yahoo.com>
@ 2024-09-21 16:16 ` ralfconn
2025-04-09 16:38 ` [gentoo-user] " ralfconn
0 siblings, 1 reply; 8+ messages in thread
From: ralfconn @ 2024-09-21 16:16 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
Hello,
Upon boot OpenRc shows this warning:
fsck: checking local filesystem
fsck: fsck.ext4 device or resource busy while trying to open /dev/nvme0n1p6
fsck: filesystem mounted or opened exclusively by another program?
fsck: operational error
This is the root filesystem, and in fstab it is listed as:
UUID=xxxx-xxxx-xxxx / ext4 noatime,discard 0 1
/etc/conf.d/fsck contains only:
fsck_on_battery="YES"
fsck_shutdown="NO"
fsck_abort_on_errors="YES"
This started a week ago after a system update when I switched from
kernel 6.10.9 to 6.10.10 (~amd64). That day there was also an update of
OpenRc to version 0.55.
Has anybody seen the same?
thanks,
raf
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: fsck operational error
2024-09-21 16:16 ` [gentoo-user] fsck operational error ralfconn
@ 2025-04-09 16:38 ` ralfconn
2025-04-09 22:08 ` Michael
2025-05-22 17:16 ` yahoo
0 siblings, 2 replies; 8+ messages in thread
From: ralfconn @ 2025-04-09 16:38 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
Il 21/09/24 18:16, ralfconn ha scritto:
> Upon boot OpenRc shows this warning:
>
> fsck: checking local filesystem
> fsck: fsck.ext4 device or resource busy while trying to open /dev/nvme0n1p6
> fsck: filesystem mounted or opened exclusively by another program?
> fsck: operational error
>
>...
>
> This started a week ago after a system update when I switched from
> kernel 6.10.9 to 6.10.10 (~amd64). That day there was also an update of
> OpenRc to version 0.55.
Old thread, no answer, but now I get the same message on another box,
just after I reconfigured the kernel for hardening
(https://kspp.github.io/Recommended_Settings), so it was not an OpenRC
issue.
I'll update if I find the option that causes the issue, just to close
the thread for the posterity :-).
raffaele
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: fsck operational error
2025-04-09 16:38 ` [gentoo-user] " ralfconn
@ 2025-04-09 22:08 ` Michael
2025-05-22 17:16 ` yahoo
1 sibling, 0 replies; 8+ messages in thread
From: Michael @ 2025-04-09 22:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
On Wednesday, 9 April 2025 17:38:50 British Summer Time ralfconn wrote:
> Il 21/09/24 18:16, ralfconn ha scritto:
> > Upon boot OpenRc shows this warning:
> >
> > fsck: checking local filesystem
> > fsck: fsck.ext4 device or resource busy while trying to open
> > /dev/nvme0n1p6
> > fsck: filesystem mounted or opened exclusively by another program?
> > fsck: operational error
> >
> >...
> >
> > This started a week ago after a system update when I switched from
> > kernel 6.10.9 to 6.10.10 (~amd64). That day there was also an update of
> > OpenRc to version 0.55.
>
> Old thread, no answer, but now I get the same message on another box,
> just after I reconfigured the kernel for hardening
> (https://kspp.github.io/Recommended_Settings), so it was not an OpenRC
> issue.
>
> I'll update if I find the option that causes the issue, just to close
> the thread for the posterity :-).
>
> raffaele
I don't run a hardened setup and don't have this problem.
Is your fsck service in boot level?
~ # rc-update -s -v | grep fsck
fsck | boot
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: fsck operational error
2025-04-09 16:38 ` [gentoo-user] " ralfconn
2025-04-09 22:08 ` Michael
@ 2025-05-22 17:16 ` yahoo
2025-05-22 18:13 ` Dale
1 sibling, 1 reply; 8+ messages in thread
From: yahoo @ 2025-05-22 17:16 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
Il 09/04/25 18:38, ralfconn ha scritto:
> Il 21/09/24 18:16, ralfconn ha scritto:
>> Upon boot OpenRc shows this warning:
>>
>> fsck: checking local filesystem
>> fsck: fsck.ext4 device or resource busy while trying to open /dev/
>> nvme0n1p6
>> fsck: filesystem mounted or opened exclusively by another program?
>> fsck: operational error
>>
>> ...
> Old thread, no answer, but now I get the same message on another box,
> just after I reconfigured the kernel for hardening (https://
> kspp.github.io/Recommended_Settings), so it was not an OpenRC issue.
>
> I'll update if I find the option that causes the issue, just to close
> the thread for the posterity :-).
>
I found the kernel option causing the error:
BLK_DEV_WRITE_MOUNTED
Re-enabling the option fixes the issue.
The help says:
"When a block device is mounted, writing to its buffer cache is very
likely going to cause filesystem corruption. It is also rather easy to
crash the kernel in this way since the filesystem has no practical way
of detecting these writes to buffer cache and verifying its metadata
integrity. However there are some setups that need this capability like
*running fsck on read-only mounted root device*, modifying some features
on mounted ext4 filesystem, and similar...."
I can't say they didn't warn me :-)
The option is on by default, I was directed to switch it off by
app-admin/kernel-hardening-checker:
CONFIG_BLK_DEV_WRITE_MOUNTED |kconfig| is not set |a13xp0p0v
|cut_attack_surface| FAIL: "y"
The fourth column is the source of the recommended setting - a13xp0p0v -
who is the maintainer of the tool. It's in github, I'll open a ticket there.
raffaele
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: fsck operational error
2025-05-22 17:16 ` yahoo
@ 2025-05-22 18:13 ` Dale
2025-05-22 20:02 ` yahoo
0 siblings, 1 reply; 8+ messages in thread
From: Dale @ 2025-05-22 18:13 UTC (permalink / raw
To: gentoo-user
yahoo wrote:
> Il 09/04/25 18:38, ralfconn ha scritto:
>> Il 21/09/24 18:16, ralfconn ha scritto:
>>> Upon boot OpenRc shows this warning:
>>>
>>> fsck: checking local filesystem
>>> fsck: fsck.ext4 device or resource busy while trying to open /dev/
>>> nvme0n1p6
>>> fsck: filesystem mounted or opened exclusively by another program?
>>> fsck: operational error
>>>
>>> ...
>> Old thread, no answer, but now I get the same message on another box,
>> just after I reconfigured the kernel for hardening (https://
>> kspp.github.io/Recommended_Settings), so it was not an OpenRC issue.
>>
>> I'll update if I find the option that causes the issue, just to close
>> the thread for the posterity :-).
>>
>
> I found the kernel option causing the error:
>
> BLK_DEV_WRITE_MOUNTED
>
> Re-enabling the option fixes the issue.
>
> The help says:
>
> "When a block device is mounted, writing to its buffer cache is very
> likely going to cause filesystem corruption. It is also rather easy to
> crash the kernel in this way since the filesystem has no practical way
> of detecting these writes to buffer cache and verifying its metadata
> integrity. However there are some setups that need this capability
> like *running fsck on read-only mounted root device*, modifying some
> features on mounted ext4 filesystem, and similar...."
>
> I can't say they didn't warn me :-)
>
> The option is on by default, I was directed to switch it off by
> app-admin/kernel-hardening-checker:
>
> CONFIG_BLK_DEV_WRITE_MOUNTED |kconfig| is not set
> |a13xp0p0v |cut_attack_surface| FAIL: "y"
>
> The fourth column is the source of the recommended setting - a13xp0p0v
> - who is the maintainer of the tool. It's in github, I'll open a
> ticket there.
>
> raffaele
>
>
Is this a driver we should all disable or do you have a different use
case than most? I ask because mine is on as well. Given the large
volume of data I have, if it needs to be off, I want to turn it off and
build a new kernel. I rarely mount anything read only anyway so I can't
think of a reason I would ever need it. I either unmount completely or
run it when mounted as read/write if fsck allows it.
Thanks.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: fsck operational error
2025-05-22 18:13 ` Dale
@ 2025-05-22 20:02 ` yahoo
2025-05-22 21:29 ` yahoo
0 siblings, 1 reply; 8+ messages in thread
From: yahoo @ 2025-05-22 20:02 UTC (permalink / raw
To: gentoo-user
Il 22/05/25 20:13, Dale ha scritto:
> yahoo wrote:
> Is this a driver we should all disable or do you have a different use
> case than most? I ask because mine is on as well. Given the large
DON'T DISABLE IT!
fsck must be executed on unmounted filesystem and for 'root fs' that
normally happens only during boot. On my system the order of init
services is:
- kernel starts and mounts root fs in read only mode
- OpenRc starts
...
1. fsck service (this checks the root fs)
2. root service (this remounts the root fs in read/write mode)
...
If you disable that option when the fsck service runs it finds the root
fs mounted read-only, fails and does not check the root fs _ever_. Not a
good idea!
Maybe with different init systems or a different OpenRC configuration
the two services are executed in the reverse order, I don't know, I have
the same behavior on two different OpenRc systems. I would not risk if I
were you. That said, if you want to give it a try, study the logs
carefully to ensure it doesn't break the fsck service.
raffaele
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: fsck operational error
2025-05-22 20:02 ` yahoo
@ 2025-05-22 21:29 ` yahoo
2025-05-22 22:08 ` Dale
0 siblings, 1 reply; 8+ messages in thread
From: yahoo @ 2025-05-22 21:29 UTC (permalink / raw
To: gentoo-user
Il 22/05/25 22:02, yahoo ha scritto:
> Il 22/05/25 20:13, Dale ha scritto:
>> yahoo wrote:
>> Is this a driver we should all disable or do you have a different use
>> case than most? I ask because mine is on as well. Given the large
>
> DON'T DISABLE IT!
>
Sorry, I just re-read what I wrote and the stuff below does not make
sense, I'm mixing up unmounted and read-write/read-only. I need to
understand better what's going on.
"Don't disable it" is the only correct answer.
raffaele
> fsck must be executed on unmounted filesystem and for 'root fs' that
> normally happens only during boot. On my system the order of init
> services is:
>
> - kernel starts and mounts root fs in read only mode
> - OpenRc starts
> ...
> 1. fsck service (this checks the root fs)
> 2. root service (this remounts the root fs in read/write mode)
> ...
>
> If you disable that option when the fsck service runs it finds the root
> fs mounted read-only, fails and does not check the root fs _ever_. Not a
> good idea!
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: fsck operational error
2025-05-22 21:29 ` yahoo
@ 2025-05-22 22:08 ` Dale
0 siblings, 0 replies; 8+ messages in thread
From: Dale @ 2025-05-22 22:08 UTC (permalink / raw
To: gentoo-user
yahoo wrote:
> Il 22/05/25 22:02, yahoo ha scritto:
>> Il 22/05/25 20:13, Dale ha scritto:
>>> yahoo wrote:
>>> Is this a driver we should all disable or do you have a different use
>>> case than most? I ask because mine is on as well. Given the large
>>
>> DON'T DISABLE IT!
>>
>
> Sorry, I just re-read what I wrote and the stuff below does not make
> sense, I'm mixing up unmounted and read-write/read-only. I need to
> understand better what's going on.
>
> "Don't disable it" is the only correct answer.
>
> raffaele
That was the part I noticed most. :-D
Thanks.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-05-22 22:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <41040b25-52a7-484a-9261-1f115f2d5818.ref@yahoo.com>
2024-09-21 16:16 ` [gentoo-user] fsck operational error ralfconn
2025-04-09 16:38 ` [gentoo-user] " ralfconn
2025-04-09 22:08 ` Michael
2025-05-22 17:16 ` yahoo
2025-05-22 18:13 ` Dale
2025-05-22 20:02 ` yahoo
2025-05-22 21:29 ` yahoo
2025-05-22 22:08 ` Dale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox