mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
disk_layout: optimize btrfs filesystem overhead
The defaults already give more space than the ext4 defaults but it's recommended to use the mixed mode for filesystems smaller than 1-5 GB. Another aspect is the duplication of metadata and while it currently is off it's actually related to the underlying block device and could change as soon as the block device type changes. Select the mixed mode that uses a merged area for data and metadata blocks. Also ensure that no metadata duplication gets enabled automatically.
This commit is contained in:
parent
bc97e15c3c
commit
e4f811dd0d
@ -364,7 +364,7 @@ def FormatBtrfs(part, device):
|
||||
part: dict defining the partition
|
||||
device: name of the block device to format
|
||||
"""
|
||||
cmd = ['mkfs.btrfs', '--byte-count', part['fs_bytes']]
|
||||
cmd = ['mkfs.btrfs', '--mixed', '-m', 'single', '-d', 'single', '--byte-count', part['fs_bytes']]
|
||||
if 'fs_label' in part:
|
||||
cmd += ['--label', part['fs_label']]
|
||||
Sudo(cmd + [device])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user