changeset 290:828d3f4da54b

rpi iscsi volumes
author drewp@bigasterisk.com
date Sun, 21 Apr 2024 17:09:10 -0700
parents 65e28d2e0cd8
children 72cc38fe3973
files dns.py
diffstat 1 files changed, 0 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/dns.py	Sun Apr 21 17:07:23 2024 -0700
+++ b/dns.py	Sun Apr 21 17:09:10 2024 -0700
@@ -53,27 +53,6 @@
 
 def rpi_net_boot():
     files.directory(path='/opt/dnsmasq/tftp')
-    for pi_serial, _ in pi_serial_hostname:
-        files.directory(path=f'/opt/dnsmasq/tftp/{pi_serial}')
-        # then we transfer from pi to here
-
-
-def rpi_iscsi_volumes():
-    iscsi_dir = '/d2/rpi-iscsi'
-    for _, pi_hostname in pi_serial_hostname:
-        out = f'{iscsi_dir}/{pi_hostname}.disk'
-        files.directory(path=iscsi_dir)
-        server.shell(f'dd if=/dev/zero of={out} count=0 bs=1 seek=5G conv=excl || true')
-        files.put(dest=f"/etc/tgt/conf.d/{pi_hostname}.conf",
-                  src=StringIO(f"""
-<target iqn.2024-03.com.bigasterisk:{pi_hostname}.target>
-    backing-store {out}
-    initiator-name iqn.2024-03.com.bigasterisk:{pi_hostname}.initiator
-</target> 
-                            """))
-    # restarting is disruptive to connected pis, and they might need to be
-    # visited:
-    #systemd.service(service='tgt.service', running=True, restarted=True)
 
 
 standard_host_dns()
@@ -86,8 +65,6 @@
 
     dnsmasq_instance('10.5', house_iface='unused', dhcp_range='unused',
                      listen_address='unused')  # only works after wireguard is up
-elif host.name == 'ditto':
-    rpi_iscsi_volumes()  # move out of this file- it's not dns
 # move out of this file- it's not dns
 if host.name == 'pipe':
     rpi_net_boot()