forked from alicefr/targetcli-containers
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These are tweaks we worked on together to get iSCSI booting working. I didn't reflect the changes back in the main README. Will let you do that. :) For posterity, notes on some of the things we changed: - delete `saveconfig.json`; we recreate the config imperatively from scratch each time for more clarity - put `targetcli_script` in `/usr/local/bin`; we can't write files directly in `/` - drop the virtiofs mount unit; we rely on cosa to do that (this assumes then that we're running this from a cosa workdir, likely we'll want to make this more generic in the future) - order against `target.service`, not `target.container`; the latter is just an input file to the quadlet generator and is foreign to systemd - add `ConditionFirstBoot=true` since we only need to set up the iSCSI target on first boot - move `network-online.target` ordering to `[Unit]` section - make all the `targetcli` commands run in the same `podman exec` invocation - cargo-cult a bunch more ACL-related targetcli settings
- Loading branch information
1 parent
b26fe64
commit cdcc195
Showing
5 changed files
with
18 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
|
||
podman exec target targetcli /backstores/fileio create coreos /fcos.raw | ||
podman exec target targetcli iscsi/ create iqn.2023-10.coreos.target.vm:coreos | ||
podman exec target targetcli iscsi/iqn.2023-10.coreos.target.vm:coreos/tpg1/ set attribute authentication=0 | ||
podman exec target targetcli iscsi/iqn.2023-10.coreos.target.vm:coreos/tpg1/luns create /backstores/fileio/coreos | ||
podman exec target bash -exc " | ||
targetcli /backstores/fileio create coreos /var/mnt/workdir-tmp/fcos.raw | ||
targetcli iscsi/ create iqn.2023-10.coreos.target.vm:coreos | ||
targetcli iscsi/iqn.2023-10.coreos.target.vm:coreos/tpg1/luns create /backstores/fileio/coreos | ||
targetcli iscsi/iqn.2023-10.coreos.target.vm:coreos/tpg1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 | ||
" | ||
|
This file was deleted.
Oops, something went wrong.