Iperf3: How to Specify the Amount of Data to be Transmitted

I need to test my server to server connection with 1gb data transfer. Below is the command

Server IP:
Client IP:

On Server, run
iperf -s

On client, run
iperf3 -c -n 1G
iperf3 -c -n 1024M

Example on client:

With the default buffer size of 8KB:

iperf3 -c -n 1024M
Client connecting to, TCP port 5201
TCP window size: 85.0 KByte (default)
[  3] local port 56565 connected with port 5201
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.5 sec  1.00 GBytes  8.20 Gbits/sec 

Wit the the same value for the -n option but with -l 32K

iperf3 -c -n 1024M -l 32K
Client connecting to, TCP port 5201
TCP window size: 85.0 KByte (default)
[  3] local port 56568 connected with port 5201
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.5 sec  1.00 GBytes  8.17 Gbits/sec


Posted in Linux | Tagged ,

Configure Multipathing in Linux (RHEL7/CentOS7)


After you have assigned LUN (usually configured in storage) to the specific client, below is the steps on how to configure multipath on client machine (RHEL7/CentOS7.

Install device-mapper-multipath

[root@www ~]# yum -y install device-mapper-multipath

Generate multipath configuraton

[root@www ~]# mpathconf --enable

Install iSCSI Initiator.

[root@www ~]# yum -y install iscsi-initiator-utils

Configure multipath.conf. comment line “find_multipaths yes”

[root@www ~]# vim /etc/multipath.conf 
# comment or remove below line
# find_multipaths yes

Configure iSCSI Initiator

[root@www ~]# vi /etc/iscsi/initiatorname.iscsi
# change to the same IQN you set on the iSCSI target server

Discover target (server is

[root@www ~]#iscsiadm -m discovery -t st -p,-1 iqn.2005-10.org.freenas.ctl:freenas-iskazi

Confirm status after discovery

[root@www ~]# iscsiadm -m node -o show

Login to the target

root@www ~]# iscsiadm -m node --login

Confirm the established session

root@www ~]# iscsiadm -m session -o show
tcp: [1],1 iqn.2005-10.org.freenas.ctl:freenas-iskazi (non-flash) 
tcp: [2],1 iqn.2005-10.org.freenas.ctl:freenas-iskazi0 (non-flash)

Restart iscsid and mulptipathd

[root@www ~]# systemctl restart multipathd
[root@www ~]# systemctl status iscsid

Check attached disk

[root@www ~]# multipath -ll
mpathb (36589cfc0000007b06bdc809ab3ad6dc2) dm-2 FreeNAS ,iSCSI Disk
size=5.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
 `- 3:0:0:0 sdb 8:16 active ready running

Edit /etc/multipathd.conf. Add below line at the bottom

multipaths {
        multipath {
                wwid 36589cfc0000007b06bdc809ab3ad6dc2
                alias DATA01

Restart iscsid and mulptipathd

[root@www ~]# systemctl restart multipathd

Create new path

[root@www ~]# mkdir -p /data01

Print disk format disk

[root@www ~]# parted /dev/mapper/DATA01 print 
Error: /dev/mapper/DATA01: unrecognised disk label 
Model: Linux device-mapper (multipath) (dm)                               
Disk /dev/mapper/DATA01: 5369MB 
Sector size (logical/physical): 512B/16384B
Partition Table: unknown
Disk Flags:

Label disk

[root@www ~]# parted /dev/mapper/DATA01 mklabel gpt

Print again to check label

root@www ~]# parted /dev/mapper/DATA01 print

Configure disk to use all space

[root@www ~]# parted /dev/mapper/DATA01p1 mkpart DATA01 xfs 1 5369MB

Format disk (I’m using xfs as my file system)

[root@www ~]# mkfs.xfs -f /dev/mapper/DATA01p1

Check the block id (and copy the UUID as we will use it in the further step)

[root@www ~]# blkid /dev/mapper/DATA01p1
/dev/mapper/DATA01p1: UUID="909a097e-6e01-490a-9d50-f4727c3efc04" TYPE="xfs"

Mount disk at boot using fstab (note: use _netdev)

[root@www ~]# vim /etc/fstab
UUID=909a097e-6e01-490a-9d50-f4727c3efc04       /data01	xfs	_netdev	0 0

Mount new disk

[root@www ~]# mount -a

To test your newly mounted disk, try to create any file (using touch or vi) in /data01 partition. If success then your disk is ready to work.

Now time to reboot your server and check either your /data01 is automatically mounted or not. If everything is fine, then your are golden.


Posted in Linux | Tagged , , , , , ,

Engine-setup hangs on “Creating CA” During Installation


Issue: ovirt-engine hang during installation. Stuck at Creating CA.

Please confirm installation settings (OK, Cancel) [OK]: 
[ INFO  ] Stage: Transaction setup
[ INFO  ] Stopping engine service
[ INFO  ] Stopping ovirt-fence-kdump-listener service
[ INFO  ] Stopping dwh service
[ INFO  ] Stopping Image I/O Proxy service
[ INFO  ] Stopping vmconsole-proxy service
[ INFO  ] Stopping websocket-proxy service
[ INFO  ] Stage: Misc configuration
[ INFO  ] Stage: Package installation
[ INFO  ] Stage: Misc configuration
[ INFO  ] Upgrading CA
[ INFO  ] Creating PostgreSQL 'engine' database
[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating PostgreSQL 'ovirt_engine_history' database
[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating CA

As a workaround, you can issue the following commands before running engine-setup:

# ovn-nbctl del-ssl
# ovn-sbctl del-ssl

this will remove ssl configuration and will allow you to complete the setup.

ref link:


Posted in Linux, oVirt, RHEV | Tagged , ,

Connect to RHEV/oVIrt Using CLI


To connect to your RHEV/oVirt using CLI (rhevm-shell/ovirt-shell)

# ovirt-shell -l https://skrinhitam.wordpress.com/ovirt-engine/api -u admin@internal --ca-file /etc/pki/ovirt-engine/ca.pem

Below is the location of the related certs.
To connect ‘securely’ to the rhevm-shell, the following files are required to be passed:
[key-file] – The client PEM key file to use : /etc/pki/ovirt-engine/private/ca.pem
[cert-file] – The client PEM certificate file to use : /etc/pki/ovirt-engine/certs/engine.cer
[ca-file] – The server CA certificate file to use : /etc/pki/ovirt-engine/ca.pem

Ref: https://ovirt.org/develop/release-management/features/infra/cli/


Posted in Linux, oVirt, RHEV, RHV | Tagged , ,

How to Add One User to Multiple Groups


The utility is usermod and is used like:

usermod -a -G group1,group2 username

Where username is the user you want to modify and group1 and group2 are the new groups you want that user to join. Running the command without the -a argument will remove that user from all groups except group1 and group2.

To check a users group memberships use the groups command:

groups username
Posted in Linux, UNIX | Tagged , , , , , , ,

Ovirt/RHEV Storage NFS EXPORT Domain Not Empty Troubleshooting


Issue: you try to add Export Domain (NFS) but getting the error The selected storage path is not empty (probably contains another Storage Domain). Either remove the existing Storage Domain from this path, or change the Storage path).

Cut short. Below is my solution.

Edit the storage metadata.

vi /path/to/export/domain/dom_md/metadata

Find and edit below line;

POOL_UUID=5a671dec-00ab-02de-0054-00000000018c (remove the value)
REMOTE_PATH=storage1:/nfs_exportdomain (adjust the correct path)
SDUUID=92cb18f1-d60d-4766-b7e8-0bb8499590b9 (remove the value. But in my  case I just left it untouched. You can try to comment it instead of remove the value. In some cases it works)
_SHA_CKSUM=fd9535ae26ae4128ab2c6b5fb5febd3c1cce3156 (remove this line or comment it)

Now try to add/import the storage again. If it doesn’t work. Reboot your storage and try again.

oVirt – https://goo.gl/rhzMGB
Youtube – https://goo.gl/XMC8Sw



Posted in oVirt, RHEV, RHV | Tagged , , , , ,

How to Install Spacewalk 2.8 in CentOS7/RHEL7

This is the simplest way on how to install Spacewalk in CentOS 7 or RHEL 7. For details and complete explanation please go to official page HowToInstall Spacewalk.


  • Outbound open ports 80, 443
  • Inbound open ports 80, 443, 5222 (only if you want to push actions to client machines) and 5269 (only for push actions to a Spacewalk Proxy), 69 udp if you want to use tftp
  • Storage for database: 250 KiB per client system + 500 KiB per channel + 230 KiB per package in channel (i.e. 1.1GiB for channel with 5000 packages)
  • Storage for packages (default /var/satellite): Depends on what you’re storing; Red Hat recommend 6GB per channel for their channels
  • 2GB RAM minimum, 4GB recommended
  • Make sure your underlying OS is fully up-to-date.
  • If you use LDAP as a central identity service and wish to pull user and group information from it, see SpacewalkWithLDAP
  • In the following steps we assume you have a default, CentOS7/RHEL7 installation of your operating system, without any customized setup of yum repositories, user management, security, etc.

Setting up FQDN
# vi /etc/hosts
add below line spacewalk.skrinhitam.local spacewalk

Setup EPEL Repo
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Setup Java Packages
# curl -O https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/java-packages/repo/epel-7/group_spacewalkproject-java-packages-epel-7.repo

Setup Spacewalk Repo
# rpm -Uvh https://copr-be.cloud.fedoraproject.org/results/@spacewalkproject/spacewalk-2.8/epel-7-x86_64/00736372-spacewalk-repo/spacewalk-repo-2.8-11.el7.centos.noarch.rpm

Configure firewall
# firewall-cmd --permanent --add-service=http ; firewall-cmd --permanent --add-service=https ; firewall-cmd --runtime-to-perm
# firewall-cmd --reload

PostgreSQL server, set up by Spacewalk
# yum -y install spacewalk-setup-postgresql

Install Spacewalk
# yum -y install spacewalk-postgresql

Initialize the PostgreSQL database before starting the installation.
# postgresql-setup initdb

Configuring Spacewalk
# spacewalk-setup

On complete, start the Spacewalk service if not started automatically.
# /usr/sbin/spacewalk-service start

Now open up your browser and navigate it to
https://ip-add-ress OR https://your-domain-name



Posted in Linux, RedHat | Tagged

Ovirt/RHEV: Cannot Start SPM on Other Hypervisor (host)


You keep getting below error whenever you try to put your hypervisor/host to Maintenance Mode.

"Failed to change status of host Hypervisor01 due to a failure to stop the spm"

-Force SPM to restart on the other hypervisor/host.
-SSH to specific hypervisor/host and restart vdsmd services.

systemctl restart vdsmd

Since the Red Hat Enterprise Virtualization or oVirt Manager ensures that the SPM is always available, the Manager will moves the SPM role to a different host if the SPM host encounters problems accessing the storage.

In our case, SPM is running in Hypervisor01, when you restart vdsmd service, manager will force SPM role to start on the other Hypervisor (Hypervisor02, 03 or whatever you name it). After SPM have moved to another Hypervisor, you can put Hypervisor01 to maintenance mode.


Posted in oVirt, RHEV, RHV | Tagged , , ,

Changing the Hostname of an oVirt Manager/Engine


Prepare relevant DNS and/or /etc/hosts records for the new name.
If using DHCP, update the DHCP server’s configuration.
Change the hostname. This is usually done by editing /etc/hostname and rebooting. There are other options and details which are not in the scope of this document.
Run the script ovirt-engine-rename:

# /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename

It’s otopi-based. This means, among other things, that it looks similar engine-setup/cleanup, and provides similar logging, options, etc.


Posted in Linux, oVirt, RHEV

How to Check RAM/Memory by Percentage


Using the the free command:

This will report the percentage of memory in use
% free | grep Mem | awk '{print $3/$2 * 100.0}'

This will report the percentage of memory that’s free
% free | grep Mem | awk '{print $4/$2 * 100.0}'

You could create an alias for this command or put this into a tiny shell script. The specific output could be tailored to your needs using formatting commands for the print statement along these lines:
free | grep Mem | awk '{ printf("free: %.4f %\n", $4/$2 * 100.0) }'


Posted in Linux | Tagged , , , ,