some progress on disk encryption and btrfs
parent
7f6720185f
commit
7825adce0b
12
hosts.yml
12
hosts.yml
|
@ -54,6 +54,12 @@ all:
|
||||||
fstype: "none"
|
fstype: "none"
|
||||||
opts: "bind"
|
opts: "bind"
|
||||||
passno: "0"
|
passno: "0"
|
||||||
|
- path: "/mnt/btr_pool"
|
||||||
|
src: "/dev/mapper/disk0"
|
||||||
|
fstype: "btrfs"
|
||||||
|
opts: "subvolid=5,noatime"
|
||||||
|
passno: "0"
|
||||||
|
|
||||||
rpi_cfg:
|
rpi_cfg:
|
||||||
- "enable_uart=1"
|
- "enable_uart=1"
|
||||||
- "otg_mode=1"
|
- "otg_mode=1"
|
||||||
|
@ -61,9 +67,13 @@ all:
|
||||||
- name: "WDC WDS400T1R0A"
|
- name: "WDC WDS400T1R0A"
|
||||||
target: "disk0"
|
target: "disk0"
|
||||||
source_uuid: "202c924c-ee53-4321-9efd-1f776e939702"
|
source_uuid: "202c924c-ee53-4321-9efd-1f776e939702"
|
||||||
|
key: "/luks_key.asc:gpg"
|
||||||
|
remdev: "/dev/mmcblk0p2"
|
||||||
- name: "Samsung SSD 870"
|
- name: "Samsung SSD 870"
|
||||||
target: "disk1"
|
target: "disk1"
|
||||||
source_uuid: "a243ac31-094c-4fe2-bced-6e4311a16487"
|
source_uuid: "247ea237-54ce-45d2-9974-04344c06aba4"
|
||||||
|
key: "/luks_key.asc:gpg"
|
||||||
|
remdev: "/dev/mmcblk0p2"
|
||||||
|
|
||||||
caladan:
|
caladan:
|
||||||
ansible_host: caladan
|
ansible_host: caladan
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
name="btrfs-scan"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
before localmount
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
/sbin/btrfs device scan
|
||||||
|
}
|
|
@ -31,3 +31,20 @@
|
||||||
name: dmcrypt
|
name: dmcrypt
|
||||||
enabled: true
|
enabled: true
|
||||||
runlevel: boot
|
runlevel: boot
|
||||||
|
|
||||||
|
- name: copy btrfs-scan init script
|
||||||
|
copy:
|
||||||
|
dest: /etc/init.d/btrfs-scan
|
||||||
|
src: btrfs-scan
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: add btrfs-scan init script to lbu
|
||||||
|
lbu:
|
||||||
|
include: /etc/init.d/btrfs-scan
|
||||||
|
when: use_lbu
|
||||||
|
|
||||||
|
- name: enable btrfs-scan at boot
|
||||||
|
service:
|
||||||
|
name: btrfs-scan
|
||||||
|
enabled: true
|
||||||
|
runlevel: boot
|
||||||
|
|
|
@ -3,5 +3,9 @@
|
||||||
# {{ entry.name }}
|
# {{ entry.name }}
|
||||||
target='{{ entry.target }}'
|
target='{{ entry.target }}'
|
||||||
source='/dev/disk/by-uuid/{{ entry.source_uuid }}'
|
source='/dev/disk/by-uuid/{{ entry.source_uuid }}'
|
||||||
|
{% if entry.key is defined %}key={{ entry.key }}
|
||||||
|
{% endif %}
|
||||||
|
{% if entry.remdev is defined %}remdev={{ entry.remdev }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue