1/2
mount_part() {
# https://man.archlinux.org/man/btrfs.5.en
# https://man.archlinux.org/man/xfs.5.en
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@ /dev/mapper/root /mnt
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@snapshots /dev/mapper/root /mnt/.snapshots
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@pkg /dev/mapper/root /mnt/var/cache/pacman/pkg
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@log /dev/mapper/root /mnt/var/log
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@tmp /dev/mapper/root /mnt/var/tmp
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@cache /dev/mapper/root /mnt/var/cache
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@flatpak /dev/mapper/root /mnt/var/lib/flatpak
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvolid=5 /dev/mapper/root /mnt/btrfs
mount -o fmask=0137,dmask=0027 $(getDiskPart ${DISK_ROOT} 1) /mnt/efi
case ${HOME_FS} in
btrfs)
mount -o relatime,compress-force=zstd,discard=async,commit=120,subvol=@home /dev/mapper/home /mnt/home
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@home-cache /dev/mapper/home /mnt/home/${VUSER}/.cache
mount -o noatime,compress-force=zstd,discard=async,commit=120,subvol=@home-apps /dev/mapper/home /mnt/home/${VUSER}/.var/app
mount -o noatime,nodatacow,discard=async,commit=120,subvol=@downloads /dev/mapper/home /mnt/home/${VUSER}/Downloads
mount -o noatime,nodatacow,discard=async,commit=120,subvol=@steam /dev/mapper/home /mnt/home/${VUSER}/.local/share/Steam
;;
xfs)
mount /dev/mapper/home /mnt/home
;;
ext4)
mount /dev/mapper/home /mnt/home
;;
esac
Suggestions for improvements please?