Skip to content

Commit ae33b48

Browse files
committed
As well as hdd/fs/not_backed_up, also create an ssd/fs/not_backed_up
1 parent 0e2835c commit ae33b48

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

files/etc/ceph/README.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
We authorize the mount, and then copy the keyring files to files/etc/ceph, and also populate keyring files in mount_ceph_clients in vars/main.yaml
2+
3+
ssh $node "sudo env ceph fs authorize '$mount' client.$user $remotepathauth $rwro" > ~/Ansible/files/etc/ceph/ceph.client.$user.keyring
4+
eg:
5+
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
6+
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
7+
8+
Original creation was done with `add-ceph-mount` before we ansibilised this
9+
10+
We could probably further ansiblise this - the resultant authorisation is set by the files in pve:/etc/pve/priv/ceph/*.secret, *.keyring

vars/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
# original creation was done with `add-ceph-mount` before we ansibilised this
5050
- { 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" }
5151
- { 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" }
52-
- { 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" }
53-
# 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?)
52+
- { mount: "/home/tconnors/not_backed_up.hdd", 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" }
53+
- { mount: "/home/tconnors/not_backed_up.ssd", name: "cephfs-slow.fs", 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/fs/home.tconnors.not_backed_up" }
54+
# 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, taking special care of automount dependencies?)
5455
# - { 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" }
5556
- { 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" }
5657
- { 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" }
@@ -322,6 +323,7 @@
322323
- { name: /etc/modprobe.d/ansible-custom.conf, source: etc/modprobe.d/ansible-custom.conf.j2 }
323324

324325
- { source: etc/ceph/ceph.client.cephfs-hdd.fs.keyring, name: /etc/ceph/, mode: "0600", when: '{{ mount_ceph_clients is defined }}' }
326+
- { source: etc/ceph/ceph.client.cephfs-slow.fs.keyring, name: /etc/ceph/, mode: "0600", when: '{{ mount_ceph_clients is defined }}' }
325327
- { source: etc/ceph/ceph.client.cephfs-slow.webserver.keyring, name: /etc/ceph/, mode: "0600", when: '{{ mount_ceph_clients is defined }}' }
326328
- { source: etc/ceph/ceph.client.cephfs-hdd.media.keyring, name: /etc/ceph/, mode: "0600", when: '{{ mount_ceph_clients is defined }}' }
327329
- { source: etc/ceph/ceph.client.cephfs-hdd.template.keyring, name: /etc/ceph/, mode: "0600", when: '{{ mount_ceph_clients is defined }}' }

0 commit comments

Comments
 (0)