mergerfs migration server/scripts

This commit is contained in:
2023-10-01 15:51:36 -06:00
parent 4226d0b422
commit 2b022b59e6
2 changed files with 135 additions and 72 deletions

View File

@@ -78,7 +78,7 @@
"datacow"
];
};
"/mnt/disk1" = {
"/mnt/disks/disk1" = {
device = "/dev/mapper/disk1";
fsType = "btrfs";
options = [
@@ -89,7 +89,7 @@
"datacow"
];
};
"/mnt/disk2" = {
"/mnt/disks/disk2" = {
device = "/dev/mapper/disk2";
fsType = "btrfs";
options = [
@@ -100,7 +100,7 @@
"datacow"
];
};
"/mnt/seedbox" = {
"/mnt/disks/seedbox" = {
device = "/dev/mapper/seedbox";
fsType = "btrfs";
options = [
@@ -111,12 +111,12 @@
"datacow"
];
};
"/mnt/parity" = {
"/mnt/disks/parity" = {
device = "/dev/disk/by-uuid/2e437a79-a246-411b-ac21-d03414b14305";
fsType = "ext4";
options = [ "defaults" ];
};
"/mnt/hnbox" = {
"/mnt/disks/hnbox" = {
device = "/dev/mapper/hnbox";
fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
@@ -129,10 +129,34 @@
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/disk1/nextcloud";
device = "/mnt/pool/nextcloud";
options = [ "bind" ];
depends = [ "/mnt/pool" ];
};
# BTRFS SNAPER
"/mnt/btrfs/disk1" = {
@@ -150,39 +174,76 @@
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/seedbox/external";
device = "/mnt/disks/seedbox/external";
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
"/mnt/jellyfin/media" = {
device = "/mnt/disk1/multimedia/media";
device = "/mnt/pool/multimedia/media";
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
"/mnt/jellyfin/tutorials" = {
device = "/mnt/disk2/tutorials";
device = "/mnt/pool/tutorials";
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
"/mnt/jellyfin/workout" = {
device = "/mnt/seedbox/other/P90x.Mega.Pack";
device = "/mnt/disks/seedbox/other/P90x.Mega.Pack";
options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ];
};
# NFS
"/export/disk1" = {
device = "/mnt/disk1";
options = [ "bind" ];
};
"/export/disk2" = {
device = "/mnt/disk2";
options = [ "bind" ];
};
"/export/seedbox" = {
device = "/mnt/seedbox";
"/export/pool" = {
device = "/mnt/pool";
options = [ "bind" ];
depends = [ "/mnt/pool" ];
};
"/export/jawz" = {
device = "/home/jawz";
options = [ "bind" ];
depends = [ "/mnt/pool" ];
};
"/export/seedbox" = {
device = "/mnt/disks/seedbox";
options = [ "bind" ];
depends = [ "/mnt/disks/seedbox" ];
};
};
services.nfs = {
@@ -190,10 +251,9 @@
enable = true;
exports = ''
/export workstation(rw,fsid=0,no_subtree_check)
/export/disk1 workstation(rw,nohide,insecure,no_subtree_check)
/export/disk2 workstation(rw,nohide,insecure,no_subtree_check)
/export/seedbox 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/pool workstation(rw,nohide,insecure,no_subtree_check)
'';
};
};