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

Disabled fstrim on BTRFS by default #2109

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ def minimal_installation(
hostname: str = 'archinstall',
locale_config: LocaleConfiguration = LocaleConfiguration.default()
):
_found_btrfs = False
for mod in self._disk_config.device_modifications:
for part in mod.partitions:
if part.fs_type is not None:
Expand All @@ -597,6 +598,10 @@ def minimal_installation(
if (binary := part.fs_type.installation_binary) is not None:
self._binaries.append(binary)

# https://github.com/archlinux/archinstall/issues/1837
if part.fs_type.fs_type_mount == 'btrfs':
_found_btrfs = True

# There is not yet an fsck tool for NTFS. If it's being used for the root filesystem, the hook should be removed.
if part.fs_type.fs_type_mount == 'ntfs3' and part.mountpoint == self.target:
if 'fsck' in self._hooks:
Expand Down Expand Up @@ -651,7 +656,10 @@ def minimal_installation(
# periodic TRIM by default.
#
# https://github.com/archlinux/archinstall/issues/880
self.enable_periodic_trim()
# https://github.com/archlinux/archinstall/issues/1837
# https://github.com/archlinux/archinstall/issues/1841
if not _found_btrfs:
self.enable_periodic_trim()

# TODO: Support locale and timezone
# os.remove(f'{self.target}/etc/localtime')
Expand Down