The below error can occur when one tries to create a new HA cluster with pcs package. Corosync fails to start with the below description.
Corosync error
The error can be resolved by editing /etc/hosts file and by commenting the first two lines for localhost. At the end I appended a new line that maps localhost with a specific IPv4 IP but this could be unnecessary.
After that when one tries to create and enable the cluster the result would be successful.
Sometimes infrastructure servers are physical and directly connected to storage and not virtual ones. In virtualization cases, one has to assign a new virtual disk on the virtual server and proceed with the expand. In case of a physical server one should do the following in order to assign more space on a partition or a lvm.
Find storage adapters and rescan them:
ls /sys/class/scsi_host/
echo "- - -" > /sys/class/scsi_host/hostX/scan
where X is 0 to 10 in my system (some online and some offline)
After re scanning storage adapters a new multipath device will be visible and ready to be used.
multipath -ll
4 paths are available for this storage device ( disk 50G)
Sometimes due to network configuration you cannot use your SMTP server and you want to send emails through a proxy/relay. Below you can find how to configure a linux machine so that to act as an SMTP relay and forward emails to one SMTP server.
First if not installed you should install postfix package for your linux server depending on the distribution. For example on a RedHat server you should do:
sudo yum install postfix
Then you should edit the below postfix configuration lines. Postfix configuration is handled by /etc/postfix/main.cf
Change inet_interfaces from localhsot to all
inet_interfaces = all
Configure the source from which the emails will be sent. For example you can use a specific host or a subnet of hosts. In my case I chose a subnet so the second line should be uncommented.
#mynetworks_style = class
mynetworks_style = subnet
#mynetworks_style = host
Configure your subnet source Address and mask.
You can also specify the absolute pathname of a pattern file instead
of listing the patterns here. Specify type:table for table-based lookups
(the value on the table right-hand side is not used).
mynetworks = 192.168.0.0/16, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
Ansible is a very powerful automation tool that is developed from RedHat. Many large organizations rely on Ansible to automate tasks and procedures. In this article I will explain how one can use ansible to manage windows clients and servers.
In order to manage windows hosts ansible winrm plugin should be used to communicate with the client/server machine.
The first step is to verify that ansible is installed.
Alongside with ansible, on the control node the pywinrm module should be also installed. By default this one is not installed and one should do it manually.
The managed Windows client/server machines should be configured to allow remote connections. A very useful power shell script is already developed from other users and it needs only to be executed on the managed host.
If your execution policy is prohibiting this script to be executed, you should set-execution policy to RemoteSigned as shown below and then execute the powershell.
Control node should have network connectivity with the managed hosts.
Some environmental variables should be used, so that ansible knows how the connection will be performed (winrm). I included those variables in my inventory file as I created this lab just for demonstration. My inventory file looks like below:
Lastly make sure that the user that is used for the connection has administrative rights on the managed windows hosts. Otherwise some error codes will be returned.
Lastly confirm ansible on managed host is working by using win_ping module.