Add iscsi role and docs

Since iscsi supports luks + btrfs over the network and makes for an
amazing networked backup drive we should include that in our default
config.
This commit is contained in:
ducoterra
2022-02-04 13:50:42 -05:00
parent dca1e8522f
commit 0532a8157a
11 changed files with 172 additions and 1 deletions

View File

@@ -65,9 +65,13 @@ btrfs send -p $SNAPSHOT_DIR/$LATEST $SNAPSHOT_DIR/$SNAPSHOT_NAME | btrfs receive
find /.snapshots -maxdepth 1 -type d -not -path /.snapshots -exec sudo btrfs subvolume delete {} \;
```
# Luks
## Luks
```bash
# Create an encrypted drive
sudo cryptsetup luksFormat
# LUKS Disk Encryption can use up to 8 key slots to store passwords. We can use these keys to auto mount LUKS device.
# cryptsetup luksDump /dev/sda
@@ -101,3 +105,18 @@ sudo cryptsetup luksOpen /dev/disk/by-uuid/1d7ce570-e695-47a0-9dda-5f14b5b20e21
# close (or fix issues)
sudo cryptsetup luksClose backup0
```
## ISCSI
```bash
# Login to portal
sudo iscsiadm -m discovery -t sendtargets -p freenas.dnet
# Mount all targets
sudo iscsiadm -m node -l
# Mount at boot
vim /etc/iscsi/nodes/iqn.2022-02.freenas.dnet:manjaro-backup/10.1.2.200,3260,1
node.startup = automatic
```