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
jellyfin-ffmpeg # coolest video converter!
dlib
mergerfs
mergerfs-tools
];
variables = rec {
# 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.
#+begin_src nix
snapraid = {
enable = true;
touchBeforeSync = true;
sync.interval = "02:00";
scrub.interval = "04:00";
extraConfig = ''
autosave 5000
'';
parityFiles = [
"/mnt/disks/parity/snapraid.parity"
];
dataDisks = {
d1 = "/mnt/disks/disk1/";
d2 = "/mnt/disks/disk2/";
d3 = "/mnt/disks/seedbox/";
};
exclude = [
"/tmp/"
"/lost+found/"
"/multimedia/downloads/"
"/backups/"
"/glue/Spankbank/unorganized/chaturbate/"
"/nextcloud/nextcloud.log"
"/seeding/"
"/.Trash-1000/"
];
contentFiles = [
"/var/snapraid.content"
"/mnt/snapraid/disk1/snapraid.content"
"/mnt/snapraid/disk2/snapraid.content"
];
};
# snapraid = {
# enable = true;
# touchBeforeSync = true;
# sync.interval = "02:00";
# scrub.interval = "04:00";
# extraConfig = ''
# autosave 5000
# # blocksize 128
# '';
# parityFiles = [
# "/mnt/disks/parity/snapraid.parity"
# ];
# dataDisks = {
# d1 = "/mnt/disks/disk1/";
# d2 = "/mnt/disks/disk2/";
# d3 = "/mnt/disks/seedbox/";
# };
# exclude = [
# "/tmp/"
# "/lost+found/"
# "/multimedia/downloads/"
# "/backups/"
# "/glue/Spankbank/unorganized/chaturbate/"
# "/nextcloud/nextcloud.log"
# "/seeding/"
# "/.Trash-1000/"
# ];
# contentFiles = [
# "/var/snapraid.content"
# "/mnt/snapraid/disk1/snapraid.content"
# "/mnt/snapraid/disk2/snapraid.content"
# ];
# };
#+end_src
* PROGRAMS
@ -858,8 +857,7 @@ services = {
enable = true;
fileSystems = [
"/"
"/mnt/disks/disk1"
"/mnt/disks/disk2"
"/mnt/pool"
];
};
samba-wsdd.enable = true;

View File

@ -26,6 +26,10 @@
device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771";
preLVM = true;
};
disk3 = {
device = "/dev/disk/by-uuid/8cd728f6-0d5b-4cea-8f7d-01aad11192c1";
preLVM = true;
};
hnbox = {
device = "/dev/disk/by-uuid/c7dd2d5a-b0b3-46a0-aca9-3d4975c1f0bc";
preLVM = true;
@ -78,19 +82,8 @@
"datacow"
];
};
"/mnt/disks/disk1" = {
device = "/dev/mapper/disk1";
fsType = "btrfs";
options = [
"subvol=@data"
"compress=zstd:3"
"space_cache=v2"
"commit=120"
"datacow"
];
};
"/mnt/disks/disk2" = {
device = "/dev/mapper/disk2";
"/mnt/pool" = {
device = "/dev/disk/by-uuid/1e7cf787-e34d-4e3e-ac3c-0c07309dbd34";
fsType = "btrfs";
options = [
"subvol=@data"
@ -111,11 +104,6 @@
"datacow"
];
};
"/mnt/disks/parity" = {
device = "/dev/disk/by-uuid/2e437a79-a246-411b-ac21-d03414b14305";
fsType = "ext4";
options = [ "defaults" ];
};
"/mnt/disks/hnbox" = {
device = "/dev/mapper/hnbox";
fsType = "btrfs";
@ -129,88 +117,15 @@
device = "/dev/disk/by-uuid/CBE7-5DEB";
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
"/var/lib/nextcloud/data" = {
device = "/mnt/pool/nextcloud";
options = [ "bind" ];
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
"/mnt/jellyfin/external" = {
device = "/mnt/disks/seedbox/external";
device = "/mnt/disks/nvme";
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
@ -224,13 +139,8 @@
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
"/mnt/jellyfin/workout" = {
device = "/mnt/disks/seedbox/other/P90x.Mega.Pack";
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
# NFS
"/export/pool" = {
"/export/pool_nfs" = {
device = "/mnt/pool";
options = [ "bind" ];
depends = [ "/mnt/pool" ];
@ -250,10 +160,10 @@
server = {
enable = true;
exports = ''
/export workstation(rw,fsid=0,no_subtree_check)
/export/jawz 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 workstation(rw,fsid=0,no_subtree_check)
/export/jawz workstation(rw,nohide,insecure,no_subtree_check)
/export/seedbox workstation(rw,nohide,insecure,no_subtree_check)
/export/pool_nfs workstation(rw,nohide,insecure,no_subtree_check,async,no_root_squash,fsid=1)
'';
};
};