finalize Nas data migration

This commit is contained in:
vincent 2024-02-24 17:11:12 +01:00
parent f32c0d1e40
commit f207be7d7d
9 changed files with 70 additions and 29 deletions

View File

@ -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

View File

@ -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}}"

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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= <<EOH
0 2 * * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic --create --prune -v 1
0 23 1 * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic -check
0 2 * * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic create prune --verbosity 1
0 23 1 * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic check
EOH
destination = "local/borgmatic.d/crontab.txt"
}
@ -55,14 +55,11 @@ location:
# List of source directories to backup (required). Globs and
# tildes are expanded. Do not backslash spaces in path names.
source_directories:
- /volume1/CardDav
- /volume1/ebook
- /volume1/git
- /volume1/homes
- /volume1/hubert
- /volume1/music
- /volume1/nomad
- /volume1/photo
- /exports/ebook
- /exports/homes
- /exports/music
- /exports/nomad
- /exports/photo
repositories:
- u304977@u304977.your-storagebox.de:{{if eq "production" (env "meta.env") }}backup_hamelab{{else}}backup_homelab_dev{{end}}
@ -212,6 +209,7 @@ consistency:
}
resources {
memory = 300
memory_max = 1000
}
}

View File

@ -93,8 +93,10 @@ job "jellyfin" {
volumes = [
"/mnt/diskstation/nomad/jellyfin/config:/config",
"/mnt/diskstation/nomad/jellyfin/cache:/cache",
"/mnt/diskstation/media/:/media",
"/mnt/diskstation/music/:/media2"
"/mnt/diskstation/film:/film",
"/mnt/diskstation/serie:/serie",
"/mnt/diskstation/music:/music",
"/mnt/diskstation/download/:/download"
]
devices = [
{