diff --git a/ansible/group_vars/NAS/NAS b/ansible/group_vars/NAS/NAS index 0c0eb5a..82df5cb 100644 --- a/ansible/group_vars/NAS/NAS +++ b/ansible/group_vars/NAS/NAS @@ -6,8 +6,8 @@ nas_bind_source: - /data/data1/nomad - /data/data1/music - /data/data1/download -# - /data/data2/serie -# - /data/data3/film + - /data/data2/serie + - /data/data3/film - /data/data1/photo - /data/data1/homes - /data/data1/ebook diff --git a/ansible/group_vars/NAS/nfs b/ansible/group_vars/NAS/nfs index 5e416e3..02959dd 100644 --- a/ansible/group_vars/NAS/nfs +++ b/ansible/group_vars/NAS/nfs @@ -8,8 +8,8 @@ nfs_exports: - "{{ nas_bind_target }}/nomad {{nfs_cluster_list}}" - "{{ nas_bind_target }}/download {{nfs_cluster_list}}" - "{{ nas_bind_target }}/music {{nfs_cluster_list}}" -# - "{{ nas_bind_target }}/film {{nfs_cluster_list}}" -# - "{{ nas_bind_target }}/serie {{nfs_cluster_list}}" + - "{{ nas_bind_target }}/film {{nfs_cluster_list}}" + - "{{ nas_bind_target }}/serie {{nfs_cluster_list}}" - "{{ nas_bind_target }}/photo {{nfs_cluster_list}}" - "{{ nas_bind_target }}/homes {{nfs_cluster_list}}" - "{{ nas_bind_target }}/ebook {{nfs_cluster_list}}" diff --git a/ansible/group_vars/NAS/samba b/ansible/group_vars/NAS/samba index 05ed89c..9e5666c 100644 --- a/ansible/group_vars/NAS/samba +++ b/ansible/group_vars/NAS/samba @@ -1,10 +1,15 @@ samba_passdb_backend: tdbsam samba_shares_root: /exports samba_shares: -# - name: media -# comment: "media" -# write_list: "@NAS_media" -# browseable: true + - name: film + comment: "film" + write_list: "@NAS_film" + browseable: true + - name: serie + comment: "serie" + write_list: "@NAS_serie" + browseable: true + - name: ebook comment: "ebook" write_list: "@NAS_ebook" @@ -17,6 +22,9 @@ samba_shares: comment: "photo" write_list: "@NAS_photo" browseable: true - + - name: download + comment: "downlaod" + write_list: "@NAS_download" + browseable: true samba_load_homes: True samba_homes_include: samba_homes_include.conf diff --git a/ansible/group_vars/cluster/mount b/ansible/group_vars/cluster/mount index 277b29d..c83a695 100644 --- a/ansible/group_vars/cluster/mount +++ b/ansible/group_vars/cluster/mount @@ -23,14 +23,23 @@ systemd_mounts: - " " automount: "{{ env_automount }}" enabled: true - diskstation_media: - share: "{{ nas_ip }}:{{ env_media_nfs_path }}/media" - mount: /mnt/diskstation/media + diskstation_serie: + share: "{{ nas_ip }}:{{ env_default_nfs_path }}/serie" + mount: /mnt/diskstation/serie type: nfs options: - " " automount: "{{ env_automount }}" enabled: true + diskstation_film: + share: "{{ nas_ip }}:{{ env_default_nfs_path }}/film" + mount: /mnt/diskstation/film + type: nfs + options: + - " " + automount: "{{ env_automount }}" + enabled: true + diskstation_ebook: share: "{{ nas_ip }}:{{ env_default_nfs_path }}/ebook" mount: /mnt/diskstation/ebook @@ -47,3 +56,11 @@ systemd_mounts: - " " automount: "{{ env_automount }}" enabled: true + diskstation_download: + share: "{{ nas_ip }}:{{ env_default_nfs_path }}/download" + mount: /mnt/diskstation/download + type: nfs + options: + - " " + automount: "{{ env_automount }}" + enabled: true diff --git a/ansible/group_vars/production b/ansible/group_vars/production index 45a802c..7527950 100644 --- a/ansible/group_vars/production +++ b/ansible/group_vars/production @@ -7,7 +7,7 @@ nomad_client_meta: - name: "env" value: "production" vault_unseal_keys_dir_output: "~/vaultUnseal/production" -env_default_nfs_path: "/volume2" +env_default_nfs_path: "/exports" env_media_nfs_path: "/volume1" env_automount: true -nas_ip: "192.168.1.10" +nas_ip: "192.168.1.43" diff --git a/docs/ADR/005-NAS.md b/docs/ADR/005-NAS.md index ab9e049..d41f392 100644 --- a/docs/ADR/005-NAS.md +++ b/docs/ADR/005-NAS.md @@ -16,11 +16,27 @@ Storage: - hot Data (nomad, document,fresh download file,music?) on SSD cold DATA on HDD (film, serie photo) - at least 2 HDD and 2 SSD + + Hardware: - network 2.5 gpbs will be good for evolve -- at least 4go ram +- at least 4go ram (expansive will be appreciable) Software: be able to install custom linux distrib + +### Decision + +- Due to form factor/consumption and SSD capability my choise is on ASUSTOR Nimbustor 2 Gen 2 AS5402, he corresponding to need and less expensive than a DIY NAS +- buy only a new ssd of 2to in more to store system and hot data + +### Cosequence + +need to migrate Data and keep same disk + +- install system +- copy all data from 2to HDD to SSD then format 2to HDD +- copy download data to FROM 4 to HDD to SSD +- copy serie to 2to HDD and copy film on external harddrive diff --git a/nomad-job/batch-seedboxsync.nomad b/nomad-job/batch-seedboxsync.nomad index e905e59..1a758a7 100644 --- a/nomad-job/batch-seedboxsync.nomad +++ b/nomad-job/batch-seedboxsync.nomad @@ -34,7 +34,7 @@ job "batch-seedboxsync" { config { image = "ducampsv/rsync:latest" volumes = [ - "/mnt/diskstation/media/download:/media", + "/mnt/diskstation/download:/media", "local/id_rsa:/home/rsyncuser/.ssh/id_rsa" ] command = "rsync" diff --git a/nomad-job/borgmatic.nomad b/nomad-job/borgmatic.nomad index 0f7e76b..50a9c90 100644 --- a/nomad-job/borgmatic.nomad +++ b/nomad-job/borgmatic.nomad @@ -22,7 +22,7 @@ job "borgmatic" { config { image = "ghcr.io/borgmatic-collective/borgmatic" volumes = [ - "/exports:/volume1", + "/exports:/exports", "local/borgmatic.d:/etc/borgmatic.d", "secret/id_rsa:/root/.ssh/id_rsa", "/exports/nomad/borgmatic:/root/.cache/borg", @@ -44,8 +44,8 @@ BORG_PASSPHRASE= {{.Data.data.passphrase}} } template { data= <