Advertisements

Tag Archives: rpm

HPE Fibreutils

Fibreutils is a set of utility scripts for Linux that make certain operations, such as information gathering, easier. The following sections describe commands contained in the Fibreutils
package.

adapter_info

The adapter_info command lists information about the Fibre Channel adapters.

–I Lists all FC adapters in this system.
–L Lists all LUNs for each adapter.
–t Lists all targets seen by each adapter.
-m Lists each adapter’s model.
–v Verbose
–h Prints the help menu.
–d Prints LUN and verbose information for a specific device. The specific device should be a SCSI host number such as 0 or 6.

lssd

The lssd command lists all bound /dev/sd* devices.

–c Prints cached data instead of scanning.
–h Prints help message.
–l Prints inquiry page 0 x 83 UUID of devices.
–w Prints WWNN of devices.

lssg

The lssg command lists all bound /dev/sg* devices.

–c Prints cached data instead of scanning.
–h Prints help message.
–l Prints inquiry page 0 x 83 UUID of devices.
–w Print WWNN of devices.

hp_rescan

The hp_rescan command rescans LUNs on Hewlett Packard Enterprise supported Fibre Channel
adapters.

–a Rescans all adapters.
–h Prints help message
–i Rescans a specific adapter instance. The specific device should be a SCSI host number such as 0 or 6.
–l Lists all FC adapters.
–n Do not perform scsi remove-single-device when executing probe-luns.

Locating adapter_info

root@linux:~ # which adapter_info
/usr/bin/adapter_info

It is provided by the package fibreutils

root@linux:~ # rpm -qf /usr/bin/adapter_info
fibreutils-3.2-6

root@linux:~ # rpm -qi fibreutils-3.2-6
Name : fibreutils Relocations: (not relocatable)
Version : 3.2 Vendor: Hewlett-Packard Company
Release : 6 Build Date: Tue 18 Dec 2012 02:38:23 AM BRST
Install Date: Wed 26 Mar 2014 10:42:41 AM BRT Build Host: localhost.localdomain
Group : Applications/System Source RPM: fibreutils-3.2-6.src.rpm
Size : 77657 License: Proprietary
Signature : RSA/SHA1, Tue 18 Feb 2014 04:44:32 PM BRT, Key ID b070680a5ce2d476
Packager : Hewlett-Packard Company
URL : http://www.hp.com
Summary : Provides complimentary programs and scripts for HP supported fibre channel HBAs
Description :
This RPM has the following components:

* Miscellaneous scripts and programs to compliment HP supported FC drivers:

lssd
lssg
adapter_info
hp_rescan
scsi_info

Help message for adapter_info

root@linux:~ # /usr/bin/adapter_info -h
NAME

adapter_info

DESCRIPTION

Prints information about Fibre Channel HBAs/CNAs.

OPTIONS

-d, –device – Prints all information for a specific SCSI host adapter
-h, –help – Prints this help message
-i, –versioninfo – Prints driver version information for all HBAs
-l, –luns – Prints the device information for all HBAs
-m, –model – Prints the HBA model for all HBAs
-p, –pciids – Prints the PCI IDs for all HBAs
-r, –remoteports – Prints the attached remote ports for all HBAs
-v, –verbose – Prints all information except device and LUN information

Checking HBA card WWNN WWPN and state

root@linux:~ # /usr/bin/adapter_info
/sys/class/scsi_host/host3: wwnn=0x2000001b32001275 wwpn=0x2100001b32001275 state=Link Up – F_Port
/sys/class/scsi_host/host4: wwnn=0x2000001b3200c270 wwpn=0x2100001b3200c270 state=Link Up – F_Port
/sys/class/scsi_host/host1: wwnn=0x20000000c97e3572 wwpn=0x10000000c97e3572 state=Online
/sys/class/scsi_host/host2: wwnn=0x20000000c97e3573 wwpn=0x10000000c97e3573 state=Linkdown

Source: https://h20565.www2.hpe.com/hpsc/doc/public/display?sp4ts.oid=461311&docId=emr_na-c01487184&docLocale=en_US

Advertisements

Installing older kernel rpm package

Checking kernel version

root@linux:~ # uname -r
2.6.18-407.el5

When you try to install an older kernel, you will receive a message that you already have a newer version of the package already installed

root@linux:~ # rpm -ivh kernel-2.6.18-348.el5.x86_64.rpm
Preparing… ########################################### [100%]
package kernel-2.6.18-407.el5.x86_64 (which is newer than kernel-2.6.18-348.el5.x86_64) is already installed

Run with –oldpackage to install the old kernel

root@linux:~ # rpm -ivh –oldpackage kernel-2.6.18-348.el5.x86_64.rpm

libstdc++.so.6 is needed by hpacucli-8.70-8.0

I have a Suse 9 that is not installing the hpacucli

root@suse9:~ # rpm -ivh /tmp/hpacucli-8.70-8.0.noarch.rpm
error: Failed dependencies:
libstdc++.so.6 is needed by hpacucli-8.70-8.0
libstdc++.so.6(CXXABI_1.3) is needed by hpacucli-8.70-8.0
libstdc++.so.6(GLIBCXX_3.4) is needed by hpacucli-8.70-8.0

I checked with another server that this tool is working and in this server it is missing a package

root@suse9:~ # rpm -qa | grep libstd
libstdc++-3.3.3-43.41

root@anothersuse9:~ # rpm -qa | grep libstd
libstdc++-3.3.3-43.41
libstdc++-3.3.3-43.24
libstdc++-devel-3.3.3-43.24
compat-libstdc++-lsb-4.0.2_20050901-0.4

To solve this problem install compat-libstdc++-lsb

root@suse9:~ # rpm -ivh /tmp/compat-libstdc++-lsb-4.0.2_20050901-0.4.i586.rpm
Preparing… ########################################### [100%]
1:compat-libstdc++-lsb ########################################### [100%]

root@suse9:~ # rpm -ivh /tmp/hpacucli-8.70-8.0.noarch.rpm
Preparing… ########################################### [100%]
1:hpacucli ########################################### [100%]

Installing Oracle Java 8 Update 31 plugin in Firefox – Linux

I have a Red Hat Enterprise Linux 5 and I want to install Java 8 with the browser plugin.

root@linux:~ # cat /etc/*release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)

In order to do that, go to http://www.java.com/en/download/manual.jsp and download the corresponding version according to your machine. I choose Linux x64 RPM

root@linux:/tmp # rpm -ivh jre-8u31-linux-x64.rpm
Preparing… ########################################### [100%]
1:jre1.8.0_31 ########################################### [100%]
Unpacking JAR files…
rt.jar…
jsse.jar…
charsets.jar…
localedata.jar…
jfxrt.jar…

Go to /usr/lib64/mozilla/plugins and create a link

root@linux:/usr/lib64/mozilla/plugins # ln -s /usr/java/jre1.8.0_31/lib/amd64/libnpjp2.so libnpjp2.so
root@linux:/usr/lib64/mozilla/plugins # ls -l
total 0
lrwxrwxrwx 1 root root 41 Jun 9 2014 libflashplayer.so -> /usr/lib64/flash-plugin/libflashplayer.so
lrwxrwxrwx 1 root root 41 Jul 7 2014 libjavaplugin.so -> /etc/alternatives/libjavaplugin.so.x86_64
lrwxrwxrwx 1 root root 43 Jan 28 15:18 libnpjp2.so -> /usr/java/jre1.8.0_31/lib/amd64/libnpjp2.so

Verify if the plugin is being loaded typing about:plugins in the address bar

yum: No module named gzip or another library

You are troubleshooting your yum installation, getting the missing libraries

root@linux:~ # yum whatprovides
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named gzip

Please install a package which provides this module, or
verify that the module is installed correctly.

It’s possible that the above module doesn’t match the
current version of Python, which is:
2.4.3 (#1, Aug 29 2011, 10:55:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

If you see a different module, try to install all python libraries

root@linux:~ # yum repolist
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named zlib

Please install a package which provides this module, or
verify that the module is installed correctly.

It’s possible that the above module doesn’t match the
current version of Python, which is:
2.4.3 (#1, Aug 29 2011, 10:55:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

List the packages starting with python

root@linux:~ # rpm -qa –qf “%{n}-%{arch}\n” | grep ^python
python-ldap-x86_64
python-urlgrabber-noarch
python-x86_64
python-libs-x86_64
python-devel-x86_64
python-sqlite-x86_64
python-numeric-x86_64
python-iniparse-noarch
python-elementtree-x86_64
python-dmidecode-x86_64
python-devel-i386

And query each one of them to see if there is a missing file. Reinstall the packages that report missing files.

root@linux:~ # rpm -V python-devel-2.4.3-44.el5_7.1
missing /usr/lib64/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib64/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib64/python2.4/test/output/test_tokenize
missing /usr/lib64/python2.4/test/test_normalization.pyc
missing /usr/lib64/python2.4/test/test_normalization.pyo
missing /usr/lib64/python2.4/test/test_zipfile.py
missing /usr/lib64/python2.4/test/test_zipfile.pyc
missing /usr/lib64/python2.4/test/test_zipfile.pyo
missing /usr/lib64/python2.4/test/test_zipimport.py
missing /usr/lib64/python2.4/test/test_zipimport.pyc
missing /usr/lib64/python2.4/test/test_zipimport.pyo
missing /usr/lib/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib/python2.4/test/output/test_tokenize
missing /usr/lib/python2.4/test/test_normalization.pyc
missing /usr/lib/python2.4/test/test_normalization.pyo
missing /usr/lib/python2.4/test/test_zipfile.py
missing /usr/lib/python2.4/test/test_zipfile.pyc
missing /usr/lib/python2.4/test/test_zipfile.pyo
missing /usr/lib/python2.4/test/test_zipimport.py
missing /usr/lib/python2.4/test/test_zipimport.pyc
missing /usr/lib/python2.4/test/test_zipimport.pyo

root@linux:~ # rpm -V python-ldap-2.2.0-2.1

root@linux:~ # rpm -V python-urlgrabber-3.1.0-6.el5

root@linux:~ # rpm -V python-devel-2.4.3-44.el5_7.1
missing /usr/lib64/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib64/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib64/python2.4/test/output/test_tokenize
missing /usr/lib64/python2.4/test/test_normalization.pyc
missing /usr/lib64/python2.4/test/test_normalization.pyo
missing /usr/lib64/python2.4/test/test_zipfile.py
missing /usr/lib64/python2.4/test/test_zipfile.pyc
missing /usr/lib64/python2.4/test/test_zipfile.pyo
missing /usr/lib64/python2.4/test/test_zipimport.py
missing /usr/lib64/python2.4/test/test_zipimport.pyc
missing /usr/lib64/python2.4/test/test_zipimport.pyo
missing /usr/lib/python2.4/test/decimaltestdata/normalize.decTest
missing /usr/lib/python2.4/test/decimaltestdata/quantize.decTest
missing /usr/lib/python2.4/test/output/test_tokenize
missing /usr/lib/python2.4/test/test_normalization.pyc
missing /usr/lib/python2.4/test/test_normalization.pyo
missing /usr/lib/python2.4/test/test_zipfile.py
missing /usr/lib/python2.4/test/test_zipfile.pyc
missing /usr/lib/python2.4/test/test_zipfile.pyo
missing /usr/lib/python2.4/test/test_zipimport.py
missing /usr/lib/python2.4/test/test_zipimport.pyc
missing /usr/lib/python2.4/test/test_zipimport.pyo

root@linux:~ # rpm -V python-sqlite-1.1.7-1.2.1

root@linux:~ # rpm -V python-numeric-23.7-2.2.2.el5_6.1

root@linux:~ # rpm -V python-iniparse-0.2.3-4.el5

root@linux:~ # rpm -V python-elementtree-1.2.6-5

root@linux:~ # rpm -V python-libs-2.4.3-44.el5_7.1
missing /usr/lib64/python2.4/_MozillaCookieJar.py
missing /usr/lib64/python2.4/_MozillaCookieJar.pyc
missing /usr/lib64/python2.4/_MozillaCookieJar.pyo
missing /usr/lib64/python2.4/tokenize.py
missing /usr/lib64/python2.4/tokenize.pyc
missing /usr/lib64/python2.4/tokenize.pyo
missing /usr/lib64/python2.4/tzparse.py
missing /usr/lib64/python2.4/tzparse.pyc
missing /usr/lib64/python2.4/tzparse.pyo
missing /usr/lib64/python2.4/zipfile.py
missing /usr/lib64/python2.4/zipfile.pyc
missing /usr/lib64/python2.4/zipfile.pyo

root@linux:~ # rpm -V python-dmidecode-3.10.13-1.el5_5.1

Suse Linux 10 SP2 – rpmlib(PayloadIsLzma) <= 4.4.6-1 is needed by

If you try to install or update a package and the following error message appears

root@suselinux10sp2:~ # rpm -Uvh supportutils-1.20-81.1.noarch.rpm
warning: supportutils-1.20-81.1.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 823559f0
error: Failed dependencies:
rpmlib(PayloadIsLzma) <= 4.4.6-1 is needed by supportutils-1.20-81.1.noarch

You need to verify if the compression method is supported by rpm.

root@suselinux10sp2:~ # rpm —showrc | grep Payload
rpmlib(PayloadIsBzip2) = 3.0.5-1
rpmlib(PayloadFilesHavePrefix) = 4.0-1

In this machine, only bzip2 is supported. One work-around is to update the rpm package before trying to install/upgrade the package where the error message appeared.

rpm error: failed to stat /media: Input/output error

I had a system where the rpm command was very slow after I was trying to upgrade a package

root@rhel5:~ # rpm -Uvh /tmp/kexec-tools-1.102pre-154.el5.x86_64.rpm
error: failed to stat /media: Input/output error
Preparing… ########################################### [100%]
1:kexec-tools warning: /etc/kdump.conf created as /etc/kdump.conf.rpmnew
########################################### [100%]

The filesystem /media is a NFS share. The server that was hosting the NFS was down and the rpm command was slow because it tried to stat the filesystem.

%d bloggers like this: