Last active
May 18, 2024 04:33
-
-
Save ruzickap/a276dafd819e6390966c29d2c2d28d86 to your computer and use it in GitHub Desktop.
Create BTRFS partition on the HDD SATA disk used for backups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parted --script /dev/sda mklabel gpt | |
parted --script /dev/sda mkpart primary btrfs 0% 100% | |
mkfs.btrfs --runtime-features free-space-tree --label My_Disk_2_TB --nodiscard /dev/sda1 | |
# Entry in /etc/fstab | |
# LABEL=My_Disk_2_TB /mnt/usb btrfs noatime,nodiratime,compress=zstd,autodefrag,space_cache=v2 | |
# Links: | |
# * https://wiki.tnonline.net/w/Btrfs/Space_Cache | |
# * https://unix.stackexchange.com/questions/53378/how-can-i-script-the-creation-of-a-single-partition-that-uses-the-entire-device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment