Adapt Options for btrfs-progs 5.16

This commit is contained in:
seiichiro 2022-01-21 13:58:25 +01:00
parent c751f5f172
commit c37fc44a80

View file

@ -152,17 +152,19 @@ for sv in "@" "@home" "@data" "@snapshots" "@log" "@pkg" "@machines" "@portables
btrfs su cr "/mnt/${sv}"
done
btrfs_opts="ssd,noatime,compress=zstd,autodefrag,discard=async"
umount /mnt
echo "Mounting System Subvolumes"
mount -o ssd,noatime,space_cache,compress=zstd,subvol=@ "${root_dev}" /mnt
mount -o ${btrfs_opts},subvol=@ "${root_dev}" /mnt
mkdir -p /mnt/{home,data,.snapshots,var/log,var/cache/pacman/pkg,var/lib/machines,var/lib/portables}
mount -o ssd,noatime,space_cache.compress=zstd,autodefrag,discard=async,subvol=@home "${root_dev}" /mnt/home
mount -o ssd,noatime,space_cache.compress=zstd,autodefrag,discard=async,subvol=@data "${root_dev}" /mnt/data
mount -o ssd,noatime,space_cache.compress=zstd,autodefrag,discard=async,subvol=@snapshots "${root_dev}" /mnt/.snapshots
mount -o ssd,noatime,space_cache.compress=zstd,autodefrag,discard=async,subvol=@log "${root_dev}" /mnt/var/log
mount -o ssd,noatime,space_cache.compress=zstd,autodefrag,discard=async,subvol=@pkg "${root_dev}" /mnt/var/cache/pacman/pkg
mount -o ssd,noatime,space_cache.compress=zstd,autodefrag,discard=async,subvol=@machines "${root_dev}" /mnt/var/lib/machines
mount -o ssd,noatime,space_cache.compress=zstd,autodefrag,discard=async,subvol=@portables "${root_dev}" /mnt/var/lib/portables
mount -o ${btrfs_opts},subvol=@home "${root_dev}" /mnt/home
mount -o ${btrfs_opts},subvol=@data "${root_dev}" /mnt/data
mount -o ${btrfs_opts},subvol=@snapshots "${root_dev}" /mnt/.snapshots
mount -o ${btrfs_opts},subvol=@log "${root_dev}" /mnt/var/log
mount -o ${btrfs_opts},subvol=@pkg "${root_dev}" /mnt/var/cache/pacman/pkg
mount -o ${btrfs_opts},subvol=@machines "${root_dev}" /mnt/var/lib/machines
mount -o ${btrfs_opts},subvol=@portables "${root_dev}" /mnt/var/lib/portables
chattr +C /mnt/var/log /mnt/var/cache/pacman/pkg
if [[ "${systype}" == "x86_64-efi" ]]; then
mkdir -p /mnt/boot/efi