Created attachment 1774668 [details] fstab Created attachment 1774668 [details] fstab Description of problem: If the user changes the name of a subvolume in the Custom/Manual partitioning UI, its line in /etc/fstab lacks 'compress=zstd:1' mount option. This is benign, affecting only fstab entries, except in the case of '/' mount point. If the '/' mountpoint's subvolume is renamed, the entire installation lacks compression, and so will /etc/fstab meaning it's not set on reboot following installation. Version-Release number of selected component (if applicable): anaconda-34.24.9-1.fc34.x86_64 python3-blivet-3.3.3-2.fc34.noarch How reproducible: Always Steps to Reproduce: 1. Use Custom UI 2. Use Btrfs partition scheme 3. Click blue text "click here to create them automatically" 4. Click on the '/' mount point, and on the right side change the name from "root" to "root34" Actual results: Compress mount option is not used for the installation and does not appear in the /etc/fstab file after installation. Expected results: Compression should be enabled for the installation and the /etc/fstab file. Additional info: Uncertain to what degree this affects Advanced-Custom UI.
Created attachment 1774669 [details] anaconda.log
Created attachment 1774670 [details] program.log
Created attachment 1774671 [details] storage.log
Created attachment 1774672 [details] anaconda-ks.cfg
Created attachment 1774894 [details] anaconda.log
Created attachment 1774895 [details] anaconda-ks.cfg
Created attachment 1774896 [details] fstab
Created attachment 1774897 [details] program.log
Created attachment 1774898 [details] storage.log
$ grep compress bug1952764-storage.log INFO:program:Running... mount -t btrfs -o subvol=home,compress=zstd:1 /dev/vda3 /mnt/sysimage/home INFO:program:Running... mount -t btrfs -o subvol=var_lib_libvirt_images,compress=zstd:1 /dev/vda3 /mnt/sysimage/var/lib/libvirt/images INFO:program:Running... mount -t btrfs -o subvol=var_log,compress=zstd:1 /dev/vda3 /mnt/sysimage/var/log INFO:program:Running... mount -t btrfs -o subvol=var_swap,compress=zstd:1 /dev/vda3 /mnt/sysimage/var/swap For some reason, when the subvolume has been renamed, compress=zstd:1 isn't included in the mount option. $ grep subvol=root bug1952764-storage.log INFO:program:Running... mount -t btrfs -o subvol=root34 /dev/vda3 /mnt/sysimage
DRAFT CommonBugs write up: If the user changes the name of a subvolume in the Custom/Manual partitioning UI, its line in /etc/fstab lacks 'compress=zstd:1' mount option. This is benign, affecting only fstab entries, except in the case of '/' mount point. If the '/' mountpoint's subvolume is renamed, the entire installation lacks compression. Btrfs compression is a system wide mount option, and the '/' fstab entry effective acts as: 'mount -o remount,rw ...' and any other fstab options that have been set. If you need to change the '/' subvolume name, e.g. "@root" there are a couple of work arounds for the bug: Workaround A: make the name change in the installer, and then fix /etc/fstab post-install Step 1: Modify the Name field for '/' mount point, per user preference. Step 2 (optional): Immediately after beginning the installation, switch to a shell and enter: sudo mount -o remount,compress=zstd:1 /mnt/sysimage'. If you get an error, you were too fast, the installer hasn't yet mounted the Btrfs file system to '/mnt/sysimage' - simply reissue the command until it returns without error. You can confirm it's enabled by 'mount | grep btrfs'. Step 3: Modify /etc/fstab post-install, either before or after rebooting from the install environment. Workaround B: make the subvolume name change post-install Step 1: Proceed with installation normally, do not modify the subvolume name for '/'. Step 2: Post-install change the name of the '/' subvolume found in the top-level of the file system, and update /etc/fstab to indicate the subvol=$NAME as appropriate. NOTE: It is safe to rename actively mounted subvolumes.
From storage.log: DEBUG:anaconda.modules.storage.partitioning.interactive.change_device:Change device: DeviceFactoryRequest(container_encrypted=False, container_name='fedora_localhost-live', container_raid_level='single', container_size_policy=0, container_spec='fedora_localhost-live', device_encrypted=False, device_name='root34', device_raid_level='', device_size=105669197824, device_spec='root', device_type=3, disks=['vda'], format_type='btrfs', label='', luks_version='', mount_point='/', reformat=True) DEBUG:anaconda.modules.storage.partitioning.interactive.change_device:Replacing a nonexistent device. DEBUG:anaconda.modules.storage.partitioning.interactive.change_device:Creating a new device. DEBUG:anaconda.modules.storage.partitioning.interactive.utils:Generated factory arguments: { device_type = 3, device = BTRFSSubVolumeDevice instance (0x7fbdd444b100) -- name = root status = False id = 141 children = [] parents = ['non-existent 98.41 GiB btrfs volume fedora_localhost-live (131) with ' 'non-existent btrfs filesystem'] uuid = None size = 98.41 GiB format = non-existent btrfs filesystem mounted at / major = 0 minor = 0 exists = False protected = False sysfs path = target size = 0 B path = /dev/vda3 format args = [] original_format = None, disks = [DiskDevice instance (0x7fbdd4578df0) -- name = vda status = True id = 4 children = ['non-existent 600 MiB partition vda1 (118) with non-existent efi filesystem ' 'mounted at /boot/efi', 'non-existent 1024 MiB partition vda2 (125) with non-existent ext4 filesystem ' 'mounted at /boot', 'non-existent 98.41 GiB partition vda3 (111) with non-existent btrfs ' 'filesystem'] parents = [] uuid = None size = 100 GiB format = non-existent gpt disklabel major = 252 minor = 0 exists = True protected = False sysfs path = /sys/devices/pci0000:00/0000:00:02.3/0000:04:00.0/virtio2/block/vda target size = 100 GiB path = /dev/vda format args = [] original_format = None removable = False wwn = None], mountpoint = '/', fstype = 'btrfs', label = None, luks_version = None, device_name = 'root34', size = Size (98.412109375 GiB), raid_level = None, encrypted = False, container_name = 'fedora_localhost-live', container_size = 0, container_raid_level = <blivet.devicelibs.raid.Single object at 0x7fbdd6a20fd0>, container_encrypted = False } DEBUG:blivet: InstallerStorage.factory_device: 3, ... Anaconda is using the Blivet's device factory to rename the device. Reassigning to Blivet.
This is probably something for Michel to look at, as he introduced this functionality. Michel, what do you think of this?
Thanks for the commonbugs draft, Chris, I used it with minor alterations.
Proposed as a Freeze Exception for 35-final by Fedora user chrismurphy using the blocker tracking app because: There isn't yet a testable fix for this, so we can't evaluate the risk yet. But since this can't be fixed on installation media with an update, and since compression is a headline feature, it'd be nice to get a freeze exception. It does only affect custom/manual installations - but that's also what's required to do a clean install and also preserve an existing "/home".
Clearing the FE request, as it turns out there's no bandwidth to fix this in any plausible f35 final release time frame.
Common bugs applies to both F34 and F35 too.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
Somehow I missed this bug. Happy to revisit once I have bandwith, but looking at my commit, looks like what's happening is the codepath adding the default compression setting (lines 506-508) does not get run in the codepath where the subvolume is renamed https://github.com/storaged-project/blivet/commit/724855ff0c30eacab3448f66c6076151ed565e89