Skip to content

Commit

Permalink
make-extdrive: Use blkdiscard
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Dec 30, 2023
1 parent 5a4cad3 commit fbab61f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bin/make-extdrive
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if [[ $device == *[0-9] ]]; then
fi

enable-usb-trim "$device"
blkdiscard "$device"

wipefs -a "$device"
sgdisk -Z "$device"
Expand Down Expand Up @@ -41,9 +42,4 @@ cryptsetup luksOpen --allow-discards "$part" "$cryptdev"

mkfs.ext4 -L "$label" "$cryptdev_path"

mount_dir=$(mktemp -d)
mount "$cryptdev_path" "$mount_dir"
fstrim -v "$mount_dir"
umount "$mount_dir"

printf '\nHeader backup at %s\n' "$temp"

0 comments on commit fbab61f

Please sign in to comment.