removed snapraid & mergerfs

This commit is contained in:
Danilo Reyes 2023-10-11 15:37:48 -06:00
parent c16a6dc50c
commit 331f650678
3 changed files with 47 additions and 138 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/scripts/download/.direnv/

View File

@ -702,8 +702,6 @@ environment = {
wget wget
jellyfin-ffmpeg # coolest video converter! jellyfin-ffmpeg # coolest video converter!
dlib dlib
mergerfs
mergerfs-tools
]; ];
variables = rec { variables = rec {
# PATH # PATH
@ -763,38 +761,39 @@ historic backup of your files, I am more concerned with the whole disk recovery
in case of failure, as such a frequent sync fits my preferences. in case of failure, as such a frequent sync fits my preferences.
#+begin_src nix #+begin_src nix
snapraid = { # snapraid = {
enable = true; # enable = true;
touchBeforeSync = true; # touchBeforeSync = true;
sync.interval = "02:00"; # sync.interval = "02:00";
scrub.interval = "04:00"; # scrub.interval = "04:00";
extraConfig = '' # extraConfig = ''
autosave 5000 # autosave 5000
''; # # blocksize 128
parityFiles = [ # '';
"/mnt/disks/parity/snapraid.parity" # parityFiles = [
]; # "/mnt/disks/parity/snapraid.parity"
dataDisks = { # ];
d1 = "/mnt/disks/disk1/"; # dataDisks = {
d2 = "/mnt/disks/disk2/"; # d1 = "/mnt/disks/disk1/";
d3 = "/mnt/disks/seedbox/"; # d2 = "/mnt/disks/disk2/";
}; # d3 = "/mnt/disks/seedbox/";
exclude = [ # };
"/tmp/" # exclude = [
"/lost+found/" # "/tmp/"
"/multimedia/downloads/" # "/lost+found/"
"/backups/" # "/multimedia/downloads/"
"/glue/Spankbank/unorganized/chaturbate/" # "/backups/"
"/nextcloud/nextcloud.log" # "/glue/Spankbank/unorganized/chaturbate/"
"/seeding/" # "/nextcloud/nextcloud.log"
"/.Trash-1000/" # "/seeding/"
]; # "/.Trash-1000/"
contentFiles = [ # ];
"/var/snapraid.content" # contentFiles = [
"/mnt/snapraid/disk1/snapraid.content" # "/var/snapraid.content"
"/mnt/snapraid/disk2/snapraid.content" # "/mnt/snapraid/disk1/snapraid.content"
]; # "/mnt/snapraid/disk2/snapraid.content"
}; # ];
# };
#+end_src #+end_src
* PROGRAMS * PROGRAMS
@ -858,8 +857,7 @@ services = {
enable = true; enable = true;
fileSystems = [ fileSystems = [
"/" "/"
"/mnt/disks/disk1" "/mnt/pool"
"/mnt/disks/disk2"
]; ];
}; };
samba-wsdd.enable = true; samba-wsdd.enable = true;

View File

@ -26,6 +26,10 @@
device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771"; device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771";
preLVM = true; preLVM = true;
}; };
disk3 = {
device = "/dev/disk/by-uuid/8cd728f6-0d5b-4cea-8f7d-01aad11192c1";
preLVM = true;
};
hnbox = { hnbox = {
device = "/dev/disk/by-uuid/c7dd2d5a-b0b3-46a0-aca9-3d4975c1f0bc"; device = "/dev/disk/by-uuid/c7dd2d5a-b0b3-46a0-aca9-3d4975c1f0bc";
preLVM = true; preLVM = true;
@ -78,19 +82,8 @@
"datacow" "datacow"
]; ];
}; };
"/mnt/disks/disk1" = { "/mnt/pool" = {
device = "/dev/mapper/disk1"; device = "/dev/disk/by-uuid/1e7cf787-e34d-4e3e-ac3c-0c07309dbd34";
fsType = "btrfs";
options = [
"subvol=@data"
"compress=zstd:3"
"space_cache=v2"
"commit=120"
"datacow"
];
};
"/mnt/disks/disk2" = {
device = "/dev/mapper/disk2";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=@data" "subvol=@data"
@ -111,11 +104,6 @@
"datacow" "datacow"
]; ];
}; };
"/mnt/disks/parity" = {
device = "/dev/disk/by-uuid/2e437a79-a246-411b-ac21-d03414b14305";
fsType = "ext4";
options = [ "defaults" ];
};
"/mnt/disks/hnbox" = { "/mnt/disks/hnbox" = {
device = "/dev/mapper/hnbox"; device = "/dev/mapper/hnbox";
fsType = "btrfs"; fsType = "btrfs";
@ -129,88 +117,15 @@
device = "/dev/disk/by-uuid/CBE7-5DEB"; device = "/dev/disk/by-uuid/CBE7-5DEB";
fsType = "vfat"; fsType = "vfat";
}; };
"/mnt/pool" = {
device = "/mnt/disks/disk1:/mnt/disks/disk2";
fsType = "fuse.mergerfs";
options = [
"allow_other"
"noforget"
"func.getattr=newest"
"category.create=mfs"
"category.action=mfs"
"cache.files=partial"
"dropcacheonclose=true"
"inodecalc=path-hash"
"link_cow=true"
"nfsopenhack=all"
];
depends = [
"/mnt/disks/disk1"
"/mnt/disks/disk2"
"/mnt/disks/seedbox"
"/mnt/disks/parity"
"/mnt/disks/hnbox"
];
};
# NEXTCCLOUD # NEXTCCLOUD
"/var/lib/nextcloud/data" = { "/var/lib/nextcloud/data" = {
device = "/mnt/pool/nextcloud"; device = "/mnt/pool/nextcloud";
options = [ "bind" ]; options = [ "bind" ];
depends = [ "/mnt/pool" ]; depends = [ "/mnt/pool" ];
}; };
# BTRFS SNAPER
"/mnt/btrfs/disk1" = {
device = "/dev/mapper/disk1";
fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
};
"/mnt/btrfs/disk2" = {
device = "/dev/mapper/disk2";
fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
};
"/mnt/btrfs/seedbox" = {
device = "/dev/mapper/seedbox";
fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
};
# snapraid content
"/mnt/snapraid/disk1" = {
device = "/dev/mapper/disk1";
fsType = "btrfs";
options = [
"subvol=@snapraid"
"compress=zstd:3"
"space_cache=v2"
"commit=120"
"datacow"
];
};
"/mnt/snapraid/disk2" = {
device = "/dev/mapper/disk2";
fsType = "btrfs";
options = [
"subvol=@snapraid"
"compress=zstd:3"
"space_cache=v2"
"commit=120"
"datacow"
];
};
"/mnt/snapraid/seedbox" = {
device = "/dev/mapper/seedbox";
fsType = "btrfs";
options = [
"subvol=@snapraid"
"compress=zstd:3"
"space_cache=v2"
"commit=120"
"datacow"
];
};
# Jellyfin RO # Jellyfin RO
"/mnt/jellyfin/external" = { "/mnt/jellyfin/external" = {
device = "/mnt/disks/seedbox/external"; device = "/mnt/disks/nvme";
options = [ "bind" "ro" ]; options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ]; depends = [ "/mnt/pool" ];
}; };
@ -224,13 +139,8 @@
options = [ "bind" "ro" ]; options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ]; depends = [ "/mnt/pool" ];
}; };
"/mnt/jellyfin/workout" = {
device = "/mnt/disks/seedbox/other/P90x.Mega.Pack";
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
# NFS # NFS
"/export/pool" = { "/export/pool_nfs" = {
device = "/mnt/pool"; device = "/mnt/pool";
options = [ "bind" ]; options = [ "bind" ];
depends = [ "/mnt/pool" ]; depends = [ "/mnt/pool" ];
@ -253,7 +163,7 @@
/export workstation(rw,fsid=0,no_subtree_check) /export workstation(rw,fsid=0,no_subtree_check)
/export/jawz workstation(rw,nohide,insecure,no_subtree_check) /export/jawz workstation(rw,nohide,insecure,no_subtree_check)
/export/seedbox workstation(rw,nohide,insecure,no_subtree_check) /export/seedbox workstation(rw,nohide,insecure,no_subtree_check)
/export/pool workstation(rw,nohide,insecure,no_subtree_check,async,no_root_squash,fsid=1) /export/pool_nfs workstation(rw,nohide,insecure,no_subtree_check,async,no_root_squash,fsid=1)
''; '';
}; };
}; };