37 lines
1.3 KiB
Markdown
37 lines
1.3 KiB
Markdown
|
|
## iscsi
|
|
|
|
``` bash
|
|
root@pbs:~# cat /etc/iscsi/initiatorname.iscsi
|
|
## DO NOT EDIT OR REMOVE THIS FILE!
|
|
## If you remove this file, the iSCSI daemon will not start.
|
|
## If you change the InitiatorName, existing access control lists
|
|
## may reject this initiator. The InitiatorName must be unique
|
|
## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
|
|
InitiatorName=iqn.1993-08.org.debian:01:ab2a867f97fd
|
|
```
|
|
|
|
|
|
12464540151729500892
|
|
|
|
|
|
```bash
|
|
root@pbs:~# systemctl list-units --all --full | grep disk | grep 192.168.1.11 | egrep -v "*part"
|
|
grep: warning: * at start of expression
|
|
dev-disk-by\x2dpath-ip\x2d192.168.1.11:3260\x2discsi\x2diqn.2005\x2d10.org.freenas.ctl:pbs\x2dstore\x2dlun\x2d0.device loaded active plugged iSCSI_Disk
|
|
```
|
|
|
|
|
|
```bash
|
|
cat << 'EOF' > /etc/systemd/system/pbsbks-pool.service
|
|
[Unit]
|
|
After=dev-disk-by\x2dpath-ip\x2d192.168.1.11:3260\x2discsi\x2diqn.2005\x2d10.org.freenas.ctl:pbs\x2dstore\x2dlun\x2d0.device
|
|
|
|
[Service]
|
|
ExecStart=/usr/sbin/zpool import backups
|
|
ExecStartPost=/usr/bin/logger "started ZFS pool backups"
|
|
|
|
[Install]
|
|
WantedBy=dev-disk-by\x2dpath-ip\x2d192.168.1.11:3260\x2discsi\x2diqn.2005\x2d10.org.freenas.ctl:pbs\x2dstore\x2dlun\x2d0.device
|
|
EOF
|
|
``` |