Advertisements

Category Archives: Linux

Installing Insight Diagnostics Online Edition for Linux on Red Hat Enterprise Linux 6

Download HPE System Management Homepage for Linux (AMD64/EM64T) hpsmh-7.6.1-9.x86_64.rpm
http://h20565.www2.hpe.com/hpsc/swd/public/detail?sp4ts.oid=8230346&swItemId=MTX_ee014bd76e7a4eef958b8d174d&swEnvOid=4103

You also need to download Insight Diagnostics Online Edition for Linux (x86-64) hpdiags-10.50.2007-2076.linux.x86_64.rpm https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_b0c4c90c82504b16abdd8fe7dd&swEnvOid=4103

Install both packages

root@linux:/tmp # rpm -ivh hpsmh-7.6.1-9.x86_64.rpm hpdiags-10.50.2007-2076.linux.x86_64.rpm
warning: hpsmh-7.6.1-9.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 26c2b797: NOKEY
warning: hpdiags-10.50.2007-2076.linux.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID c5399b1d: NOKEY
Preparing… ########################################### [100%]
Detected Red Hat Enterprise Linux AS/ES/WS/SERVER 6
Created hpsmh user and group…
1:hpsmh ########################################### [ 50%]

**********************************************************
* System Management Homepage installed successfully with *
* default configuration values. To change the default *
* configuration values, type the following command at *
* the root prompt: *
* *
* /opt/hp/hpsmh/sbin/smhconfig *
* *
**********************************************************

2:hpdiags ########################################### [100%]

Stopping hpsmhd: [ OK ]
Starting hpsmhd: [ OK ]

It installs in /opt/hp/hpdiags

root@linux:/opt/hp/hpdiags # ./hpdiags -p -rd -o /tmp/`hostname`_diag
HP Insight Diagnostics Version 10.50.2007A (x86_64)
Copyright (c) 2002, 2015 Hewlett-Packard Development Company, L.P.
System configuration capture running (Cannot open /etc/hba.conf
System configuration capture completed (100%)
completed (100%)

root@linux:/opt/hp/hpdiags # ./hpdiags -h
HP Insight Diagnostics Version 10.50.2007A (x86_64)
Copyright (c) 2002, 2015 Hewlett-Packard Development Company, L.P.
Syntax: hpdiags [options]
Valid options:

-l languageCode options: en, fr, it, de, es, ja, zh (Default: en)

-v [Level] Verbosity level of output between 1 and 5.
where 1 is the most terse level and 5 is the most verbose.
The default value is set to 5.

-s mmhhddMMDD Schedule automatic execution of Insight Diagnostics.
mm=minute(0-59), hh=hour(0-23), dd=day(1-31),
MM=month(1-12), DD=weekday(0-6)
All fields must be two digits (e.g. 02 instead of 2).
Use a single ‘*’ for don’t care fields.
NOTE: If you use ‘*’ you must use double-quotes around the
date/time value. (e.g. -s “0023***”)

-u Remove scheduled automatic execution of Insight Diagnostics.

-c FILE1 [FILE2] Compare a survey file to the current configuration
or, if two files are specified, compare the files.

-t Output to the terminal. May not be used with -o.

-p Specify output file format as plain text, instead of XML.
Only applies to Survey captures and comparisons.
Off by default.

-o FILE Specify output file name. By default, a file name is formed
using the current date and time in this format:
“surveyYYYY-MM-DD-hh-mm-ss.xml”
(YYYY=year, MM=month, DD=day, hh=hour, mm=minute, ss=second)
May not be used with -t.

-f Overwrite output file if it already exists.
NOTE: If no -o option is specified this option is ignored.

-a Append output file if it already exists.
NOTE: If no -o option is specified this option is ignored.
The -a option may only be used with plain text (-p).
This is because appending to XML files would result in XML parsing errors.

-rd Run a diagnosis of all diagnosable devices.

-? , -h Display this help message.

Advertisements

Installing Ansible for CentOS 6 using the EPEL repository

I’m going to install ansible from Extra Packages for Enterprise Linux (or EPEL)

On CentOS, you need to install the repository file that it is included in the extras repository

root@linux:~ # yum list epel-release
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.xpg.com.br
* extras: centos.xpg.com.br
* updates: mirror.ufscar.br
Available Packages
epel-release.noarch 6-8 extras

Install the package epel-release

root@linux:~ # yum install -y epel-release
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.xpg.com.br
* extras: centos.xpg.com.br
* updates: mirror.ufscar.br
Resolving Dependencies
–> Running transaction check
—> Package epel-release.noarch 0:6-8 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
epel-release noarch 6-8 extras 14 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 14 k
Installed size: 22 k
Downloading Packages:
epel-release-6-8.noarch.rpm | 14 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : epel-release-6-8.noarch 1/1
Verifying : epel-release-6-8.noarch 1/1

Installed:
epel-release.noarch 0:6-8

Complete!

Install ansible and all the dependencies

root@linux:~ # yum install -y ansible
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 2.4 kB 00:00
* base: centos.xpg.com.br
* epel: mirror.globo.com
* extras: centos.xpg.com.br
* updates: mirror.ufscar.br
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:05
Resolving Dependencies
–> Running transaction check
—> Package ansible.noarch 0:2.3.2.0-1.el6 will be installed
–> Processing Dependency: sshpass for package: ansible-2.3.2.0-1.el6.noarch
–> Processing Dependency: python2-jmespath for package: ansible-2.3.2.0-1.el6.noarch
–> Processing Dependency: python-simplejson for package: ansible-2.3.2.0-1.el6.noarch
–> Processing Dependency: python-keyczar for package: ansible-2.3.2.0-1.el6.noarch
–> Processing Dependency: python-jinja2-26 for package: ansible-2.3.2.0-1.el6.noarch
–> Processing Dependency: python-httplib2 for package: ansible-2.3.2.0-1.el6.noarch
–> Processing Dependency: python-crypto2.6 for package: ansible-2.3.2.0-1.el6.noarch
–> Processing Dependency: PyYAML for package: ansible-2.3.2.0-1.el6.noarch
–> Running transaction check
—> Package PyYAML.x86_64 0:3.10-3.1.el6 will be installed
–> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-3.1.el6.x86_64
—> Package python-crypto2.6.x86_64 0:2.6.1-2.el6 will be installed
—> Package python-httplib2.noarch 0:0.7.7-1.el6 will be installed
—> Package python-jinja2-26.noarch 0:2.6-3.el6 will be installed
–> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-26-2.6-3.el6.noarch
–> Processing Dependency: python-markupsafe for package: python-jinja2-26-2.6-3.el6.noarch
—> Package python-keyczar.noarch 0:0.71c-1.el6 will be installed
–> Processing Dependency: python-pyasn1 for package: python-keyczar-0.71c-1.el6.noarch
—> Package python-simplejson.x86_64 0:2.0.9-3.1.el6 will be installed
—> Package python2-jmespath.noarch 0:0.9.0-2.el6 will be installed
—> Package sshpass.x86_64 0:1.06-1.el6 will be installed
–> Running transaction check
—> Package libyaml.x86_64 0:0.1.3-4.el6_6 will be installed
—> Package python-babel.noarch 0:0.9.4-5.1.el6 will be installed
—> Package python-markupsafe.x86_64 0:0.9.2-4.el6 will be installed
—> Package python-pyasn1.noarch 0:0.0.12a-1.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ansible noarch 2.3.2.0-1.el6 epel 5.9 M
Installing for dependencies:
PyYAML x86_64 3.10-3.1.el6 base 157 k
libyaml x86_64 0.1.3-4.el6_6 base 52 k
python-babel noarch 0.9.4-5.1.el6 base 1.4 M
python-crypto2.6 x86_64 2.6.1-2.el6 epel 513 k
python-httplib2 noarch 0.7.7-1.el6 epel 70 k
python-jinja2-26 noarch 2.6-3.el6 epel 527 k
python-keyczar noarch 0.71c-1.el6 epel 219 k
python-markupsafe x86_64 0.9.2-4.el6 base 22 k
python-pyasn1 noarch 0.0.12a-1.el6 base 70 k
python-simplejson x86_64 2.0.9-3.1.el6 base 126 k
python2-jmespath noarch 0.9.0-2.el6 epel 39 k
sshpass x86_64 1.06-1.el6 epel 20 k

Transaction Summary
================================================================================
Install 13 Package(s)

Total download size: 9.1 M
Installed size: 40 M
Downloading Packages:
(1/13): PyYAML-3.10-3.1.el6.x86_64.rpm | 157 kB 00:00
(2/13): ansible-2.3.2.0-1.el6.noarch.rpm | 5.9 MB 00:05
(3/13): libyaml-0.1.3-4.el6_6.x86_64.rpm | 52 kB 00:00
(4/13): python-babel-0.9.4-5.1.el6.noarch.rpm | 1.4 MB 00:01
(5/13): python-crypto2.6-2.6.1-2.el6.x86_64.rpm | 513 kB 00:00
(6/13): python-httplib2-0.7.7-1.el6.noarch.rpm | 70 kB 00:00
(7/13): python-jinja2-26-2.6-3.el6.noarch.rpm | 527 kB 00:00
(8/13): python-keyczar-0.71c-1.el6.noarch.rpm | 219 kB 00:00
(9/13): python-markupsafe-0.9.2-4.el6.x86_64.rpm | 22 kB 00:00
(10/13): python-pyasn1-0.0.12a-1.el6.noarch.rpm | 70 kB 00:00
(11/13): python-simplejson-2.0.9-3.1.el6.x86_64.rpm | 126 kB 00:00
(12/13): python2-jmespath-0.9.0-2.el6.noarch.rpm | 39 kB 00:00
(13/13): sshpass-1.06-1.el6.x86_64.rpm | 20 kB 00:00
——————————————————————————–
Total 878 kB/s | 9.1 MB 00:10
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6) <epel@fedoraproject.org>
Package: epel-release-6-8.noarch (@extras)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : python-markupsafe-0.9.2-4.el6.x86_64 1/13
Installing : python-httplib2-0.7.7-1.el6.noarch 2/13
Installing : python-pyasn1-0.0.12a-1.el6.noarch 3/13
Installing : python-keyczar-0.71c-1.el6.noarch 4/13
Installing : python-crypto2.6-2.6.1-2.el6.x86_64 5/13
Installing : python-simplejson-2.0.9-3.1.el6.x86_64 6/13
Installing : python2-jmespath-0.9.0-2.el6.noarch 7/13
Installing : libyaml-0.1.3-4.el6_6.x86_64 8/13
Installing : PyYAML-3.10-3.1.el6.x86_64 9/13
Installing : sshpass-1.06-1.el6.x86_64 10/13
Installing : python-babel-0.9.4-5.1.el6.noarch 11/13
Installing : python-jinja2-26-2.6-3.el6.noarch 12/13
Installing : ansible-2.3.2.0-1.el6.noarch 13/13
Verifying : PyYAML-3.10-3.1.el6.x86_64 1/13
Verifying : python-babel-0.9.4-5.1.el6.noarch 2/13
Verifying : sshpass-1.06-1.el6.x86_64 3/13
Verifying : python-keyczar-0.71c-1.el6.noarch 4/13
Verifying : libyaml-0.1.3-4.el6_6.x86_64 5/13
Verifying : python2-jmespath-0.9.0-2.el6.noarch 6/13
Verifying : python-simplejson-2.0.9-3.1.el6.x86_64 7/13
Verifying : ansible-2.3.2.0-1.el6.noarch 8/13
Verifying : python-jinja2-26-2.6-3.el6.noarch 9/13
Verifying : python-crypto2.6-2.6.1-2.el6.x86_64 10/13
Verifying : python-pyasn1-0.0.12a-1.el6.noarch 11/13
Verifying : python-httplib2-0.7.7-1.el6.noarch 12/13
Verifying : python-markupsafe-0.9.2-4.el6.x86_64 13/13

Installed:
ansible.noarch 0:2.3.2.0-1.el6

Dependency Installed:
PyYAML.x86_64 0:3.10-3.1.el6
libyaml.x86_64 0:0.1.3-4.el6_6
python-babel.noarch 0:0.9.4-5.1.el6
python-crypto2.6.x86_64 0:2.6.1-2.el6
python-httplib2.noarch 0:0.7.7-1.el6
python-jinja2-26.noarch 0:2.6-3.el6
python-keyczar.noarch 0:0.71c-1.el6
python-markupsafe.x86_64 0:0.9.2-4.el6
python-pyasn1.noarch 0:0.0.12a-1.el6
python-simplejson.x86_64 0:2.0.9-3.1.el6
python2-jmespath.noarch 0:0.9.0-2.el6
sshpass.x86_64 0:1.06-1.el6

Complete!

Check the UUID for eth0

If you cloned a VM and need to reconfigure the network configuration for eth0, it will ask for the UUID of eth0

root@linux:~ # cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=ffdc3088-dd65-4a81-b1e1-02f0a7252528
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
HWADDR=08:00:27:9A:74:85
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=”System eth0″

To view the current UUID for eth0 on your system use uuidgen

root@linux:~ # uuidgen eth0
ffdc3088-dd65-4a81-b1e1-02f0a7252528

View the MAC address using ip address list

Linux Fibre HBA in status Linkdown

root@linux:~ # systool -c fc_host -v
Class = “fc_host”

Class Device = “host1”
Class Device path = “/sys/class/fc_host/host1”
fabric_name = “0x100000051e36219e”
issue_lip =
node_name = “0x50060b0000c29e39”
port_id = “0x1ebe01”
port_name = “0x50060b0000c29e38”
port_state = “Online”
port_type = “NPort (fabric via point-to-point)”
speed = “4 Gbit”
supported_classes = “Class 3”
supported_speeds = “1 Gbit, 2 Gbit, 4 Gbit”
symbolic_name = “QMH2462 FW:v5.06.03 DVR:v8.03.07.15.05.09-k”
system_hostname = “”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host1”
Device path = “/sys/devices/pci0000:00/0000:00:09.0/0000:09:00.0/host1”
fw_dump =
nvram = “ISP ”
optrom_ctl =
optrom =
reset =
uevent =
vpd = “▒8”

Class Device = “host2”
Class Device path = “/sys/class/fc_host/host2”
fabric_name = “0x50060b0000c29e3b”
issue_lip =
node_name = “0x50060b0000c29e3b”
port_id = “0x000000”
port_name = “0x50060b0000c29e3a”
port_state = “Linkdown
port_type = “Unknown
speed = “unknown
supported_classes = “Class 3”
supported_speeds = “1 Gbit, 2 Gbit, 4 Gbit”
symbolic_name = “QMH2462 FW:v5.06.03 DVR:v8.03.07.15.05.09-k”
system_hostname = “”
tgtid_bind_type = “wwpn (World Wide Port Name)”
uevent =

Device = “host2”
Device path = “/sys/devices/pci0000:00/0000:00:09.0/0000:09:00.1/host2”
fw_dump =
nvram = “ISP ”
optrom_ctl =
optrom =
reset =
uevent =
vpd = “▒8”

Perform diagnostic steps below to isolate initialization issue. Engaged hardware vendor to check the card

Updating Suse Linux 11 to Suse Linux SP2 using ISO image

Create a directory to mount the ISO image and then mount it

suse11:/var/tmp # mkdir /root/iso

suse11:/var/tmp # mount -o loop /var/tmp/SLES-11-SP2-DVD-x86_64-GM-DVD1.iso /root/iso/

suse11:/var/tmp # df -h /root/iso
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 3.1G 3.1G 0 100% /root/iso

Add the directory as a new repository. In the example below, I’m calling my repository Suse11SP2

suse11:/var/tmp # zypper ar /root/iso/ Suse11SP2
Adding repository ‘Suse11SP2’ [done]
Repository ‘Suse11SP2’ successfully added
Enabled: Yes
Autorefresh: No
URI: dir:///root/iso

Refresh the repository

suse11:/var/tmp # zypper ref
Retrieving repository ‘Suse11SP2’ metadata [done]
Building repository ‘Suse11SP2’ cache [done]
All repositories have been refreshed.

List the repositories

suse11:/var/tmp # zypper ls
# | Alias | Name | Enabled | Refresh | Type
–+————————————–+————————————–+———+———+——
1 | SUSE-Linux-Enterprise-Server-11 11-0 | SUSE-Linux-Enterprise-Server-11 11-0 | Yes | No | yast2
2 | Suse11SP2 | Suse11SP2 | Yes | No | yast2

Upgrading my system with repository called Suse11SP2

suse11:/var/tmp # zypper dup -r Suse11SP2
Loading repository data…
Reading installed packages…
Computing distribution upgrade…

The following packages are going to be upgraded:
ConsoleKit ConsoleKit-32bit ConsoleKit-x11 Mesa Mesa-32bit MozillaFirefox
MozillaFirefox-branding-SLED MozillaFirefox-translations NetworkManager-glib
OpenEXR OpenIPMI PolicyKit PolicyKit-32bit PolicyKit-doc PolicyKit-gnome
PolicyKit-gnome-libs PolicyKit-gnome-libs-32bit SuSEfirewall2 a2ps aaa_base acl acpid
akonadi-runtime alsa alsa-plugins alsa-plugins-pulse apparmor-admin_en apparmor-docs
apparmor-parser apparmor-profiles apparmor-utils at at-spi at-spi-32bit at-spi-lang
atk atk-lang audiofile audiofile-32bit audit audit-audispd-plugins audit-libs
audit-libs-32bit audit-libs-python autofs autoyast2 autoyast2-installation bash
bash-doc bind-libs bind-libs-32bit bind-utils binutils blktrace bluez bootsplash
branding-SLES bzip2 cairo cairo-32bit cdparanoia cdrkit-cdrtools-compat
cmpi-bindings-pywbem command-not-found coreutils coreutils-lang cpio cpio-lang cpp43
cracklib cracklib-32bit crash crash-sial cron cryptconfig cryptconfig-32bit cryptsetup
cups cups-autoconfig cups-client cups-libs cups-libs-32bit curl cyrus-sasl
cyrus-sasl-32bit cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapi
cyrus-sasl-gssapi-32bit cyrus-sasl-plain cyrus-sasl-plain-32bit dasher dasher-lang
dbus-1 dbus-1-32bit dbus-1-glib dbus-1-glib-32bit dbus-1-python dbus-1-qt3 dbus-1-x11
dejavu delayacct-utils desktop-data-SLED desktop-data-SLES-extra-gnome
desktop-translations device-mapper device-mapper-32bit dhcpcd dialog diffutils dmapi
dmraid dos2unix dosfstools e2fsprogs ed efibootmgr eject elfutils elilo emacs emacs-info
emacs-x11 enscript eog eog-lang ethtool evince evince-lang evolution-data-server
evolution-data-server-32bit evolution-data-server-lang expat expect file file-32bit
file-roller file-roller-lang filesystem findutils foomatic-filters freetype2
freetype2-32bit fuse gawk gcalctool gcalctool-lang gcc43 gcc43-32bit gcc43-c++
gcc43-info gcc43-locale gconf-editor gconf-editor-lang gconf2 gconf2-32bit
gconf2-branding-SLES gconf2-lang gdb gdm gdm-branding-upstream gdm-lang gedit
gedit-lang genisoimage gfxboot gfxboot-branding-SLES ghostscript-fonts-other
ghostscript-fonts-std ghostscript-library ghostscript-omni ghostscript-x11 glib2
glib2-lang glibc glibc-32bit glibc-devel glibc-devel-32bit glibc-i18ndata glibc-info
glibc-locale glibc-locale-32bit glibmm2 gmime gnokii gnome-applets gnome-applets-lang
gnome-control-center gnome-control-center-lang gnome-desktop gnome-desktop-lang
gnome-doc-utils gnome-icon-theme gnome-keyring gnome-keyring-32bit
gnome-keyring-lang gnome-mag gnome-mag-lang gnome-main-menu gnome-main-menu-lang
gnome-media gnome-media-lang gnome-menus gnome-menus-editor gnome-menus-lang
gnome-mime-data gnome-mount gnome-mount-lang gnome-nettool gnome-nettool-lang
gnome-panel gnome-panel-32bit gnome-panel-lang gnome-power-manager
gnome-power-manager-lang gnome-python-desktop gnome-screensaver
gnome-screensaver-lang gnome-session gnome-session-lang gnome-settings-daemon
gnome-settings-daemon-lang gnome-speech gnome-system-monitor
gnome-system-monitor-lang gnome-terminal gnome-terminal-lang gnome-themes
gnome-utils gnome-utils-lang gnome-vfs2 gnome-vfs2-32bit gnome-vfs2-lang gok gok-lang
gpg2 gpg2-lang grep groff grub gstreamer-0_10 gstreamer-0_10-lang
gstreamer-0_10-plugins-base gstreamer-0_10-plugins-base-lang
gstreamer-0_10-plugins-good gstreamer-0_10-plugins-good-lang gtk2 gtk2-32bit
gtk2-lang gtk2-theme-SLED gtkmm2 gtksourceview-lang gucharmap gucharmap-lang gvfs
gvfs-backends gvfs-fuse gvfs-lang gzip hal hal-32bit hdparm hplip hplip-hpijs hwinfo
icedax input-utils insserv inst-source-utils ipmitool iproute2 iptables iputils
irqbalance ivman java-1_6_0-ibm java-1_6_0-ibm-fonts java-1_6_0-ibm-jdbc k3b k3b-lang
kbd kde-susetranslations kde4-filesystem kde4-kgreeter-plugins kde4-kupdateapplet
kdebase4 kdebase4-SLED kdebase4-SLED-lang kdebase4-libkonq kdebase4-runtime
kdebase4-session kdebase4-wallpapers kdebase4-workspace
kdebase4-workspace-branding-SLED kdebase4-workspace-ksysguardd kdelibs3
kdelibs3-default-style kdelibs4 kdelibs4-core kdenetwork4-filesharing kdepim4
kdepim4-wizards kdepimlibs4 kdump kernel-default kernel-default-base kernel-source
kexec-tools klogd kpartx krb5 krb5-32bit ksh lcms libHX13 libHX13-32bit libMagickCore1
libQtWebKit4 libacl libacl-32bit libaio libaio-32bit libaio-devel libaio-devel-32bit
libakonadi4 libakonadiprotocolinternals1 libapparmor1 libart_lgpl libart_lgpl-32bit
libasm1 libasound2 libasound2-32bit libatk-1_0-0 libatk-1_0-0-32bit libavahi-client3
libavahi-client3-32bit libavahi-common3 libavahi-common3-32bit libavahi-glib1
libavahi-glib1-32bit libblkid1 libbluetooth3 libbonobo libbonobo-32bit
libbonobo-lang libbonoboui libbonoboui-32bit libbonoboui-lang libbz2-1
libbz2-1-32bit libcanberra-gtk libcanberra-gtk-32bit libcanberra-gtk0
libcanberra-gtk0-32bit libcanberra0 libcanberra0-32bit libcap2 libcap2-32bit
libcom_err2 libcom_err2-32bit libcryptsetup0 libcurl4 libcurl4-32bit libdns_sd libdrm
libdrm-32bit libdw1 libebl1 libelf0 libelf1 libesd0 libesd0-32bit libesmtp libexpat1
libexpat1-32bit libext2fs2 libfprint0 libfuse2 libgcrypt11 libgcrypt11-32bit
libgimpprint libgio-2_0-0 libgio-2_0-0-32bit libglade2 libglade2-32bit libglib-2_0-0
libglib-2_0-0-32bit libgmime-2_0-3 libgmodule-2_0-0 libgmodule-2_0-0-32bit libgnome
libgnome-32bit libgnome-lang libgnome-menu2 libgnome-menu2-32bit libgnomecanvas
libgnomecanvas-32bit libgnomecanvas-lang libgnomekbd libgnomekbd-lang libgnomeprint
libgnomeprint-lang libgnomeprintui libgnomeprintui-lang libgnomesu libgnomesu-lang
libgnomesu0 libgnomeui libgnomeui-32bit libgnomeui-lang libgnutls26
libgnutls26-32bit libgobject-2_0-0 libgobject-2_0-0-32bit libgpg-error0
libgpg-error0-32bit libgphoto2 libgphoto2-lang libgssglue1 libgstinterfaces-0_10-0
libgstreamer-0_10-0 libgstreamer-0_10-0-32bit libgthread-2_0-0
libgthread-2_0-0-32bit libgtksourceview-2_0-0 libgtop libgtop-2_0-7 libgtop-lang
libgvfscommon0 libgweather libgweather-lang libgweather1 libgweather1-32bit libical0
libicu libidl libidl-32bit libjasper libjasper-32bit libkde4 libkdecore4 libkdepim4
libkdepimlibs4 libkonq5 liblcms1 liblcms1-32bit libldap-2_4-2 libldap-2_4-2-32bit
libldapcpp1 libltdl7 libltdl7-32bit libmysqlclient15 libmysqlclient_r15 libnetpbm10
libnetpbm10-32bit libnotify libnotify1 libnuma1 libopensc2 libopensc2-32bit
libopenssl0_9_8 libopenssl0_9_8-32bit libpangomm-1_4-1 libpcap0 libphonon4
libpng12-0 libpng12-0-32bit libpoppler-glib4 libpoppler-qt4-3 libpulse0
libpulse0-32bit libpython2_6-1_0 libqca2 libqimageblitz4 libqt4 libqt4-32bit
libqt4-qt3support libqt4-sql libqt4-sql-32bit libqt4-sql-mysql libqt4-x11
libqt4-x11-32bit libreadline5 librsvg librsvg-32bit libselinux1 libselinux1-32bit
libsensors4 libsepol1 libsepol1-32bit libsmbclient0 libsmbclient0-32bit libsmbios2
libsndfile libsnmp15 libsoprano4 libsoup-2_4-1 libsoup-2_4-1-32bit libsqlite3-0
libsqlite3-0-32bit libssh2-1 libstdc++43-devel libstdc++43-devel-32bit libstrigi0
libtasn1 libtasn1-3 libtdb1 libtdb1-32bit libtheora0 libtiff3 libtiff3-32bit libtirpc1
libtool libtool-32bit libusb-0_1-4 libuuid1 libuuid1-32bit libvorbis libvorbis-32bit
libwbclient0 libwbclient0-32bit libwnck libwnck-1-22 libwnck-1-22-32bit libwnck-lang
libwsman1 libxcrypt libxcrypt-32bit libxml2 libxml2-32bit libxml2-python libzip1
libzypp limal limal-ca-mgm limal-ca-mgm-perl limal-nfs-server limal-nfs-server-perl
limal-perl linux-kernel-headers login logrotate lsb lsof lsscsi lvm2 makedumpfile
man-pages mcelog mdadm metacity metacity-lang microcode_ctl mkinitrd module-init-tools
mozilla-nspr mozilla-nspr-32bit mozilla-nss mozilla-nss-32bit multipath-tools mutt
mysql mysql-client nautilus nautilus-32bit nautilus-cd-burner
nautilus-cd-burner-32bit nautilus-cd-burner-lang nautilus-lang
nautilus-open-terminal nautilus-open-terminal-lang nautilus-share
nautilus-share-lang net-tools netcfg netpbm nfs-client nfs-doc notification-daemon
notification-daemon-lang nscd ntp numactl openldap2 openldap2-client opensc
opensc-32bit openslp openslp-32bit openslp-server openssh openssh-askpass openssl
openssl-certs openwsman-client openwsman-server opie opie-32bit orarun orbit2
orbit2-32bit oxygen-icon-theme oxygen-icon-theme-scalable pam pam-32bit pam-config
pam-doc pam-modules pam-modules-32bit pam_mount pam_mount-32bit pango pango-32bit
parted parted-32bit patch pciutils pciutils-32bit pciutils-ids pcsc-lite
pcsc-lite-32bit perl perl-32bit perl-Bootloader perl-Crypt-SSLeay perl-HTML-Parser
perl-IO-Socket-SSL perl-base perl-doc perl-libwww-perl perl-satsolver
perl-spamassassin permissions phonon phonon-backend-gstreamer-0_10 pinentry
pinentry-qt plasma-theme-aya pm-profiler pm-utils pmtools poppler-data poppler-tools
popt popt-32bit postfix ppp procmail procps psmisc pulseaudio pulseaudio-esound-compat
pwdutils pwdutils-plugin-audit python python-base python-gnome-menus python-gobject2
python-gtk python-notify python-qt4 python-satsolver python-sip python-xml pyxml quota
rarian readline-doc release-notes-sles rpm rpm-32bit rpm-python rsh rsvg-view rsync
samba samba-32bit samba-client sane-backends sash satsolver-tools sax2 sax2-gui
sax2-ident sax2-libsax sax2-libsax-perl sax2-tools sblim-cmpi-base sblim-sfcb
sblim-sfcc sblim-wbemcli scout screen sg3_utils shared-mime-info sles-admin_en-pdf
sles-deployment_en-pdf sles-installquick_en-pdf sles-manuals_en sles-release
sles-release-DVD sles-security_en-pdf sles-storage_en-pdf smartmontools
smis-providers snmp-mibs soprano soprano-backend-redland spamassassin sqlite3 star
strace strace-32bit sudo supportutils suse-build-key suse-sam suseRegister suspend
sysconfig sysfsutils sysfsutils-32bit syslinux syslog-ng sysstat sysstat-isag
system-config-printer system-config-printer-lang sysvinit t1lib tango-icon-theme tar
tcsh tightvnc timezone timezone-java tk tk-32bit totem-pl-parser totem-pl-parser-lang
udev ulimit unzip usbutils utempter utempter-32bit util-linux util-linux-lang
uuid-runtime vim vim-base vim-data vino vino-lang vlan vsftpd vte vte-doc vte-lang w3m wget
wireless-tools wodim x86info xfsprogs xinetd xkeyboard-config xlockmore xorg-x11
xorg-x11-Xvnc xorg-x11-driver-input xorg-x11-driver-video
xorg-x11-driver-video-radeonhd xorg-x11-driver-video-unichrome xorg-x11-libX11
xorg-x11-libX11-32bit xorg-x11-libXext xorg-x11-libXext-32bit xorg-x11-libs
xorg-x11-libs-32bit xorg-x11-libxcb xorg-x11-libxcb-32bit xorg-x11-server
xorg-x11-server-extra xorg-x11-xauth xscreensaver yast2 yast2-add-on
yast2-add-on-creator yast2-apparmor yast2-audit-laf yast2-autofs yast2-backup
yast2-bootloader yast2-ca-management yast2-control-center
yast2-control-center-gnome yast2-control-center-qt yast2-core yast2-country
yast2-country-data yast2-dhcp-server yast2-dirinstall yast2-dns-server
yast2-fingerprint-reader yast2-firewall yast2-ftp-server yast2-hardware-detection
yast2-http-server yast2-installation yast2-instserver yast2-irda yast2-iscsi-client
yast2-iscsi-server yast2-isns yast2-kdump yast2-kerberos-client
yast2-kerberos-server yast2-ldap yast2-ldap-client yast2-ldap-server yast2-libyui
yast2-mail yast2-mail-plugins yast2-ncurses yast2-ncurses-pkg yast2-network
yast2-nfs-client yast2-nfs-common yast2-nfs-server yast2-nis-client
yast2-ntp-client yast2-online-update yast2-online-update-frontend yast2-packager
yast2-pam yast2-perl-bindings yast2-pkg-bindings yast2-power-management
yast2-printer yast2-profile-manager yast2-python-bindings yast2-qt yast2-qt-pkg
yast2-registration yast2-registration-branding-SLE yast2-repair yast2-restore
yast2-runlevel yast2-samba-client yast2-samba-server yast2-schema yast2-security
yast2-slp-server yast2-sound yast2-squid yast2-storage yast2-storage-lib
yast2-support yast2-theme-SLE yast2-trans-en_US yast2-transfer yast2-update
yast2-users yast2-vm yast2-wagon yast2-x11 yast2-ycp-ui-bindings yelp yelp-lang
yp-tools zenity zenity-lang zip zypper

The following product is going to be upgraded:
SUSE_SLES

The following NEW packages are going to be installed:
PackageKit PackageKit-lang akregator ark augeas-lenses blt brasero brasero-lang
bridge-utils cifs-utils dolphin gnome-doc-utils-lang gwenview haveged kaddressbook
kalarm kcalc kde4-kupdateapplet-packagekit kdebase4-runtime-branding-SLED
kdelibs4-branding-SLED kdepasswd kdepim4-runtime kdessh kdialog kdm kdm-branding-SLED
keditbookmarks kernel-default-devel kernel-firmware kfind kfloppy kgpg kio_sysinfo
kio_sysinfo-branding-SLED kiosktool kmail kmix knotes konqueror konqueror-plugins
konqueror-plugins-lang konsole kontact kopete korganizer ksnapshot ktimetracker
kwalletmanager kwikdisk kwin kwrite libFLAC8-32bit libaugeas0 libblkid1-32bit
libboost_program_options1_36_0 libbrasero-burn0 libbrasero-media0
libcdda_interface0 libcdda_paranoia0 libcolorblind0 libfreebl3 libfreebl3-32bit
libgcc46 libgcc46-32bit libgmime-2_4-2 libgnome-desktop-2-11
libgnome-desktop-2-11-32bit libgnome-window-settings1 libgomp46 libgomp46-32bit
libgstapp-0_10-0 libical0-32bit libjack0 libkexiv2-7 libkipi6
libknotificationitem-1-1 libldb1 liblzma5 liblzma5-32bit libmsn0_1 liborc-0_4-0
libpackagekit-glib10 libpciaccess0 libpciaccess0-32bit libpixman-1-0
libpixman-1-0-32bit libpolkit-qt0 libpoppler5 libproxy0 libproxy0-32bit
libproxy0-config-gnome libproxy0-config-kde4 libpulse-mainloop-glib0
libpython2_6-1_0-32bit libqt4-qt3support-32bit libslab-lang libslab0
libsmbios2-32bit libsndfile-32bit libstdc++46 libstdc++46-32bit libtalloc2
libtalloc2-32bit libtasn1-3-32bit libtelepathy-glib0 libtevent0 libudev0
libudev0-32bit libunique-1_0-0 libusb-1_0-0 libxklavier15 lsb-release meanwhile
mozilla-kde4-integration mozilla-xulrunner192 mozilla-xulrunner192-gnome
mpt-firmware okular perl-Crypt-OpenSSL-RSA perl-IO-Socket-INET6 perl-Mail-DKIM
perl-MailTools perl-NetAddr-IP perl-Socket6 perl-WWW-Curl perl-apparmor
plasma-addons plasmoid-quickaccess pulseaudio-lang python-argparse python-numpy
python-tk re2c samba-client-32bit subscription-tools suse-sam-data tunctl xz xz-lang
yast2-dbus-client yast2-dbus-server zypper-log

The following packages are going to be REMOVED:
PolicyKit-kde PolicyKit-kde-lang cifs-mount gtksourceview kde4-akonadi
kde4-akregator kde4-ark kde4-dolphin kde4-gwenview kde4-kaddressbook kde4-kalarm
kde4-kcalc kde4-kdepasswd kde4-kdessh kde4-kdm kde4-kdm-branding-SLED
kde4-keditbookmarks kde4-kfind kde4-kfloppy kde4-kgpg kde4-kio_sysinfo
kde4-kio_sysinfo-branding-SLED kde4-kiosktool kde4-kmail kde4-kmix kde4-knotes
kde4-konqueror kde4-konqueror-plugins kde4-konqueror-plugins-lang kde4-konsole
kde4-kontact kde4-kopete kde4-korganizer kde4-ksnapshot kde4-ktimetracker
kde4-kupdateapplet-zypp kde4-kwalletmanager kde4-kwikdisk kde4-kwin kde4-kwrite
kde4-okular kde4-plasma-addons kde4-plasmoid-quickaccess
kde4-plasmoid-quicklauncher libgcc43 libgcc43-32bit libgomp43 libgomp43-32bit
libpfm3 libpulsecore7 libsoup libstdc++43 libstdc++43-32bit libxklavier linux32
perl-libapparmor pfmon powerdevil powerdevil-lang qlogic-firmware
x11-input-synaptics

The following packages are going to change architecture:
apparmor-docs apparmor-utils gnome-doc-utils yast2-schema

The following packages are not supported by their vendor:
libmysqlclient15 libmysqlclient_r15 mysql mysql-client

Overall download size: 1002.0 M. After the operation, additional 687.5 M will be used.
Continue? [YES/no]: y

After “downloading” the packages, accept the terms of the license

Do you agree with the terms of the license? [yes/NO]: yes

Red Hat Enterprise Linux 5 with Cluster Suite Software is inquorate

One of the nodes of a Red Hat Enterprise Linux 5 with Cluster Suite software is inquorate

root@linux01:~ # clustat
Cluster Status for clinformatica @ Tue Jul 18 14:52:42 2017
Member Status: Quorate

Member Name ID Status
—— —- —- ——
linux01.heartbeat.local 1 Online, Local, rgmanager
linux02.heartbeat.local 2 Offline
/dev/mapper/qdisk0 0 Online, Quorum Disk

Service Name Owner (Last) State
——- —- —– —— —–
service:PCenterETL_41 linux01.heartbeat.local started
service:PCenterETL_42 (none) stopped

root@linux02:~ # clustat
Cluster Status for clinformatica @ Tue Jul 18 14:53:10 2017
Member Status: Inquorate

Member Name ID Status
—— —- —- ——
linux01.heartbeat.local 1 Offline
linux02.heartbeat.local 2 Online, Local
/dev/mapper/qdisk0 0 Offline

To troubleshoot the problem, install omping. It is part of EPEL

Download the package here: https://download.fedoraproject.org/pub/archive/epel/5/x86_64/omping-0.0.4-1.el5.x86_64.rpm
Install the package

root@linux01:/tmp # rpm -ivh omping-0.0.4-1.el5.x86_64.rpm
warning: omping-0.0.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing… ########################################### [100%]
1:omping ########################################### [100%]

root@linux02:/tmp # rpm -ivh omping-0.0.4-1.el5.x86_64.rpm
warning: omping-0.0.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing… ########################################### [100%]
1:omping ########################################### [100%]

Check which IP address the cluster uses

root@linux01:~ # grep clusternode /etc/cluster/cluster.conf | grep name

linux01-hb is 142.40.81.128
linux02-hb is 142.40.81.129

Run omping with the IP of the machine followed by the other node

root@linux01:~ # omping 142.40.81.128 142.40.81.129
142.40.81.129 : waiting for response msg
142.40.81.129 : waiting for response msg
142.40.81.129 : waiting for response msg
142.40.81.129 : waiting for response msg
142.40.81.129 : waiting for response msg
142.40.81.129 : waiting for response msg
142.40.81.129 : joined (S,G) = (*, 232.43.211.234), pinging
142.40.81.129 : unicast, seq=1, size=69 bytes, dist=0, time=0.246ms
142.40.81.129 : multicast, seq=1, size=69 bytes, dist=0, time=0.251ms

142.40.81.129 : multicast, seq=179, size=69 bytes, dist=0, time=0.269ms
142.40.81.129 : unicast, seq=180, size=69 bytes, dist=0, time=0.233ms
142.40.81.129 : multicast, seq=180, size=69 bytes, dist=0, time=0.239ms
142.40.81.129 : unicast, seq=181, size=69 bytes, dist=0, time=0.213ms
142.40.81.129 : multicast, seq=181, size=69 bytes, dist=0, time=0.219ms
142.40.81.129 : unicast, seq=182, size=69 bytes, dist=0, time=0.231ms
142.40.81.129 : multicast, seq=182, size=69 bytes, dist=0, time=0.236ms
142.40.81.129 : unicast, seq=183, size=69 bytes, dist=0, time=0.209ms
142.40.81.129 : multicast, seq=183, size=69 bytes, dist=0, time=0.286ms
142.40.81.129 : unicast, seq=184, size=69 bytes, dist=0, time=0.254ms
142.40.81.129 : unicast, seq=185, size=69 bytes, dist=0, time=0.176ms
142.40.81.129 : unicast, seq=186, size=69 bytes, dist=0, time=0.191ms
142.40.81.129 : unicast, seq=187, size=69 bytes, dist=0, time=0.291ms
142.40.81.129 : unicast, seq=188, size=69 bytes, dist=0, time=0.203ms
142.40.81.129 : unicast, seq=189, size=69 bytes, dist=0, time=0.199ms
142.40.81.129 : unicast, seq=190, size=69 bytes, dist=0, time=0.209ms
142.40.81.129 : unicast, seq=191, size=69 bytes, dist=0, time=0.145ms
142.40.81.129 : unicast, seq=192, size=69 bytes, dist=0, time=0.210ms
142.40.81.129 : unicast, seq=193, size=69 bytes, dist=0, time=0.281ms
142.40.81.129 : unicast, seq=194, size=69 bytes, dist=0, time=0.186ms
142.40.81.129 : unicast, seq=195, size=69 bytes, dist=0, time=0.195ms
142.40.81.129 : unicast, seq=196, size=69 bytes, dist=0, time=0.141ms
142.40.81.129 : unicast, seq=197, size=69 bytes, dist=0, time=0.205ms
142.40.81.129 : unicast, seq=198, size=69 bytes, dist=0, time=0.196ms
142.40.81.129 : unicast, seq=199, size=69 bytes, dist=0, time=0.179ms
142.40.81.129 : unicast, seq=200, size=69 bytes, dist=0, time=0.190ms

142.40.81.129 : unicast, xmt/rcv/%loss = 200/200/0%, min/avg/max/std-dev = 0.104/0.199/0.306/0.039
142.40.81.129 : multicast, xmt/rcv/%loss = 200/183/8%, min/avg/max/std-dev = 0.126/0.215/0.311/0.041

Running omping with the IP of the machine followed by the other node

root@linux02:~ # omping 142.40.81.129 142.40.81.128
142.40.81.128 : waiting for response msg
142.40.81.128 : joined (S,G) = (*, 232.43.211.234), pinging
142.40.81.128 : unicast, seq=1, size=69 bytes, dist=0, time=0.172ms
142.40.81.128 : multicast, seq=1, size=69 bytes, dist=0, time=0.287ms
142.40.81.128 : unicast, seq=2, size=69 bytes, dist=0, time=0.196ms
142.40.81.128 : multicast, seq=2, size=69 bytes, dist=0, time=0.252ms

142.40.81.128 : unicast, seq=184, size=69 bytes, dist=0, time=0.311ms
142.40.81.128 : multicast, seq=184, size=69 bytes, dist=0, time=0.367ms
142.40.81.128 : unicast, seq=185, size=69 bytes, dist=0, time=0.286ms
142.40.81.128 : multicast, seq=185, size=69 bytes, dist=0, time=0.338ms
142.40.81.128 : unicast, seq=186, size=69 bytes, dist=0, time=0.184ms
142.40.81.128 : unicast, seq=187, size=69 bytes, dist=0, time=0.193ms
142.40.81.128 : unicast, seq=188, size=69 bytes, dist=0, time=0.174ms
142.40.81.128 : unicast, seq=189, size=69 bytes, dist=0, time=0.192ms
142.40.81.128 : unicast, seq=190, size=69 bytes, dist=0, time=0.200ms
142.40.81.128 : unicast, seq=191, size=69 bytes, dist=0, time=0.241ms
142.40.81.128 : unicast, seq=192, size=69 bytes, dist=0, time=0.304ms
142.40.81.128 : unicast, seq=193, size=69 bytes, dist=0, time=0.259ms
142.40.81.128 : unicast, seq=194, size=69 bytes, dist=0, time=0.272ms
142.40.81.128 : unicast, seq=195, size=69 bytes, dist=0, time=0.246ms
142.40.81.128 : unicast, seq=196, size=69 bytes, dist=0, time=0.611ms
142.40.81.128 : unicast, seq=197, size=69 bytes, dist=0, time=0.208ms
142.40.81.128 : unicast, seq=198, size=69 bytes, dist=0, time=0.200ms
142.40.81.128 : unicast, seq=199, size=69 bytes, dist=0, time=0.194ms
142.40.81.128 : unicast, seq=200, size=69 bytes, dist=0, time=0.186ms
142.40.81.128 : unicast, seq=201, size=69 bytes, dist=0, time=0.190ms
142.40.81.128 : waiting for response msg
142.40.81.128 : server told us to stop

142.40.81.128 : unicast, xmt/rcv/%loss = 201/201/0%, min/avg/max/std-dev = 0.115/0.223/0.611/0.055
142.40.81.128 : multicast, xmt/rcv/%loss = 201/185/7%, min/avg/max/std-dev = 0.159/0.278/0.797/0.062

After a few minutes, the network switch blocked multicast communication.

Solved after reconfiguring network switch

How to Avoid a Split-Brain Scenario with Cisco Switches by Enabling Multicast Communication

-bash: /dev/null: Permission denied

After login I received a message showing permission problem on /dev/null

-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied

On a working server, it is a character device with rw permissions

root@workinglinux:~ # ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Jul 21 15:56 /dev/null

root@linux:~ # ls -l /dev/null
-rw-r–r– 1 root root 0 Jul 25 13:11 /dev/null

Remove the file and recreate it

root@linux:~ # rm -f /dev/null
root@linux:~ # mknod -m 666 /dev/null c 1 3

root@linux:~ # ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Jul 25 13:13 /dev/null

rpm Fatal error, run database recovery

The rpm database got corrupted

root@linux:~ # rpm -qa
rpmdb: Thread/process 17308/47583269480000 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 – (-30974)
error: cannot open Packages database in /var/lib/rpm
rpmdb: Thread/process 17308/47583269480000 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages database in /var/lib/rpm

Make a backup copy of /var/lib/rpm

root@linux:/var/lib # cp -pr rpm rpm.original

Listing the files inside /var/lib/rpm

root@linux:/var/lib/rpm # ls -al
total 127840
drwxr-xr-x. 2 root root 4096 Jul 15 21:08 .
drwxr-xr-x. 33 root root 4096 Sep 6 03:18 ..
-rw-r–r–. 1 root root 5619712 Jul 15 20:45 Basenames
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Conflictname
-rw-r–r– 1 root root 73728 Sep 6 09:00 __db.001
-rw-r–r– 1 root root 237568 Sep 6 09:00 __db.002
-rw-r–r– 1 root root 1318912 Sep 6 09:00 __db.003
-rw-r–r– 1 root root 761856 Aug 31 14:30 __db.004
-rw-r–r–. 1 root root 3022848 Jul 15 20:45 Dirnames
-rw-r–r–. 1 root root 5558272 Jul 15 20:45 Filedigests
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Group
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Installtid
-rw-r–r–. 1 root root 40960 Jul 15 20:45 Name
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Obsoletename
-rw-r–r–. 1 root root 112074752 Jul 15 20:45 Packages
-rw-r–r–. 1 root root 2465792 Jul 15 20:45 Providename
-rw-r–r–. 1 root root 1171456 Jul 15 20:45 Provideversion
-rw-r–r–. 1 root root 12288 Jul 10 2015 Pubkeys
-rw-r–r–. 1 root root 438272 Jul 15 20:45 Requirename
-rw-r–r–. 1 root root 270336 Jul 15 20:45 Requireversion
-rw-r–r–. 1 root root 0 Jul 10 2015 .rpm.lock
-rw-r–r–. 1 root root 167936 Jul 15 20:45 Sha1header
-rw-r–r–. 1 root root 81920 Jul 15 20:45 Sigmd5
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Triggername

Removing all /var/lib/rpm/___db.XXX files

root@linux:/var/lib/rpm # rm -f /var/lib/rpm/__*

Listing the files again

root@linux:/var/lib/rpm # ls -la
total 125720
drwxr-xr-x. 2 root root 4096 Sep 6 09:07 .
drwxr-xr-x. 34 root root 4096 Sep 6 09:07 ..
-rw-r–r–. 1 root root 5619712 Jul 15 20:45 Basenames
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Conflictname
-rw-r–r–. 1 root root 3022848 Jul 15 20:45 Dirnames
-rw-r–r–. 1 root root 5558272 Jul 15 20:45 Filedigests
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Group
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Installtid
-rw-r–r–. 1 root root 40960 Jul 15 20:45 Name
-rw-r–r–. 1 root root 24576 Jul 15 20:45 Obsoletename
-rw-r–r–. 1 root root 112074752 Jul 15 20:45 Packages
-rw-r–r–. 1 root root 2465792 Jul 15 20:45 Providename
-rw-r–r–. 1 root root 1171456 Jul 15 20:45 Provideversion
-rw-r–r–. 1 root root 12288 Jul 10 2015 Pubkeys
-rw-r–r–. 1 root root 438272 Jul 15 20:45 Requirename
-rw-r–r–. 1 root root 270336 Jul 15 20:45 Requireversion
-rw-r–r–. 1 root root 0 Jul 10 2015 .rpm.lock
-rw-r–r–. 1 root root 167936 Jul 15 20:45 Sha1header
-rw-r–r–. 1 root root 81920 Jul 15 20:45 Sigmd5
-rw-r–r–. 1 root root 12288 Jul 15 20:45 Triggername

Rebuilding database indices from installed package headers

rpm {–initdb|–rebuilddb} [-v] [–dbpath DIRECTORY] [–root DIRECTORY]

Use –initdb to create a new database if one doesn’t already exist (existing database is not overwritten), use –rebuilddb to rebuild the
database indices from the installed package headers.

root@linux:/var/lib/rpm # rpm –rebuilddb

rpm doesn’t return any errors.

root@linux:/var/lib/rpm # rpm -qa | wc -l
927

Shrinking ext4 filesystem

I’m creating a new volume group with 3 10GB disks

root@linux:~ # pvcreate /dev/sdc
Physical volume “/dev/sdc” successfully created
root@linux:~ # pvcreate /dev/sdd
Physical volume “/dev/sdd” successfully created
root@linux:~ # pvcreate /dev/sde
Physical volume “/dev/sde” successfully created

root@linux:~ # vgcreate appvg /dev/sdc /dev/sdd /dev/sde
Volume group “appvg” successfully created

root@linux:~ # vgs appvg
VG #PV #LV #SN Attr VSize VFree
appvg 3 0 0 wz–n- 29.99g 29.99g

Creating a new 25GB logical volume

root@linux:~ # lvcreate -L 25g -n applv appvg
Logical volume “applv” created.

Creating a filesystem

root@linux:~ # mkfs -t ext4 /dev/appvg/applv
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1638400 inodes, 6553600 blocks
327680 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
200 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

Mounting the filesystem

root@linux:~ # mkdir /app

root@linux:~ # mount /dev/appvg/applv /app

root@linux:~ # df -hP /app
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/appvg-applv 25G 44M 24G 1% /app

I will remove the disk /dev/sde from the volume group. 25GB logical volume will shrink to 20GB.

Checking which disks the logical volume is using

root@linux:~ # lvdisplay -m /dev/mapper/appvg-applv
— Logical volume —
LV Path /dev/appvg/applv
LV Name applv
VG Name appvg
LV UUID 9tofzm-1zBU-DfbM-nmws-lqj7-QULb-U4Reqh
LV Write Access read/write
LV Creation host, time centos6.setaoffice.com, 2017-06-29 16:53:18 -0300
LV Status available
# open 1
LV Size 25.00 GiB
Current LE 6400
Segments 3
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:6

— Segments —
Logical extents 0 to 2558:
Type linear
Physical volume /dev/sdc
Physical extents 0 to 2558

Logical extents 2559 to 5117:
Type linear
Physical volume /dev/sdd
Physical extents 0 to 2558

Logical extents 5118 to 6399:
Type linear
Physical volume /dev/sde
Physical extents 0 to 1281

Checking Total PE to calculate logical volume

root@linux:~ # pvdisplay /dev/sdc
— Physical volume —
PV Name /dev/sdc
VG Name appvg
PV Size 10.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2559
Free PE 0
Allocated PE 2559
PV UUID ZnR27c-LPaE-0ZQa-t0Hc-yWLf-v06d-et7fb5

root@linux:~ # pvdisplay /dev/sdd
— Physical volume —
PV Name /dev/sdd
VG Name appvg
PV Size 10.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2559
Free PE 0
Allocated PE 2559
PV UUID OZY6w8-fUq6-wbPE-ILcr-LwOP-AeaS-j2qd9E

Resizing logical volume

root@linux:~ # lvresize -l 5118 -r /dev/appvg/applv
fsck from util-linux-ng 2.17.2
/dev/mapper/appvg-applv: 11/1638400 files (0.0% non-contiguous), 146849/6553600 blocks
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/appvg-applv to 5240832 (4k) blocks.
The filesystem on /dev/mapper/appvg-applv is now 5240832 blocks long.

Size of logical volume appvg/applv changed from 25.00 GiB (6400 extents) to 19.99 GiB (5118 extents).
Logical volume applv successfully resized.

Checking which disks the logical volume is using

root@linux:~ # lvdisplay -m /dev/mapper/appvg-applv
— Logical volume —
LV Path /dev/appvg/applv
LV Name applv
VG Name appvg
LV UUID 9tofzm-1zBU-DfbM-nmws-lqj7-QULb-U4Reqh
LV Write Access read/write
LV Creation host, time centos6.setaoffice.com, 2017-06-29 16:53:18 -0300
LV Status available
# open 0
LV Size 19.99 GiB
Current LE 5118
Segments 2
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:6

— Segments —
Logical extents 0 to 2558:
Type linear
Physical volume /dev/sdc
Physical extents 0 to 2558

Logical extents 2559 to 5117:
Type linear
Physical volume /dev/sdd
Physical extents 0 to 2558

Removing disk from volume group and label from physical volume

root@linux:~ # vgreduce appvg /dev/sde
Removed “/dev/sde” from volume group “appvg”

root@linux:~ # pvremove /dev/sde
Labels on physical volume “/dev/sde” successfully wiped

Red Hat Linux guest on VMware: Bringing up interface eth0: vmxnet3 device eth0 does not seem to be present, delaying initialization

I had a problem where I after a Red Hat Linux guest running on VMware was showing the following message on start up

Bringing up interface eth0: vmxnet3 device eth0 does not seem to be present, delaying initialization

To solve this problem, remove VMware Tools and reinstall it

%d bloggers like this: