mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-12-23 02:36:05 +01:00
btrfs scrub
This commit is contained in:
parent
5711c62ff7
commit
6248fbc29a
@ -49,13 +49,6 @@ in
|
||||
#../../modules/docker.nix
|
||||
];
|
||||
|
||||
# BTRFS compression.
|
||||
# `nixos-generate-config` does not detect mount options, so we add them here.
|
||||
# https://nixos.wiki/wiki/Btrfs#Compression
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd" ];
|
||||
};
|
||||
|
||||
networking.hostName = "yodaTab";
|
||||
services.openssh.ports = [ 22 ];
|
||||
boot.initrd.network.ssh.port = 22;
|
||||
|
@ -49,13 +49,6 @@ in
|
||||
../../modules/docker.nix
|
||||
];
|
||||
|
||||
# BTRFS compression.
|
||||
# `nixos-generate-config` does not detect mount options, so we add them here.
|
||||
# https://nixos.wiki/wiki/Btrfs#Compression
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd" ];
|
||||
};
|
||||
|
||||
networking.hostName = "yodaTux";
|
||||
services.openssh.ports = [ 22 ];
|
||||
boot.initrd.network.ssh.port = 22;
|
||||
|
@ -51,13 +51,6 @@ in
|
||||
../../modules/docker.nix
|
||||
];
|
||||
|
||||
# BTRFS compression.
|
||||
# `nixos-generate-config` does not detect mount options, so we add them here.
|
||||
# https://nixos.wiki/wiki/Btrfs#Compression
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd" ];
|
||||
};
|
||||
|
||||
networking.hostName = "yodaYoga";
|
||||
services.openssh.ports = [ 2224 ];
|
||||
boot.initrd.network.ssh.port = 2225;
|
||||
|
@ -65,9 +65,39 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# BTRFS compression.
|
||||
#
|
||||
# `nixos-generate-config` does not detect mount options, so we add them here.
|
||||
# https://nixos.wiki/wiki/Btrfs#Compression
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd" ];
|
||||
};
|
||||
|
||||
# BTRFS scrub.
|
||||
#
|
||||
# Scrubbing is the process of checking file consistency.
|
||||
# Scrubbing may be done "online", meaning you don't need to unmount a subvolume to scrub it.
|
||||
# https://nixos.wiki/wiki/Btrfs#Scrubbing
|
||||
# Btrfs scrub is "[a]n online filesystem checking tool. Reads all the data and metadata on the filesystem and uses checksums and the duplicate copies from RAID storage to identify and repair any corrupt data."
|
||||
# https://wiki.archlinux.org/title/btrfs#Scrub
|
||||
# The scrub command operates on a whole filesystem, not just individual subvolumes.
|
||||
# https://unix.stackexchange.com/a/724412
|
||||
#
|
||||
# Manually:
|
||||
# sudo btrfs scrub start /
|
||||
# sudo btrfs scrub status /
|
||||
# #=> UUID: 01f67928-9b35-48b2-aaa6-c58ff6c440a8
|
||||
# #=> Scrub started: Sat Sep 16 12:54:47 2023
|
||||
# #=> Status: finished
|
||||
# #=> Duration: 0:00:42
|
||||
# #=> Total to scrub: 64.43GiB
|
||||
# #=> Rate: 1.53GiB/s
|
||||
# #=> Error summary: no errors found
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "monthly";
|
||||
fileSystems = [ "/" ];
|
||||
};
|
||||
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user