Originally posted by S.Pam
View Post
And BTRFS RAID is no magic bullet:
# mkfs.btrfs -R free-space-tree -L my-btrfs-disk /dev/sdb1
# mount LABEL=my-btrfs-disk /mnt/my-btrfs-root -o noatime,subvolid=5 # btrfs subvolume create /mnt/my-btrfs-root/@home # mount LABEL=my-btrfs-disk /home -o noatime,subvol=@home
# btrfs filesystem show Label: 'btrfs-root' uuid: 446d32cb-a6da-45f0-9246-1483ad3420e0 Total devices 1 FS bytes used 89.60GiB devid 1 size 229.47GiB used 99.06GiB path /dev/sda3 Label: 'boot' uuid: b1ae03e7-e6c2-4efe-90ec-57a54e296e2e Total devices 1 FS bytes used 35.64MiB devid 1 size 1.00GiB used 342.38MiB path /dev/sda2 Label: 'usb-backup' uuid: df68a30d-d26e-4b9c-9606-a130e66ce63d Total devices 1 FS bytes used 685.68GiB devid 1 size 927.51GiB used 721.02GiB path /dev/sde1
# btrfs filesystem usage -T /mnt/rootvol/ Overall: Device size: 229.47GiB Device allocated: 99.06GiB Device unallocated: 130.41GiB Device missing: 0.00B Used: 92.03GiB Free (estimated): 134.23GiB (min: 69.03GiB) Free (statfs, df): 134.23GiB Data ratio: 1.00 Metadata ratio: 2.00 Global reserve: 382.42MiB (used: 0.00B) Multiple profiles: no Data,single: Size:91.00GiB, Used:87.18GiB (95.80%) /dev/sda3 91.00GiB Metadata,DUP: Size:4.00GiB, Used:2.42GiB (60.63%) /dev/sda3 8.00GiB System,DUP: Size:32.00MiB, Used:16.00KiB (0.05%) /dev/sda3 64.00MiB Unallocated: /dev/sda3 130.41GiB
# btrfs device stats /mnt/rootvol/ [/dev/sda3].write_io_errs 0 [/dev/sda3].read_io_errs 0 [/dev/sda3].flush_io_errs 0 [/dev/sda3].corruption_errs 0 [/dev/sda3].generation_errs 0
#btrfs scrub start /mnt/rootvol/ scrub started on /mnt/rootvol/, fsid 446d32cb-a6da-45f0-9246-1483ad3420e0 (pid=8175) # btrfs scrub status /mnt/rootvol/ UUID: 446d32cb-a6da-45f0-9246-1483ad3420e0 Scrub started: Sun Aug 29 13:40:26 2021 Status: running Duration: 0:00:45 Time left: 0:02:20 ETA: Sun Aug 29 13:43:32 2021 Total to scrub: 92.03GiB Bytes scrubbed: 22.36GiB (24.30%) Rate: 508.87MiB/s Error summary: no errors found
# btrfs property set <dir-or-file> compression zstd
# btrfs filesystem defragment -czstd -vr <dir-or-file>
# mount -o compress=zstd # mount -o compress=zstd:5 # mount -o compress=lzo # mount -o compress (this is zlib) # mount -o compress-force=zstd # mount -o compress-force=zstd:15
Comment