[Bug 1224808] New: dracut incorrectly modify btrfs compression level for /
https://bugzilla.suse.com/show_bug.cgi?id=1224808 Bug ID: 1224808 Summary: dracut incorrectly modify btrfs compression level for / Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: screening-team-bugs@suse.de Reporter: fcrozat@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- On a MicroOS Desktop system, I'm trying to enable btrfs compression on root fs. The change is made at /etc/fstab level. The initial fstab relevant line was: UUID=no_interest_here / btrfs ro 0 0 Changed to: UUID=no_interest_here / btrfs ro,compress=zstd:1 0 0 and then running transaction-update initrd to ensure dracut is run in the transactional system. However, the stored kernel cmdline by dracut becomes: dracut[I]: root=UUID=980c03f5-35f5-405d-8686-d51ec67c17b4 rootfstype=btrfs rootflags=rw,relatime,seclabel,compress=,ssd,discard=async,space_cache=v2,subvolid=774,subvol=/@/.snapshots/619/snapshot,subvol=@/.snapshots/619/snapshot compress parameter is being stripped. This is with dracut-059+suse.588.g528264be-1.1.x86_64 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 Chenzi Cao <chcao@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |dracut-maintainers@suse.de -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c1 Antonio Feijoo <antonio.feijoo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |antonio.feijoo@suse.com --- Comment #1 from Antonio Feijoo <antonio.feijoo@suse.com> --- By default, dracut gets this info from /proc/self/mountinfo. To use /etc/fstab as the primary source, you must use the `--fstab` command line option or the `use_fstab=yes` configuration option. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c2 --- Comment #2 from Frederic Crozat <fcrozat@suse.com> --- (In reply to Antonio Feijoo from comment #1)
By default, dracut gets this info from /proc/self/mountinfo. To use /etc/fstab as the primary source, you must use the `--fstab` command line option or the `use_fstab=yes` configuration option.
When I did the change initially, I changed fstab, regenerated initrd and rebooted (so it is used) but system end-up with compress= and not compress=zstd:1 Regenerating initrd on the rebooted system still give the same thing. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c3 --- Comment #3 from Antonio Feijoo <antonio.feijoo@suse.com> --- (In reply to Frederic Crozat from comment #2)
(In reply to Antonio Feijoo from comment #1)
By default, dracut gets this info from /proc/self/mountinfo. To use /etc/fstab as the primary source, you must use the `--fstab` command line option or the `use_fstab=yes` configuration option.
When I did the change initially, I changed fstab, regenerated initrd and rebooted (so it is used) but system end-up with compress= and not compress=zstd:1
Regenerating initrd on the rebooted system still give the same thing.
That's strange, I tested it before and it works for me:
May 22 07:44:43 localhost dracut-cmdline[218]: Using kernel command line parameters: ... rootfstype=btrfs rootflags=ro,compress=zstd:1 ...
Do your have `use_fstab=yes` in any conf file under /etc/dracut.conf.d/? Otherwise it will not work. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c4 --- Comment #4 from Frederic Crozat <fcrozat@suse.com> --- (In reply to Antonio Feijoo from comment #3)
(In reply to Frederic Crozat from comment #2)
(In reply to Antonio Feijoo from comment #1)
By default, dracut gets this info from /proc/self/mountinfo. To use /etc/fstab as the primary source, you must use the `--fstab` command line option or the `use_fstab=yes` configuration option.
When I did the change initially, I changed fstab, regenerated initrd and rebooted (so it is used) but system end-up with compress= and not compress=zstd:1
Regenerating initrd on the rebooted system still give the same thing.
That's strange, I tested it before and it works for me:
May 22 07:44:43 localhost dracut-cmdline[218]: Using kernel command line parameters: ... rootfstype=btrfs rootflags=ro,compress=zstd:1 ...
Do your have `use_fstab=yes` in any conf file under /etc/dracut.conf.d/? Otherwise it will not work.
I just tested by adding it. It is now properly part of dracut stored kernel cmdline but when the system is booted, it ends-up with compress= and not compress=zstd:1 when checking /proc/self/mountinfo -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c5 --- Comment #5 from Antonio Feijoo <antonio.feijoo@suse.com> --- (In reply to Frederic Crozat from comment #4)
I just tested by adding it. It is now properly part of dracut stored kernel cmdline but when the system is booted, it ends-up with compress= and not compress=zstd:1 when checking /proc/self/mountinfo
At least in my case it's ok:
localhost:~ # grep -r -m1 compress= /proc/self/mountinfo 62 1 0:34 /@/.snapshots/7/snapshot / ro,relatime shared:1 - btrfs /dev/mapper/luks rw,seclabel,compress=zstd:1,space_cache=v2,subvolid=276,subvol=/@/.snapshots/7/snapshot
But, I'm testing this with SL Micro, I'll download the latest MicroOS snapshot later and check if I can reproduce it. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c6 Antonio Feijoo <antonio.feijoo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dracut-maintainers@suse.de |kernel-bugs@opensuse.org --- Comment #6 from Antonio Feijoo <antonio.feijoo@suse.com> --- (In reply to Antonio Feijoo from comment #5)
But, I'm testing this with SL Micro, I'll download the latest MicroOS snapshot later and check if I can reproduce it.
Ok, my bad, I should've tested this with MicroOS since the beginning, I can reproduce it with snapshot 20240520.
localhost:~ # grep -m1 compress= /proc/self/mountinfo 64 1 0:36 /@/.snapshots/2/snapshot / ro,relatime shared:1 - btrfs /dev/vda3 rw,seclabel,compress=,discard=async,space_cache=v2,subvolid=268,subvol=/@/.snapshots/2/snapshot
There was not any change in dracut that could affect this between the version shipped with SL Micro and the latest Factory version, and the arguments in dracut look ok:
May 22 13:05:43 localhost dracut-cmdline[233]: dracut-059+suse.588.g528264be-1.1 May 22 13:05:43 localhost dracut-cmdline[233]: Using kernel command line parameters: ... rootfstype=btrfs rootflags=ro,compress=zstd:1 ...
Also, `findmnt` reports the right options on the running system:
localhost:~ # findmnt --fstab -e -v -n -o 'OPTIONS' --target / ro,compress=zstd:1
But, /proc/self/mountinfo trims the value of compress=... So, I guess this should be an issue with kernel 6.9.1-1-default (it works with 6.4.0-17-default). -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c7 --- Comment #7 from Antonio Feijoo <antonio.feijoo@suse.com> --- Observed:
[ 1.415049] localhost kernel: BTRFS: device label ROOT devid 1 transid 65 /dev/vda3 (254:3) scanned by mount (450) [ 1.415283] localhost kernel: BTRFS info (device vda3): first mount of filesystem 0ccd61f9-7e1a-4329-9b48-04673b6ba623 [ 1.415292] localhost kernel: BTRFS info (device vda3): using crc32c (crc32c-intel) checksum algorithm [ 1.415295] localhost kernel: BTRFS info (device vda3): using free-space-tree [ 1.757878] localhost systemd[1]: Switching root. [ 2.935997] localhost kernel: BTRFS info (device vda3 state M): use zstd compression, level 1 ... [ 3.179772] localhost systemd[1]: Mounting /.snapshots... [ 3.180726] localhost kernel: BTRFS info (device vda3 state M): use compression, level 0 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c8 --- Comment #8 from Frederic Crozat <fcrozat@suse.com> --- It was also broken with kernel 6.8.9 on MicroOS -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 Takashi Iwai <tiwai@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dsterba@suse.com, | |fdmanana@suse.com, | |rgoldwyn@suse.com, | |tiwai@suse.com, | |wqu@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 Dario Faggioli <dfaggioli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfaggioli@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 https://bugzilla.suse.com/show_bug.cgi?id=1224808#c9 --- Comment #9 from Dario Faggioli <dfaggioli@suse.com> --- Wow, I just noticed that I'm affected as well... :-( -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 Goldwyn Rodrigues <rgoldwyn@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kernel-bugs@opensuse.org |antonio.feijoo@suse.com CC|rgoldwyn@suse.com | -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224808 Antonio Feijoo <antonio.feijoo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|dracut incorrectly modify |incorrect btrfs compression |btrfs compression level for |level for / |/ | Assignee|antonio.feijoo@suse.com |kernel-bugs@opensuse.org -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com