Skip to content

Commit

Permalink
add archive/ and .cache/thumbnails ZFS and ceph filesystems
Browse files Browse the repository at this point in the history
Only mgmt hosts get pi:/pi/boot

Only desktops get user filesystems
  • Loading branch information
spacelama committed Jan 2, 2025
1 parent 02876f9 commit dc60721
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
10 changes: 5 additions & 5 deletions templates/etc/auto.nas.j2
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% if inventory_hostname != 'fs' %}
{% if host_is_desktop | default(false) %}
/home/tconnors/p -hard,noacl,nodev,nosuid,rw,strictatime,actimeo=600,async fs:/home/tconnors/p
/home/tconnors/.mp3.low_qual -hard,noacl,nodev,nosuid,rw,strictatime,async fs:/home/tconnors/.mp3.low_qual
/home/tconnors/background -hard,noacl,nodev,nosuid,rw,strictatime,async fs:/home/tconnors/background
/home/tconnors/not_backed_up.tank -hard,noacl,nodev,nosuid,rw,strictatime,async fs:/home/tconnors/not_backed_up.tank
/home/tconnors/oppo -hard,noacl,nodev,nosuid,rw,strictatime,async fs:/home/tconnors/oppo
/home/tconnors/pixel -hard,noacl,nodev,nosuid,rw,strictatime,async fs:/home/tconnors/pixel
/home/tconnors/archive -hard,noacl,nodev,nosuid,rw,strictatime,async fs:/home/tconnors/archive
{% endif %}
{# FIXME: make /var/cache/apt/archives symlink for those that can contact fs #}
/var/cache/apt/archives.nfs -hard,noacl,nodev,nosuid,rw,strictatime,async fs:/var/cache/apt/archives
{% endif %}

{% if inventory_hostname != 'pi' %}
{% if (inventory_hostname != 'pi') and (host_is_mgmt | default(false)) %}
/pi/boot -hard,noacl,nodev,nosuid,rw,strictatime,async pi:/pi/boot
{% endif %}

Expand All @@ -30,6 +30,6 @@
{# FIXME: might need wsize and rsize to not run out memory with mount/umount cycles: https://www.spinics.net/lists/ceph-users/msg60621.html #}
{% if mount_ceph_clients | default(false) %}
{% for mount in ceph_client_mounts %}
{{ mount.mount }} -fstype=ceph,name={{ mount.name }},mds_namespace={{ mount.mds_namespace }},{{ mount.options }} {{ mount.mons }}:{{ mount.remote_path }}
{{ mount.mount }} -fstype=ceph,name={{ mount.name }},mds_namespace={{ mount.mds_namespace }},{{ mount.options }} {{ mount.mons }}:{{ mount.remote_path }}
{% endfor %}
{% endif %}
19 changes: 10 additions & 9 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@
# ssh pve1 "sudo env ceph fs authorize cephfs-hdd client.cephfs-hdd.template /template rw" > ~/Ansible/files/etc/ceph/ceph.client.cephfs-hdd.template.keyring
# ssh pve1 "sudo env ceph fs authorize cephfs-hdd client.cephfs-hdd.media /mounts/media rw" > ~/Ansible/files/etc/ceph/ceph.client.cephfs-hdd.media.keyring
# original creation was done with `add-ceph-mount` before we ansibilised this
- { mount: "/home/tconnors/photos", name: "cephfs-hdd.fs", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/fs/home.tconnors.photos" }
- { mount: "/home/tconnors/thesis", name: "cephfs-hdd.fs", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/fs/home.tconnors.thesis" }
- { mount: "/home/tconnors/not_backed_up", name: "cephfs-hdd.fs", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/fs/home.tconnors.not_backed_up" }
- { mount: "/home/tconnors/photos", name: "cephfs-hdd.fs", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/fs/home.tconnors.photos" }
- { mount: "/home/tconnors/thesis", name: "cephfs-hdd.fs", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/fs/home.tconnors.thesis" }
- { mount: "/home/tconnors/not_backed_up", name: "cephfs-hdd.fs", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/fs/home.tconnors.not_backed_up" }
# want the following to be accessible everywhere, not just ceph clients, so for now needs to remain NFS exported (maybe fs could re-export it?)
# - { mount: "/var/cache/apt/archives.nfs", name: "cephfs-hdd.fs", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/fs/var.cache.apt.archives" }
- { mount: "/home/tconnors/public_html", name: "cephfs-slow.webserver", mds_namespace: "cephfs-slow", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/webserver/home.tconnors/public_html" }
- { mount: "/home/tconnors/movies", name: "cephfs-hdd.media", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/movies" }
- { mount: "/home/tconnors/qBT_dir", name: "cephfs-hdd.media", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/qBT_dir" }
- { mount: "/home/tconnors/mp3", name: "cephfs-slow.media", mds_namespace: "cephfs-slow", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/mp3" }
- { mount: "/home/angela/media", name: "cephfs-hdd.media", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/angela" }
- { mount: "/mnt/pve/cephfs-hdd/template", name: "cephfs-hdd.template", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/template" }
- { mount: "/home/tconnors/public_html", name: "cephfs-slow.webserver", mds_namespace: "cephfs-slow", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/webserver/home.tconnors/public_html" }
- { mount: "/home/tconnors/movies", name: "cephfs-hdd.media", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/movies" }
- { mount: "/home/tconnors/qBT_dir", name: "cephfs-hdd.media", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/qBT_dir" }
- { mount: "/home/tconnors/mp3", name: "cephfs-slow.media", mds_namespace: "cephfs-slow", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/mp3" }
- { mount: "/home/tconnors/.cache/thumbnails", name: "cephfs-slow.media", mds_namespace: "cephfs-slow", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/.cache/thumbnails" }
- { mount: "/home/angela/media", name: "cephfs-hdd.media", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/mounts/media/angela" }
- { mount: "/mnt/pve/cephfs-hdd/template", name: "cephfs-hdd.template", mds_namespace: "cephfs-hdd", options: "nodev,nosuid,rw,strictatime,async", mons: "192.168.1.6,192.168.1.7,192.168.1.8", remote_path: "/template" }

pve_users:
- "{{ lookup('file', 'main.pve_users.passwd') }}"
Expand Down

0 comments on commit dc60721

Please sign in to comment.