From 7a1178d9cbb8b4a8e6450f8b99f0ffa276252460 Mon Sep 17 00:00:00 2001 From: TommyTran732 <57488583+tommytran732@users.noreply.github.com> Date: Thu, 8 Jul 2021 08:43:51 -0400 Subject: [PATCH] Add new subvol for /var/lib/machines Seems like snapd creates a subvol for this and cause problems with deleting snapshots, might as well just create it here and avoid the headache --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index d80ca41..d105248 100644 --- a/install.sh +++ b/install.sh @@ -103,6 +103,7 @@ btrfs subvolume create /mnt/@/var_cache &>/dev/null btrfs subvolume create /mnt/@/var_tmp &>/dev/null btrfs subvolume create /mnt/@/var_spool &>/dev/null btrfs subvolume create /mnt/@/var_lib_libvirt_images &>/dev/null +btrfs subvolume create /mnt/@/var_lib_machines &>/dev/null btrfs subvolume create /mnt/@/cryptkey &>/dev/null chattr +C /mnt/@/boot chattr +C /mnt/@/srv @@ -112,6 +113,7 @@ chattr +C /mnt/@/var_cache chattr +C /mnt/@/var_tmp chattr +C /mnt/@/var_spool chattr +C /mnt/@/var_lib_libvirt_images +chattr +C /mnt/@/var_lib_machines chattr +C /mnt/@/cryptkey btrfs subvolume set-default "$(btrfs subvolume list /mnt | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+')" /mnt @@ -132,7 +134,7 @@ chmod 600 /mnt/@/.snapshots/1/info.xml umount /mnt echo "Mounting the newly created subvolumes." mount -o ssd,noatime,space_cache,compress=zstd:15 $BTRFS /mnt -mkdir -p /mnt/{/boot,root,home,.snapshots,srv,tmp,/var/log,/var/crash,/var/cache,/var/tmp,/var/spool,/var/lib/gdm,/var/lib/AccountsService,/var/lib/libvirt/images,/cryptkey} +mkdir -p /mnt/{/boot,root,home,.snapshots,srv,tmp,/var/log,/var/crash,/var/cache,/var/tmp,/var/spool,/var/lib/libvirt/images,/var/lib/machines,/cryptkey} mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,subvol=@/boot $BTRFS /mnt/boot mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,subvol=@/root $BTRFS /mnt/root mount -o ssd,noatime,space_cache.autodefrag,compress=zstd:15,discard=async,subvol=@/home $BTRFS /mnt/home @@ -144,6 +146,7 @@ mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,nodat mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,nodatacow,subvol=@/var_tmp $BTRFS /mnt/var/tmp mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,nodatacow,subvol=@/var_spool $BTRFS /mnt/var/spool mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,nodatacow,subvol=@/var_lib_libvirt_images $BTRFS /mnt/var/lib/libvirt/images +mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,nodatacow,subvol=@/var_lib_machines $BTRFS /mnt/var/lib/machines mount -o ssd,noatime,space_cache,autodefrag,compress=zstd:15,discard=async,nodatacow,subvol=@/cryptkey $BTRFS /mnt/cryptkey mkdir -p /mnt/boot/efi mount $ESP /mnt/boot/efi