### Configure FILE_THIN Storage Pool Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Create a FILE_THIN storage pool using kubectl apply. This example configures a simple thin-provisioned file storage pool without requiring additional host setup. ```bash $ kubectl apply -f - < ``` -------------------------------- ### Enable and Start LINSTOR Controller Service Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Enables the LINSTOR controller service to start on boot and starts it immediately on the host system. ```bash # systemctl enable --now linstor-controller ``` -------------------------------- ### Get Hints for LINBIT Package Installation Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Run the LINBIT manage node script with the --hints flag to review suggested packages and installation commands for DRBD-related packages. ```bash # ./linbit-manage-node.py --hints ``` -------------------------------- ### NFS Server Service Status Example Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Example output from 'systemctl status nfs-server' showing the service as inactive and disabled. This confirms the service is not running and is prevented from starting automatically. ```text ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; preset: disabled) Active: inactive (dead) ``` -------------------------------- ### Enable and Start NFS Server Service Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Enable the NFS server to start on boot and start the service immediately. This makes the configured NFS exports available to clients. ```bash # systemctl enable --now nfs-server ``` -------------------------------- ### LDAP Search Base Example Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en An example of a search base string for specifying the starting point in the LDAP directory tree for authentication queries. ```toml search_base = "ou=storage-services" ``` -------------------------------- ### Enable and Start LINSTOR Gateway Service Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en After creating the service file, reload systemd and then enable and start the LINSTOR Gateway service. This command ensures the service starts on boot and is running. ```bash systemctl enable --now linstor-gateway ``` -------------------------------- ### Install pv-hostpath Helm Chart Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use this command to add the LINSTOR Helm repository and install the pv-hostpath chart for creating hostPath persistent volumes. ```bash helm repo add linstor https://charts.linstor.io helm install linstor-etcd linstor/pv-hostpath ``` -------------------------------- ### Install MySQL Server on Ubuntu Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the MySQL server package on Ubuntu systems. This is a prerequisite for CloudStack's database. ```bash # apt install -y mysql-server ``` -------------------------------- ### Install LINSTOR Affinity Controller with Helm Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the LINSTOR Affinity Controller using Helm to synchronize PV node affinity with LINSTOR volume states. Ensure the Helm repository is updated before installation. ```bash $ helm repo update $ helm install linstor-affinity-controller linstor/linstor-affinity-controller ``` -------------------------------- ### Start LINSTOR Controller Service Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use this command to start the LINSTOR controller service. Ensure DRBD Reactor manages this service. ```bash # systemctl start linstor-controller ``` -------------------------------- ### Install MySQL Server on RHEL Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the MySQL server package on RHEL-based systems using dnf. This is a prerequisite for CloudStack's database. ```bash # dnf install -y mysql-server ``` -------------------------------- ### Enable and Start LINSTOR Services Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Enable and start the LINSTOR controller and satellite services to ensure they run on boot and are active. This is a crucial step for LINSTOR operation. ```bash # systemctl enable --now linstor-controller # systemctl enable --now linstor-satellite ``` -------------------------------- ### Install linstor-gui on RPM-based distributions Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs the linstor-gui package on RPM-based systems. Ensure the linstor-controller service is restarted after installation. ```bash dnf install -y linstor-gui ``` -------------------------------- ### Install linstor-gui on DEB-based distributions Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs the linstor-gui package on DEB-based systems. Ensure the linstor-controller service is restarted after installation. ```bash apt install -y linstor-gui ``` -------------------------------- ### Build and Install SCST Packages Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Clones the SCST repository, builds the RPM packages with DKMS support, and then installs them. This is part of the SCST installation process on RPM-based systems. ```bash git clone https://github.com/SCST-project/scst cd scst/ make rpm-dkms cd ~/ dnf install -y /usr/src/packages/RPMS/x86_64/scst* ``` -------------------------------- ### Monitor CloudStack Database Setup Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Follow the progress of CloudStack's initial database setup by monitoring the 'cloudstack-management' service logs. This command provides a live feed of log entries. ```bash # journalctl -u cloudstack-management -f ``` -------------------------------- ### Enable and Start LINSTOR Satellite Service Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Enables the LINSTOR satellite service to start on boot and starts it immediately. This is typically done after adding a new node to the cluster. ```bash # systemctl enable --now linstor-satellite ``` -------------------------------- ### Install LINSTOR OpenNebula Package (APT) Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use this command to install the linstor-opennebula package on Debian-based systems with access to LINBIT customer repositories. ```bash # apt install linstor-opennebula ``` -------------------------------- ### LINSTOR Tab-Completion Examples Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Examples showcasing LINSTOR's tab-completion feature for IP addresses and resource names. This feature significantly aids in command construction. ```bash # linstor node create alpha 1 # completes the IP address if hostname can be resolved ``` ```bash # linstor resource create b c # linstor assign-resource backups charlie ``` -------------------------------- ### Install nvme-cli Package Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs the 'nvme-cli' package on a DEB-based system. This package is required for using NVMe-oF/NVMe-TCP with LINSTOR. ```bash # apt install nvme-cli ``` -------------------------------- ### Install LINSTOR Docker Volume Plugin Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs the LINSTOR Docker Volume plugin, automatically granting all necessary permissions. Omit `--grant-all-permissions` to manually accept permissions. ```bash # docker plugin install linbit/linstor-docker-volume --grant-all-permissions ``` -------------------------------- ### Install LINSTOR Proxmox Plugin and Utilities Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the LINSTOR Proxmox plugin, DRBD kernel module, and utilities after configuring an appropriate LINBIT package repository. This command ensures all necessary components are installed. ```bash # apt -y install drbd-dkms drbd-utils linstor-proxmox ``` -------------------------------- ### Install LINSTOR OpenNebula Package (YUM) Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use this command to install the linstor-opennebula package on Red Hat-based systems with access to LINBIT customer repositories. ```bash # yum install linstor-opennebula ``` -------------------------------- ### Install NFS Utils on RHEL Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the NFS utilities package on RHEL-based systems to enable NFS functionality for CloudStack's secondary storage. ```bash # dnf install -y nfs-utils ``` -------------------------------- ### Deploy LINBIT SDS using Helm Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the LINBIT SDS chart using Helm after the Operator v2 has been successfully installed. This command deploys the LINBIT SDS components into the specified namespace. ```bash $ helm install -n linbit-sds linbit-sds linstor/linbit-sds ``` -------------------------------- ### Configure LINSTOR Plugin with Storage Options Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en An example configuration for the LINSTOR plugin, specifying storage pool, filesystem type, options, size, and replica count. ```ini # cat /etc/linstor/docker-volume.conf [global] storagepool = thin-lvm fs = ext4 fsopts = -E discard size = 100MB replicas = 2 ``` -------------------------------- ### LINSTOR Resource List Output Example Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en This output shows the placement of the 'myres' resource across different nodes after creation. It helps verify that replicas are distributed as intended. ```text ╭─────────────────────────────────────────────────────────────────────────────────────╮ ┊ ResourceName ┊ Node ┊ Layers ┊ Usage ┊ Conns ┊ State ┊ CreatedOn ┊ ╞═════════════════════════════════════════════════════════════════════════════════════╡ ┊ myres ┊ linstor-sat-0 ┊ DRBD,STORAGE ┊ Unused ┊ Ok ┊ UpToDate ┊ [...] ┊ ┊ myres ┊ linstor-sat-1 ┊ DRBD,STORAGE ┊ Unused ┊ Ok ┊ UpToDate ┊ [...] ┊ ┊ myres ┊ linstor-sat-2 ┊ DRBD,STORAGE ┊ Unused ┊ Ok ┊ UpToDate ┊ [...] ┊ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ``` -------------------------------- ### Install LINSTOR Docker Volume Plugin Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en This command installs the LINSTOR Docker Volume Plugin from Docker Hub. Ensure a working LINSTOR cluster is already set up. ```bash docker plugin install linstor/linstor-docker-volume ``` -------------------------------- ### OLVM Cinderlib Integration Prompt Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Confirm enabling Cinderlib integration when prompted during the OLVM engine setup process. ```text --== PRODUCT OPTIONS ==-- Configure Cinderlib integration (Currently in tech preview) (Yes, No) [No]: Yes ``` -------------------------------- ### Install LINSTOR Docker Volume Plugin for ARM64 Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs the LINSTOR Docker Volume plugin specifically for the ARM64 architecture. The `--grant-all-permissions` flag automatically grants necessary permissions. ```bash # docker plugin install linbit/linstor-docker-volume:arm64 --grant-all-permissions ``` -------------------------------- ### Set QoS on Volume Group and Spawn Resources Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en This example demonstrates creating a resource group, a volume group, applying a QoS setting (write throttle) to the volume group, and then spawning resources that inherit this QoS setting. Ensure 'pool1' exists in your environment. ```bash # linstor resource-group create qos_limited --storage-pool pool1 --place-count 3 # linstor volume-group create qos_limited # linstor volume-group set-property qos_limited 0 sys/fs/blkio_throttle_write 1048576 # linstor resource-group spawn-resources qos_limited qos_limited_res 200M ``` -------------------------------- ### Create Multiple NFS Exports with a Single Command Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en To create additional NFS exports, you must specify multiple volume size arguments in the initial `nfs create` command. This example creates two NFS exports under the 'example' resource. ```bash linstor-gateway nfs create example 172.16.16.99/24 20G 40G ``` -------------------------------- ### Download and Prepare CloudStack System VM Template Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Download the system VM template and use the `cloud-install-sys-tmplt` script to prepare it for KVM hypervisors. Adjust `CS_VERSION` and `CS_VERSION_PATCH` as necessary. ```bash # CS_VERSION=4.17 # CS_VERSION_PATCH=4.17.1 # wget https://download.cloudstack.org/systemvm/$CS_VERSION/systemvmtemplate-$CS_VERSION_PATCH-kvm.qcow2.bz2 # /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt \ -m /export/secondary \ -f systemvmtemplate-$CS_VERSION_PATCH=-kvm.qcow2.bz2 \ -h kvm -o localhost -r cloud -d cloud ``` -------------------------------- ### Define Storage Pools in Helm Values File Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Example content for a Helm values file to define storage pools for LINSTOR Operator during installation. ```yaml operator: satelliteSet: storagePools: lvmPools: - name: lvm-thick volumeGroup: drbdpool ``` -------------------------------- ### Prepare Thin-Provisioned Storage with LVM Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Prepare thin-provisioned storage using LVM commands to back LINSTOR storage pools. This involves creating a physical volume, a volume group, and a thin logical volume. ```bash pvcreate /dev/sdX /dev/sdY vgcreate drbdpool /dev/sdX /dev/sdY lvcreate -l 95%VG --poolmetadatasize 8g -T /dev/drbdpool/drbdthinpool ``` -------------------------------- ### Configure and Create OpenNebula Datastore with LINSTOR Plugin Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Configure a datastore using a `ds.conf` file and create it with the `onedatastore` tool. This example uses the LINSTOR plugin, specifying a resource group and a list of storage nodes. ```bash cat >ds.conf <= 1 GiB, no partition info). ```yaml storagePools: lvmPools: - name: lvm-thick volumeGroup: drbdpool devicePaths: - /dev/vdb lvmThinPools: - name: lvm-thin thinVolume: thinpool volumeGroup: linstor_thinpool devicePaths: - /dev/vdc - /dev/vdd ``` -------------------------------- ### Prepare and Mount HA LINSTOR Database Storage Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en This sequence of commands prepares the HA storage for the LINSTOR database. It moves the existing LINSTOR data, creates the mount point, makes the directory immutable (for LINSTOR >= 1.14.0), brings the DRBD resource primary, formats the device, starts the systemd mount service, and copies the original LINSTOR data to the newly mounted HA storage. ```bash # mv /var/lib/linstor{,.orig} # mkdir /var/lib/linstor # chattr +i /var/lib/linstor # only if on LINSTOR >= 1.14.0 # drbdadm primary linstor_db # mkfs.ext4 /dev/drbd/by-res/linstor_db/0 # systemctl start var-lib-linstor.mount # cp -r /var/lib/linstor.orig/* /var/lib/linstor ``` -------------------------------- ### Install LINSTOR Cinder Package Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the required LINSTOR Cinder package on the OLVM engine host to enable the integration. ```bash $ dnf install -y --enablerepo=ovirt linstor-cinder ``` -------------------------------- ### Create Resource with Replicas on Different Sites Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use this command to create a new resource and ensure LINSTOR places replicas on nodes with different 'site' auxiliary properties. Specify the maximum number of replicas per site and the total desired replica count. ```bash linstor resource-group spawn \ --x-replicas-on-different site 2 \ --place-count 3 \ myrg myres 200G ``` -------------------------------- ### Unset Replicas-on-Same Property Example Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Specific example of unsetting the `--replicas-on-same` autoplacement property on the `testRscGrp` resource group. ```bash # linstor resource-group modify testRscGrp --replicas-on-same ``` -------------------------------- ### Toggle Resource to Diskful Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Creates a physical replica for a diskless resource on a specified storage pool. This command makes the resource diskful, backing it with physical storage. ```bash # linstor resource toggle-disk alpha backups --storage-pool pool_ssd ``` -------------------------------- ### Verify Inherited QoS Setting Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Verify that spawned resources have inherited the QoS setting by checking the contents of the corresponding sysfs file on a contributing node. ```bash # cat /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device 252:4 1048576 ``` -------------------------------- ### LDAP Search Filter Example Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en An example of an LDAP search filter string to restrict authentication based on user and group membership. ```toml search_filter = "(&(uid={user})(memberof=ou=storage-services,dc=example,dc=com))" ``` -------------------------------- ### LDAP DN Example Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en An example of a distinguished name (DN) string for querying the LDAP directory, including user ID and other attributes. ```toml dn = "uid={user},ou=storage-services,o=ha,dc=example" ``` -------------------------------- ### Generate SSL Keystores for LINSTOR Nodes Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en These commands set up directories and generate private keys for LINSTOR controller and satellite nodes using `keytool`. Ensure you replace placeholder values with your environment's specific details. ```bash # create directories to hold the key files mkdir -p /tmp/linstor-ssl cd /tmp/linstor-ssl mkdir alpha bravo charlie # create private keys for all nodes keytool -keyalg rsa -keysize 2048 -genkey -keystore alpha/keystore.jks\ -storepass linstor -keypass linstor\ -alias alpha\ -dname "CN=Max Mustermann, OU=alpha, O=Example, L=Vienna, ST=Austria, C=AT" keytool -keyalg rsa -keysize 2048 -genkey -keystore bravo/keystore.jks\ -storepass linstor -keypass linstor\ -alias bravo\ -dname "CN=Max Mustermann, OU=bravo, O=Example, L=Vienna, ST=Austria, C=AT" keytool -keyalg rsa -keysize 2048 -genkey -keystore charlie/keystore.jks\ -storepass linstor -keypass linstor\ -alias charlie\ -dname "CN=Max Mustermann, OU=charlie, O=Example, L=Vienna, ST=Austria, C=AT" ``` -------------------------------- ### Create OpenShift Project for LINBIT SDS Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Create a new OpenShift project to host the LINBIT SDS deployment. This command also creates a corresponding namespace. ```bash $ oc new-project linbit-sds Now using project "linbit-sds" on server ... ``` -------------------------------- ### Default LINSTOR Helm Install Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs LINSTOR with default settings. This configuration does not set up persistence for the etcd key-value store and is not recommended for production use. ```yaml operator: satelliteSet: storagePools: lvmThinPools: - name: lvm-thin thinVolume: thinpool volumeGroup: "" devicePaths: - /dev/sdb ``` ```bash kubectl create secret docker-registry drbdiocred --docker-server=drbd.io \ --docker-username= --docker-password= helm repo add linstor https://charts.linstor.io helm install linstor-op linstor/linstor ``` -------------------------------- ### Configure LINSTOR System Datastore Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Configure LINSTOR as a system datastore by creating a configuration file and using the 'onedatastore create' command. Ensure the datastore ID is added to COMPATIBLE_SYS_DS for scheduler recognition. ```bash cat >system_ds.conf < linstor-op linstor/linstor ``` -------------------------------- ### Create Host Directory for LINSTOR DB Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use these commands to create the directory for the LINSTOR database and set the correct ownership. This is a prerequisite for configuring the host volume. ```bash $ mkdir -p /var/lib/linstor $ chown -R 1000:0 /var/lib/linstor ``` -------------------------------- ### Install LINSTOR HA Controller Helm Chart Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Deploy the LINSTOR High Availability Controller using Helm. Ensure your Helm repository is updated before installation. ```bash $ helm repo update $ helm install linstor-ha-controller linstor/linstor-ha-controller ``` -------------------------------- ### Verify LINSTOR SDS Pods are Running Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en This output shows that the wait-for condition has been met and the LINBIT SDS pods are up and running after deployment. ```bash pod/ha-controller-4tgcg condition met pod/k8s-1-26-10.test condition met pod/linstor-controller-76459dc6b6-tst8p condition met pod/linstor-csi-controller-75dfdc967d-dwdx6 condition met pod/linstor-csi-node-9gcwj condition met pod/linstor-operator-controller-manager-6d9847d857-zc985 condition met ``` -------------------------------- ### Verify File System Creation with blkid Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en After LINSTOR creates a file system, use the 'blkid' command on a satellite node to confirm the file system type and UUID. ```bash [...] /dev/drbd1004: UUID="[...] ``` -------------------------------- ### Install NFS Kernel Server on Ubuntu Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the NFS kernel server package on Ubuntu systems to provide NFS services for CloudStack's secondary storage. ```bash # apt install -y nfs-kernel-server ``` -------------------------------- ### Display LINSTOR Resource Placement Table Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en This is an example output of the `linstor resource list` command, showing that `testResource` was placed on `node-0` and `node-2` due to the `--replicas-on-same testProperty=1` constraint. ```text ╭─────────────────────────────────────────────────────────────────────────────────────╮ ┊ ResourceName ┊ Node ┊ Port ┊ Usage ┊ Conns ┊ State ┊ CreatedOn ┊ ╞═════════════════════════════════════════════════════════════════════════════════════╡ ┊ testResource ┊ node-0 ┊ 7000 ┊ Unused ┊ Ok ┊ UpToDate ┊ 2022-07-27 16:14:16 ┊ ┊ testResource ┊ node-2 ┊ 7000 ┊ Unused ┊ Ok ┊ UpToDate ┊ 2022-07-27 16:14:16 ┊ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ``` -------------------------------- ### Update and Install LINSTOR Operator with Helm Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Update Helm repositories and install or upgrade the linstor-operator chart. Ensure to use the --wait flag for synchronous deployment. ```bash $ helm repo update [...] Update Complete. ✨Happy Helming!✨ $ helm install linstor-operator linstor/linstor-operator --wait Release "linstor-operator" has been upgraded. Happy Helming! [...] ``` -------------------------------- ### Configure Helm Install with Custom Passphrase Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use the `--set` argument during Helm installation to specify the Kubernetes secret containing the custom master passphrase for LINSTOR. ```bash --set operator.controller.luksSecret=linstor-pass ``` -------------------------------- ### Enable and Start SCST Service Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Reloads systemd unit files to recognize the new `iscsi-scst` service and then enables and starts the service. This ensures the SCST target is active. ```bash systemctl daemon-reload systemctl enable --now iscsi-scst ``` -------------------------------- ### Import Certificates for LINSTOR SSL Setup Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en These commands import truststore certificates between LINSTOR nodes to establish a secure SSL/TLS connection. This includes importing satellite certificates into the controller's truststore and the controller's certificate into satellite truststores. ```bash # import truststore certificates for alpha (needs all satellite certificates) keytool -importkeystore\ -srcstorepass linstor -deststorepass linstor -keypass linstor\ -srckeystore bravo/keystore.jks -destkeystore alpha/certificates.jks keytool -importkeystore\ -srcstorepass linstor -deststorepass linstor -keypass linstor\ -srckeystore charlie/keystore.jks -destkeystore alpha/certificates.jks # import controller certificate into satellite truststores keytool -importkeystore\ -srcstorepass linstor -deststorepass linstor -keypass linstor\ -srckeystore alpha/keystore.jks -destkeystore bravo/certificates.jks keytool -importkeystore\ -srcstorepass linstor -deststorepass linstor -keypass linstor\ -srckeystore alpha/keystore.jks -destkeystore charlie/certificates.jks ``` -------------------------------- ### Verify Volume Snapshot Creation with kubectl Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use `kubectl wait` to confirm a volume snapshot is ready and `kubectl get` to view its details. This is useful for ensuring snapshot operations have completed successfully before proceeding. ```bash $ kubectl wait volumesnapshot --for=jsonpath='{.status.readyToUse}'=true data-volume-snapshot-1 volumesnapshot.snapshot.storage.k8s.io/data-volume-snapshot-1 condition met $ kubectl get volumesnapshot data-volume-snapshot-1 ``` ```text NAME READYTOUSE SOURCEPVC SOURCESNAPSHOT CONTENT RESTORESIZE SNAPSHOTCLASS data-volume-snapshot-1 true data-volume 1Gi linbit-sds-snapshots ``` -------------------------------- ### Helm Install with External LINSTOR Controller Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Configure Helm to install the LINSTOR operator without deploying an internal controller, using an existing external LINSTOR controller endpoint. ```bash operator.controller.enabled=false operator.etcd.enabled=false controllerEndpoint= ``` -------------------------------- ### Example Output of 'linstor resource list' with SkipDisk Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en When the `DrbdOptions/SkipDisk` property is set to True (automatically by LINSTOR when DRBD detects I/O errors), the 'linstor resource list' command will indicate this status for the affected resource. ```bash # linstor resource list ... (output showing SkipDisk property) ``` -------------------------------- ### Copy SSL Keystore Files and Configure Satellite Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en This section details copying the generated keystore files to their respective host destinations and configuring the LINSTOR satellite TOML file for SSL communication. Ensure the paths and passwords match your setup. ```bash # now copy the keystore files to their host destinations ssh root@alpha mkdir /etc/linstor/ssl scp alpha/* root@alpha:/etc/linstor/ssl/ ssh root@bravo mkdir /etc/linstor/ssl scp bravo/* root@bravo:/etc/linstor/ssl/ ssh root@charlie mkdir /etc/linstor/ssl scp charlie/* root@charlie:/etc/linstor/ssl/ # generate the satellite ssl config entry echo '[netcom] type="ssl" port=3367 server_certificate="ssl/keystore.jks" trusted_certificates="ssl/certificates.jks" key_password="linstor" keystore_password="linstor" truststore_password="linstor" ssl_protocol="TLSv1.2" ' | ssh root@bravo "cat > /etc/linstor/linstor_satellite.toml" echo '[netcom] type="ssl" port=3367 server_certificate="ssl/keystore.jks" trusted_certificates="ssl/certificates.jks" key_password="linstor" keystore_password="linstor" truststore_password="linstor" ssl_protocol="TLSv1.2" ' | ssh root@charlie "cat > /etc/linstor/linstor_satellite.toml" ``` -------------------------------- ### Configure Helm Install with TLS Secrets Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Specify the names of the created Kubernetes secrets in your Helm install command or values file to configure LINSTOR's TLS settings. ```yaml linstorHttpsControllerSecret: linstor-api linstorHttpsClientSecret: linstor-client operator: controller: sslSecret: linstor-control satelliteSet: sslSecret: linstor-satellite ``` -------------------------------- ### Add Helm Repository and Install LINSTOR Operator Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Add the LINSTOR Helm repository and install the LINSTOR Operator chart. This command deploys the LINSTOR Operator to your Kubernetes cluster. ```bash helm repo add linstor https://charts.linstor.io helm install linstor-op linstor/linstor ``` -------------------------------- ### Enable and Start DRBD Reactor Service Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Enable and start the DRBD Reactor service on all LINSTOR satellite nodes. This service is crucial for orchestrating iSCSI, NFS, or NVMe-oF resources. ```bash systemctl enable --now drbd-reactor ``` -------------------------------- ### LINSTOR Gateway TOML Configuration Example Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Example TOML configuration for LINSTOR Gateway. This specifies the list of LINSTOR controller nodes the gateway should connect to. The default controller address is localhost:3370. ```toml [linstor] controllers = ["10.10.1.1", "10.10.1.2", "10.10.1.3"] ``` -------------------------------- ### Get Help for DRBD Options Command Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use the `-h` or `--help` flag with a LINSTOR object and `drbd-options` to display available options, command usage, and default values. ```bash # linstor controller drbd-options -h ``` -------------------------------- ### Spawn Resource Group with Placement Constraints Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use this command to spawn a resource group with specific placement constraints, ensuring replicas are on different sites and a desired number of resources are created. This is useful for disaster recovery scenarios. ```bash linstor resource-group spawn \ --x-replicas-on-different site 1 \ --place-count 3 \ myrg myres 200G ``` -------------------------------- ### Download kubectl-linstor Utility Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Download the kubectl-linstor utility by setting the KL_VERS and KL_ARCH shell variables. Ensure you use the correct architecture and version. If the asset name changes, verify it on the releases page. ```bash # curl -L -O \ https://github.com/piraeusdatastore/kubectl-linstor/releases/download/v$KL_VERS/kubectl-linstor_v"$KL_VERS"_$KL_ARCH.tar.gz ``` -------------------------------- ### Apply Kustomization for LINSTOR Upgrade Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Applies a Kustomization file to upgrade LINSTOR. Ensure the resource link points to the correct version and replace placeholder credentials. ```bash $ kubectl apply -k . namespace/linbit-sds applied [...] $ kubectl -n linbit-sds wait pod --for=condition=Ready --all pod/linstor-operator-controller-manager-6d9847d857-zc985 condition met [...] ``` -------------------------------- ### Install LIO Dependencies on RPM-based Systems Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs necessary packages for building SCST on Red Hat Enterprise Linux (RHEL) and similar distributions. This includes development tools and specific Perl modules. ```bash dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm dnf groupinstall -y "Development Tools" dnf install -y kernel-devel perl perl-Data-Dumper perl-ExtUtils-MakeMaker rpm-build dkms git ``` -------------------------------- ### Install LINSTOR Operator v2 using Helm Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Install the LINSTOR Operator v2 using Helm, specifying the namespace and providing your Linbit credentials for image pulling. The --wait flag ensures the command blocks until the release is ready. ```bash $ helm install linstor-operator linstor/linstor-operator \ --namespace linbit-sds \ --create-namespace \ --set imageCredentials.username=$MY_LINBIT_USER \ --set imageCredentials.password=$MY_LINBIT_PASSWORD \ --wait ``` -------------------------------- ### Configure DRBD Proxy Options Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Tailor DRBD Proxy settings such as memory limits and compression levels for specific resources. This allows fine-tuning of replication performance. ```bash # linstor drbd-proxy options backups --memlimit 100000000 # linstor drbd-proxy compression zlib backups --level 9 ``` -------------------------------- ### Create Systemd Mount Service for LINSTOR Controller Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Creates a systemd mount unit file to mount the HA storage for the LINSTOR controller at `/var/lib/linstor`. It specifies the DRBD device path and the mount point. This setup ensures the LINSTOR database is available on the HA storage. ```bash # cat << EOF > /etc/systemd/system/var-lib-linstor.mount [Unit] Description=Filesystem for the LINSTOR controller [Mount] # you can use the minor like /dev/drbdX or the udev symlink What=/dev/drbd/by-res/linstor_db/0 Where=/var/lib/linstor EOF ``` -------------------------------- ### LINSTOR Helm Install with Persistent Storage and etcd Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs LINSTOR with storage pools defined in `sp-values.yaml`, persistent `hostPath` volumes for etcd, and three etcd replicas. It also compiles DRBD kernel modules for the host kernels. This is suitable for most basic deployments. ```yaml operator: satelliteSet: storagePools: lvmThinPools: - name: lvm-thin thinVolume: thinpool volumeGroup: "" devicePaths: - /dev/sdb ``` ```bash kubectl create secret docker-registry drbdiocred --docker-server=drbd.io \ --docker-username= --docker-password= helm repo add linstor https://charts.linstor.io helm install linstor-etcd linstor/pv-hostpath --set "nodes={,,}" helm install -f sp-values.yaml linstor-op linstor/linstor \ --set etcd.replicas=3 \ --set operator.satelliteSet.kernelModuleInjectionMode=Compile ``` -------------------------------- ### LINSTOR Helm Install with PostgreSQL Backend Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Installs LINSTOR using storage pools from `sp-values.yaml` and a pre-existing PostgreSQL database instead of etcd. It assumes DRBD kernel modules are already compiled. The PostgreSQL database is expected to be reachable via a service endpoint named `postgres`. ```yaml operator: satelliteSet: storagePools: lvmThinPools: - name: lvm-thin thinVolume: thinpool volumeGroup: "" devicePaths: - /dev/sdb ``` ```bash kubectl create secret docker-registry drbdiocred --docker-server=drbd.io \ --docker-username= --docker-email= --docker-password= helm repo add linstor https://charts.linstor.io helm install -f sp-values.yaml linstor-op linstor/linstor \ --set etcd.enabled=false \ --set "operator.controller.dbConnectionURL=jdbc:postgresql://postgres/postgresdb?user=postgresadmin&password=admin123" ``` -------------------------------- ### Apply Kustomization and Wait for Operator Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Apply the kustomization.yaml file using kubectl and then wait for the LINSTOR Operator pods to become ready in the 'linbit-sds' namespace. ```bash $ kubectl apply -k . namespace/linbit-sds created ... $ kubectl -n linbit-sds wait pod --for=condition=Ready --all pod/linstor-operator-controller-manager-6d9847d857-zc985 condition met ``` -------------------------------- ### Display Node Properties with StorPoolNameDrbdMeta Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Example output showing the StorPoolNameDrbdMeta property set to 'my_thin_pool' for a node. ```text ╭─────────────────────────────────────╮ ┊ Key ┊ Value ┊ ╞═════════════════════════════════════╡ [...] ┊ StorPoolNameDrbdMeta ┊ my_thin_pool ┊ ╰─────────────────────────────────────╯ ``` -------------------------------- ### Source Bash Completion for LINSTOR Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en If tab-completion is not working after installation, source the appropriate bash completion file for your system. ```bash # source /etc/bash_completion.d/linstor # or # source /usr/share/bash_completion/completions/linstor ``` -------------------------------- ### Restart and Enable DRBD Reactor Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Restart the DRBD Reactor service and enable it to start on boot for all configured nodes. ```bash # systemctl restart drbd-reactor # systemctl enable drbd-reactor ``` -------------------------------- ### Create LINSTOR Resource Definition Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Use this command to create a new resource definition in LINSTOR's database. This is the first step before creating volume definitions. ```bash # linstor resource-definition create backups ``` -------------------------------- ### Set DRBD Options for LINSTOR Resource Definition Source: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en Configure DRBD options for a LINSTOR resource definition using the `drbd-options` command. This example sets the DRBD protocol to 'C' for the 'backups' resource definition. ```bash # linstor resource-definition drbd-options --protocol C backups ```