Assigning ownership to disks for NetApp OnTap 8.2p2 Cluster mode

After replacing broken disks for NetApp Storage and if you want to manually assigned ownership back to the newly replaced but assigned disks, you can use the following command

1. Show Storage Ownership Information

My-NetApp-Cluster::> storage disk show -spare
Original Owner: acai-cluster1-01
  Checksum Compatibility: block
                                                            Usable Physical
    Disk            HA Shelf Bay Chan   Pool  Type    RPM     Size     Size Owner
    --------------- ------------ ---- ------ ----- ------ -------- -------- --------
    cluster1-01:0b.00.9
                    0b     0   9    B  Pool0  BSAS   7200   1.62TB   1.62TB cluster1-01
Original Owner: cluster1-02
  Checksum Compatibility: block
                                                            Usable Physical
    Disk            HA Shelf Bay Chan   Pool  Type    RPM     Size     Size Owner
    --------------- ------------ ---- ------ ----- ------ -------- -------- --------
    cluster1-02:0a.00.7
                    0a     0   7    B  Pool0  BSAS   7200   1.62TB   1.62TB cluster1-02
.....
.....

2. Display all unowned disks by entering the following command:

My-NetApp-Cluster::> storage disk show -container-type unassigned


                     Usable           Container
Disk                   Size Shelf Bay Type        Position   Aggregate Owner
---------------- ---------- ----- --- ----------- ---------- --------- --------
cluster1-01:0b.00.9
                     1.62TB     0   9 spare       present    -         cluster1-01
cluster1-02:0a.00.7
                     1.62TB     0   7 spare       present    -         cluster1-02

3. Assign each disk by entering the following command

My-NetApp-Cluster::> storage disk assign -disk cluster1-01:0b.00.9 -owner cluster1-01

Identify broken disk for NetApp OnTap 8.2p2 Cluster mode

1. Identify the Cluster Nodes

My-NetApp-Cluster::> cluster show

Node                  Health  Eligibility
--------------------- ------- ------------
cluster1-01      true    true
cluster1-02      true    true
cluster1-03      true    true
cluster1-04      true    true
4 entries were displayed.

2. Check for Broken Disk

My-NetApp-Cluster::> run -node cluster1-01 vol status -f
RAID Disk Device   HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
--------- ------   ------------- ---- ---- ---- ----- --------------    --------------
failed   0a.00.12 0a    0   12  SA:A   -  BSAS  7200 1695466/3472315904 1695759/3472914816 
failed   0b.00.9  0b    0   9   SA:B   -  BSAS  7200 1695466/3472315904 1695759/3472914816

3. Get System Information

My-NetApp-Cluster::> run -node cluster1-01 sysconfig -a
NetApp Release 8.2P2 Cluster-Mode: Sat Jul 20 20:31:47 PDT 2013
.....
.....
.....

4. Get further Information

My-NetApp-Cluster::> run -node cluster1-01 sysconfig -r
Aggregate storage1_aggr1 (online, mixed_raid_type, hybrid) (block checksums)
.....
.....

Create export domain or ISO Domain on RHEV 3

This is taken from Red Hat Portal How to create an export domain or iso domain? (Need customer access)

On the NFS, you need to do the following

# mkdir /export/data
# chown -R 36:36 /export/data
# chmod 755 /export/data
# vim /export_data
/export/data *(rw)
# /etc/init.d/nfs restart
# chkconfig nfs on

The key setup is that the ownership must be given vdsm kvm (36:36). Or you will have errors like
“Error while executing action Add Storage Connection: Problem while trying to mount target”

# mkdir /export/ISO 
# chown -R 36:36 /export/ISO 
# chmod 755 /export/ISO 
# vim /export/ISO /export/ISO *(rw) 
# /etc/init.d/nfs restart 
# chkconfig nfs on

References:

  1. Red Hat Enterprise Virtualisation and NFS (NetApp Community)
  2. How to create an export domain or iso domain? (Red Hat Portal – Restricted Access)

Subscribing to Red Hat Virtualisation Manager Channels

Taken from Red Hat Red Hat Enterprise Visualization Documentation

Step 1: Register the system with Subscription Manager
Run the following command and enter your Red Hat Network user name and password to register the system with the Red Hat Network

subscription-manager register

Step 2: Identify Available Entitlement Pools
Entitlement pools containing the channels required to install the Red Hat Enterprise Virtualization Manager

# subscription-manager list --available | grep -A8 "Red Hat Enterprise Linux Server"
# subscription-manager list --available | grep -A8 "Red Hat Enterprise Virtualization"

Step 3: Attach Entitlement Pools to the System
Use the pool identifiers located in the previous step to attach both the Red Hat Enterprise Linux Server and Red Hat Enterprise Virtualization entitlements to the system. Run the following command to attach the entitlements:

# subscription-manager attach --pool=[POOLID]

Step 4: Enable the Required Channels
Run the following commands to enable the channels required to install Red Hat Enterprise Virtualization:

# yum-config-manager --enable rhel-6-server-rpms
# yum-config-manager --enable rhel-6-server-supplementary-rpms
# yum-config-manager --enable rhel-6-server-rhevm-3.4-rpms
# yum-config-manager --enable jb-eap-6-for-rhel-6-server-rpms

Mapping Ad account to Local Linux Group with Centrify Express on CentOS 6

Step 1. In order to add the AD User to the local User Group

adduser command is not nsswitch aware and do not recognize a user not locally defined when adding someone to a group.

# vim /etc/group
.....
.....
users:x:100:user1,user2

Step 2: Edit /etc/centrifydc/centrifydc.conf

Edit /etc/centrifydc/centrifydc.conf, uncomment and change the following parameter to true

# Merge local group membership from /etc/group into the Centrify group
# response for groups with the same name and gid.  This violates the NSS
# interface behavior and may have unexpected side effects, so it is
# disabled by default. You must run adreload to detect changes
# in the local group file.
#
adclient.local.group.merge:true

Step 3: Centrify Load and Flush

# adreload && adflush

Step 4: Check and verify.

Logon as user1

$ id -a
uid=.........gid=.......... 100(users) .....................

References:

  1. How to Add AD user local group

Add an Active Directory (AD) Domain Account to sudo on Centrify Express for CentOS 6

Adding a Active Directory (AD) Domain Account to /etc/sudo is fairly easy on Centrify Express for CentOS 6. Suppose you have an AD Group called “Sys_Admin”, just add it to the

.....
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
%System_Admin ALL=(ALL)       ALL
.....

If it is an individual user, just get the userid from Active Directory

# getent passwd myuserid
user1:x:122:122:User1 Name:/home/user1:/bin/centrifyda

Update /etc/sudoers

.....
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
%user1 ALL=(ALL)       ALL
.....

Do a final check on whether the sudo is working fine by doing

# sudo -l

Matching Defaults entries for user1 on this host:
requiretty, !visiblepw, always_set_home, env_reset, env_keep="COLORS
DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1
PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE
LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY
LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL
LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",
secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User user1 may run the following commands on this host:
(ALL) ALL

Enabling Debugging for Linux Systems for Centrify Express on CentOS 6

Step 1: Enable Debugging for Centrify

# /usr/share/centrifydc/bin/addebug on
/var/log/centrify_client.log does not exist. Creating now.
Configure /etc/rsyslog.conf
Send HUP signal to rsyslogd
Configure log level in /etc/centrifydc/centrifydc.conf
Reload /etc/centrifydc/centrifydc.conf
Centrify DirectControl debug logging is on

 Step 2: Collect support information via adinfo_extra.sh

# adinfo --support

Collecting stack trace information via stacktrace.pl:

Collecting support information via adinfo_extra.sh:
Collecting information for adinfo --support now...
Collection finished. Compress now.
Successfully gzip /var/centrify/tmp/adinfo_support.tar

Step 3: Disable Debugging for Centrify

# /usr/share/centrifydc/bin/addebug off
Configure /etc/rsyslog.conf
Send HUP signal to rsyslogd
Configure log level in /etc/centrifydc/centrifydc.conf
Reload /etc/centrifydc/centrifydc.conf
Centrify DirectControl debug logging is off

Step 4: Check the file

# ls  -al /var/centrify/tmp/adin_support.tar.gz
 

References:

  1. Centrify Express: Enabling Debugging for Linux Systems

Using pip to install python packages

Pointer 1: To install specific version of packages do

# pip install 'numpy==1.5.1'

Pointer 2: To show what files was installed

# pip show --files numpy
---
Name: numpy
Version: 1.8.1
Location: /usr/local/python-2.7.8/lib/python2.7/site-packages
Requires:
Files:
../numpy/__init__.py
.....
.....

Pointer 3: Uninstall a package

# pip uninstall num
Uninstalling SomePackage:

Pointer 4: Upgrade a package:

# pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage

 Pointer 5: List what packages are outdated:

# pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)

References:

  1. pip 1.5.6 – A tool for installing and managing Python packages
  2. pip – installation

Compiling the python-igraph with Python 2.7 on CentOS 5

Step 1: Install Python 2.7

python-igraph requires Python 2.5 and above. Do look at Installing and Compiling Python 2.7.8 on CentOS 5

Step 2: Download and unpack python-igraph from python-igraph.

The current version is python-igraph 0.7

Step 3: Unpack and compile

# tar -zxvf python-igraph-0.7.0
# cd  python-igraph-0.7.0
# python setup.py install

If you encounter errors similar to /usr/lib64/libxml2.a: could not read symbols: Bad value

Step 4: Copy and update to /usr/local/

If you want to put all the packages in an easier to find directory. Copy

# mkdir -p /usr/local/python-igraph-0.7.0/bin
# mkdir -p /usr/local/python-igraph-0.7.0/lib
# cp $PYTHON-IGRAPH-HOME/build/scripts-2.7/igraph /usr/local/python-igraph-0.7.0/bin
# cp -rv $PYTHON-IGRAPH-HOME/build/scripts-2.7/lib.linux-x86_64-2.7/igraph /usr/local/python-igraph-0.7.0/lib
# cp -rv $PYTHON-IGRAPH-HOME/igraphcore/lib/libigraph.so* /usr/local/python-igraph-0.7.0/lib

Step 5: Test the python-igraph libraries.
Update .bashrc

export PATH=$PATH:/usr/local/python-igraph-0.7.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python-igraph-0.7.0/lib

Test with python on the command line

$ python2.7
Python 2.7.8 (default, Jul 17 2014, 14:44:57)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import igraph
>>>

 


*Easier Method*

You can use pip to install. For more information on how to install and use pip, see Installing and Compiling Python 2.7.8 on CentOS 5

 

References:

  1. Python, igraph in CentOS
  2. Installing python-igraph on linux

 

Installing and Compiling Python 2.7.8 on CentOS 5

Step 1: Download the Python 2.7.8 from Python Site

Step 2: Use GCC44 to compile. If you have not done it, do

# yum install gcc44 gcc44-c++ gcc44-gfortran

Step 3: Update your alias in your  .bashrc

alias gcc='gcc44'

Step 4: Configure python 2.7.8

# cd python-2.7.8
# ./configure --prefix=/usr/local/python-2.7.8
# make -j 8
# make install

Step 5: Update the PATH and LD_LIBRARY_PATH in your .bashrc

export PATH=$PATH:/usr/local/python-2.7.8/bin.........
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python-2.7.8/lib

Step 6: Download get-pip.py
For more information see pip installation site

Create a directory inside python2.7 directory and put pip in that directory

# mkdir /usr/local/python-2.7.8/pip
# wget https://bootstrap.pypa.io/get-pip.py .

Step 7: Install pip with Administrator rights

# python2.7 get-pip.py

If setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you.
To upgrade an existing setuptools (or distribute), run

# pip install -U setuptools
# pip install numpy