commit
310d67cf27
@ -258,7 +258,8 @@ class FstabGenerator(object):
|
||||
if mount_point == "/":
|
||||
self.root_is_ssd = is_ssd
|
||||
|
||||
if filesystem == "btrfs" and "subvol" in partition:
|
||||
# If there's a set-and-not-empty subvolume set, add it
|
||||
if filesystem == "btrfs" and partition.get("subvol",None):
|
||||
options = "subvol={},".format(partition["subvol"]) + options
|
||||
|
||||
if has_luks:
|
||||
|
@ -191,6 +191,8 @@ def mount_partition(root_mount_point, partition, partitions):
|
||||
libcalamares.globalstorage.insert("btrfsSubvolumes", btrfs_subvolumes)
|
||||
# Create the subvolumes that are in the completed list
|
||||
for s in btrfs_subvolumes:
|
||||
if not s["subvolume"]:
|
||||
continue
|
||||
subprocess.check_call(["btrfs", "subvolume", "create",
|
||||
root_mount_point + s["subvolume"]])
|
||||
if s["mountPoint"] == "/":
|
||||
|
@ -42,15 +42,24 @@ extraMountsEfi:
|
||||
mountPoint: /sys/firmware/efi/efivars
|
||||
|
||||
# Btrfs subvolumes to create if root filesystem is on btrfs volume.
|
||||
# If mountpoint is mounted already to another partition, it is ignored.
|
||||
# If *mountpoint* is mounted already to another partition, it is ignored.
|
||||
# Separate subvolume for swapfile is handled separately and automatically.
|
||||
#
|
||||
# It is possible to prevent subvolume creation -- this is likely only relevant
|
||||
# for the root (/) subvolume -- by giving an empty string as a subvolume
|
||||
# name. In this case no subvolume will be created. When using snapper as
|
||||
# a rollback mechanism, it is recommended to **not** create a subvolume
|
||||
# for root.
|
||||
|
||||
btrfsSubvolumes:
|
||||
- mountPoint: /
|
||||
subvolume: /@
|
||||
# As an alternative:
|
||||
#
|
||||
# subvolume: ""
|
||||
- mountPoint: /home
|
||||
subvolume: /@home
|
||||
- mountPoint: /var/cache
|
||||
subvolume: /@cache
|
||||
- mountPoint: /var/log
|
||||
subvolume: /@log
|
||||
subvolume: /@log
|
||||
|
Loading…
Reference in New Issue
Block a user