Skip to content

Instantly share code, notes, and snippets.

@hoonetorg
hoonetorg / zfs-load-key.service
Created June 11, 2022 17:14 — forked from da-n/zfs-load-key.service
Import ZFS pool
# This service will unlock all ZFS pools at boot time
# It should live in
# /etc/systemd/system/zfs-load-key.service
# Enable it with
# systemctl enable zfs-load-key.service
[Unit]
Description=Load encryption keys
DefaultDependencies=no
Before=zfs-mount.service
@hoonetorg
hoonetorg / gist:d908ea1f22b79fe4d83890b36be92702
Created July 18, 2018 12:58
addon_installgems_script_for_opennebula_5_6_0
#!/bin/bash
#working for one 5.6.0 opennebula-ruby rpm package
# a repo named *opennebula* must exist containing opennebula-ruby-5.6.0
# oneadmin user must be available
# cleanup last build
rm /usr/share/one/Gemfile
yum -y autoremove opennebula-ruby
rm /etc/yum.localrepos.d/epel.repo
332.043123] block drbd1: peer( Primary -> Secondary )
[ 332.163533] drbd data1: peer( Secondary -> Unknown ) conn( Connected -> TearDown ) pdsk( UpToDate -> DUnknown )
[ 332.181341] drbd data1: ack_receiver terminated
[ 332.183780] drbd data1: Terminating drbd_a_data1
[ 332.202453] drbd data1: Connection closed
[ 332.207384] drbd data1: conn( TearDown -> Unconnected )
[ 332.209514] drbd data1: receiver terminated
[ 332.211723] drbd data1: Restarting receiver thread
[ 332.213777] drbd data1: receiver (re)started
[ 332.215918] drbd data1: conn( Unconnected -> WFConnection )
[ 878.029110] nfsd: last server has exited, flushing export cache
[ 879.232932] XFS (drbd1): Unmounting Filesystem
[ 879.360175] block drbd1: role( Primary -> Secondary )
[ 879.377419] block drbd1: 0 KB (0 bits) marked out-of-sync by on disk bit-map.
[ 879.526244] drbd data1: peer( Secondary -> Unknown ) conn( Connected -> Disconnecting ) pdsk( UpToDate -> DUnknown )
[ 879.551284] drbd data1: ack_receiver terminated
[ 879.552566] drbd data1: Terminating drbd_a_data1
[ 879.567540] drbd data1: Connection closed
[ 879.569665] drbd data1: conn( Disconnecting -> StandAlone )
[ 879.571838] drbd data1: receiver terminated
TEST MODE:
----------
ID: selinux-config
Function: file.managed
Name: /etc/selinux/config
Result: None
Comment: The file /etc/selinux/config is set to be changed
Started: 21:54:22.051914
Duration: 24.64 ms
Changes:
yum reinstall zeromq
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package zeromq.x86_64 0:4.1.4-6.el7 will be reinstalled
--> Processing Dependency: libsodium.so.23()(64bit) for package: zeromq-4.1.4-6.el7.x86_64
--> Running transaction check
---> Package libsodium.x86_64 0:1.0.5-1.el7 will be updated
--> Processing Dependency: libsodium.so.13()(64bit) for package: zeromq-4.1.4-6.el7.x86_64
#!/bin/bash
VM=$1
DESTHOST=$2
[ -z "$VM" ] && exit 1
[ -z "$DESTHOST" ] && exit 1
(virsh list --name |grep -w "$VM") || exit 1
echo "$VM is running here"
--- drbd-kernel.spec.orig 2017-06-01 11:13:44.000000000 +0200
+++ drbd-kernel.spec 2018-04-16 16:34:58.452833855 +0200
@@ -4,6 +4,9 @@ Version: 8.4.10
Release: 1%{?dist}
%global tarball_version %(echo "%{version}-%{?release}" | sed -e "s,%{?dist}$,,")
Source: http://oss.linbit.com/drbd/drbd-%{tarball_version}.tar.gz
+
+Patch1: add-RHEL74-compat-hack.patch
+
License: GPLv2+
@hoonetorg
hoonetorg / gist:c5f9580390adcf4fe5704818f5cedbbd
Created December 15, 2017 18:25
ansible shell command only if another shell command does the correct thing when looping over a list
vars:
drbdmanage_m:
volumes:
- name: server1_disk1
size: 30G
- name: server1_disk2
size: 30G
task: