Skip to content
Snippets Groups Projects
Unverified Commit 2d3b3b7f authored by anarcat's avatar anarcat
Browse files

expand on host groups creation

parent 4b61394e
No related branches found
No related tags found
No related merge requests found
......@@ -223,6 +223,16 @@ Then rebuild grub:
update-grub
### iSCSI access
Make sure the node has access to the iSCSI cluster. For this, you need
to add the node on the SANs, using `SMcli`, using this magic script:
create host userLabel="chi-node-0X" hostType=1 hostGroup="gnt-chi";
create iscsiInitiator iscsiName="iqn.1993-08.org.debian:01:chi-node-04" userLabel="chi-node-0X-iscsi" host="chi-node-0X";
See the [storage servers](#storage-servers) section for more information.
## SSH RACDM access
Note: this might already be enabled. Try to connect to the host over
......@@ -765,21 +775,43 @@ Details (like speed in RPMs) can also be seen with:
### Adding a host
Create a host group, a host inside it, and its matching iSCSI initiator:
The existing machines in the `gnt-chi` cluster were all added at once,
alongside a group, with this script:
create hostGroup userLabel="stor01-raid10-1";
create host userLabel="chi-node-01" hostType=1 hostGroup="stor01-raid10-1";
create iscsiInitiator iscsiName="iqn.2005-03.org.open-iscsi:c1ec2e02a4a" userLabel="chi-node-01-iscsi" host="chi-node-01";
show "Creating Host Group gnt-chi.";
create hostGroup userLabel="gnt-chi";
Only the last two lines are necessary if the group already exists, naturally.
show "Creating Host chi-node-01 with Host Type Index 1 (Linux) on Host Group gnt-chi.";
create host userLabel="chi-node-01" hostType=1 hostGroup="gnt-chi";
show "Creating Host chi-node-02 with Host Type Index 1 (Linux) on Host Group gnt-chi.";
create host userLabel="chi-node-02" hostType=1 hostGroup="gnt-chi";
show "Creating Host chi-node-03 with Host Type Index 1 (Linux) on Host Group gnt-chi.";
create host userLabel="chi-node-03" hostType=1 hostGroup="gnt-chi";
show "Creating Host chi-node-04 with Host Type Index 1 (Linux) on Host Group gnt-chi.";
create host userLabel="chi-node-04" hostType=1 hostGroup="gnt-chi";
To find the right iSCSI initiator identifier, you need to run this
command on the host:
show "Creating iSCSI Initiator iqn.1993-08.org.debian:01:chi-node-01 with User Label chi-node-01-iscsi on host chi-node-01";
create iscsiInitiator iscsiName="iqn.1993-08.org.debian:01:chi-node-01" userLabel="chi-node-01-iscsi" host="chi-node-01";
show "Creating iSCSI Initiator iqn.1993-08.org.debian:01:chi-node-02 with User Label chi-node-02-iscsi on host chi-node-02";
create iscsiInitiator iscsiName="iqn.1993-08.org.debian:01:chi-node-02" userLabel="chi-node-02-iscsi" host="chi-node-02";
show "Creating iSCSI Initiator iqn.1993-08.org.debian:01:chi-node-03 with User Label chi-node-03-iscsi on host chi-node-03";
create iscsiInitiator iscsiName="iqn.1993-08.org.debian:01:chi-node-03" userLabel="chi-node-03-iscsi" host="chi-node-03";
show "Creating iSCSI Initiator iqn.1993-08.org.debian:01:chi-node-04 with User Label chi-node-04-iscsi on host chi-node-04";
create iscsiInitiator iscsiName="iqn.1993-08.org.debian:01:chi-node-04" userLabel="chi-node-04-iscsi" host="chi-node-04";
iscsiadm -m session -P 1 | grep 'Iface Initiatorname' | sort -u
For new machines, only this should be necessary:
Note that this setting is also visible in
`/etc/iscsi/initiatorname.iscsi`, where it can be changed as well.
create host userLabel="chi-node-0X" hostType=1 hostGroup="gnt-chi";
create iscsiInitiator iscsiName="iqn.1993-08.org.debian:01:chi-node-04" userLabel="chi-node-0X-iscsi" host="chi-node-0X";
The `iscsiName` setting is in `/etc/iscsi/initiatorname.iscsi`, which
is configured by Puppet to be derived from the hostname, so it can be
reliably guessed above.
To confirm the iSCSI initiator name, you can run this command on the
host:
iscsiadm -m session -P 1 | grep 'Iface Initiatorname' | sort -u
### Creating a disk
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment