blob: 5a92b2e66b69f39df056299f8a6fe260e6f5b38d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Misc scraps.
Note you may need to increase systemds loglevel
```
journalctl --pager-end --unit networkd-dispatcher.service
```
# FREEBSD SCRAPS
```shell
08:21 <+stgraber> feurig: I believe I made a video about it an MAAS some time ago
08:21 <+stgraber> feurig: anyway, it's basically:
08:22 <+stgraber> lxc init my-pxe --empty --vm
08:22 <+stgraber> lxc config device override my-pxe eth0 boot.priority=10
08:22 <+stgraber> lxc start my-pxe --console=vga
08:22 <+stgraber> the boot.priority step is to have QEMU prefer network boot over local disk
08:23 <+stgraber> you may also want to grow the root disk depending on your needs: lxc config device override my-pxe root size=50GiB
```
# pure config is out of scope of this note
# setting up pure -> freebsd
# /etc/rc.conf.local
iscsid_enable="YES"
iscsictl_enable="YES"
iscsictl_flags="-Aa"
# grab rc.d file from zfs-backup2:/etc/rc.d/zpool_iscsi
# so system will try to import zpool after iscsi has settled
zpool_iscsi_enable="YES"
# /etc/iscsi.conf
pure01-ct0-1 {
TargetAddress = pure01-ct0-1.evergreen.laika.com
SessionType = Discovery
InitiatorName = iqn.2005-06.com.laika:freebsd-hostname.evergreen.laika.com
}
pure01-ct0-2 {
TargetAddress = pure01-ct0-2.evergreen.laika.com
SessionType = Discovery
InitiatorName = iqn.2005-06.com.laika:freebsd-hostname.evergreen.laika.com
}
pure01-ct1-1 {
TargetAddress = pure01-ct1-1.evergreen.laika.com
SessionType = Discovery
InitiatorName = iqn.2005-06.com.laika:freebsd-hostname.evergreen.laika.com
}
pure01-ct1-2 {
TargetAddress = pure01-ct1-2.evergreen.laika.com
SessionType = Discovery
InitiatorName = iqn.2005-06.com.laika:freebsd-hostname.evergreen.laika.com
}
service iscsid start
service iscsictl start
# view iscsi luns
iscsictl -L
# remove luns
iscsictl -Ra
# add luns
icsictl -Aa
# freebsd initiator doesn't handle multipath.
# The geom_multipath kernel module does
# create multipath device
kldload geom_multipath
# make it survive a reboot
echo geom_multipath_load="YES" >> /boot/loader.conf
#
gmultipath label mp0 da4 da5 da6 da7
# now you can create a zpool using the mp0 device
zpool create zjail multipath/mp0
zfs set mountpoint=/jails zjail
zpool set autotrim=on zroot
zfs set compression=off zjail
|