Saturday, November 21, 2009

Solaris10Guide

Solaris 10 Quick Reference (Work In Progress)

 

This document is a quick reference to the major difference and new technologies in Solaris 10. Its is not fully extensive and will only feature on.

 

●     ZFS

●     Solaris Containers (Zones)

●     Resource Management

●     Predictive Self Healing

●     DTrace

●     Misc

 

ZFS – Solaris Zettabyte File System

Features

●     128-bit Filesystem

●     File System and Volume Manager Integrated

●     RAID 0, RAID 1, RAID-Z (RAID5) &  RAID-Z2 Double Parity

●     Snap Shot and Clone Support

●     Compression

●     Self healing

●     Checksum of data blocks

●     Does not use /etc/vfstab as standard

●     Setup NFS through zfs

●     Does not support ufsdump/ufsrestore

 

Commands

zpool

Manages Pools (disks)

zfs

Manages file systems 

 

Pool tasks

zpool create mypool c0t1d0

Create mypool with whole disk

zpool create mypool c0t1d0s7

Create mypool with slice

zpool create mypool c1t0d0 c2t0d0

Create mypool with stripe

zpool create mypool mirror c1t0d0 c2t0d0

Create mypool with mirror

zpool create mypool raidz c1t0d0 c1t1d0 c1t2d0

Create mypool with RAID-Z

zpool create mypool raidz2 c1t0d0 c1t1d0 c1t2d0

Create mypool with RAID-Z Double Parity

zpool create -m /export/home mypool c2t0d0

Create mypool with whole disk with mount point /export/home

mkdir 2g /disk1 ; mkdir 2g /disk2 ; mkdir 2g /disk3 ; mkdir 2g /disk4

zpool create mypool mirror /disk1 /disk2

zpool add mypool mirror /disk3 /disk4

 Create mypool from files!!

zpool destroy mypool

DESTROY POOL AND FILESYSTEM

zpool list

List pools

zpool status -x

Display pool status

zpool replace mypool c1t0d0 c1t4d0

Replaces drive c1t0d0 to c1t4s0

zpool clear mypool c1t2d0

Clears transient errors from drive

zpool online mypool c1t3d0

Notify ZFS to rescan c1t3d0

zpool scrub mypool

Disk scrubber (checks drives & data)

zpool iostat [-v] [<pool>] <interval>

Display disk status

 

ZFS File system Tasks

zfs create mypool/home

Create filesystem home

zfs set -o mountpoint=/export/home mypool/home

Create /export/home

zfs create mypool/home/user

Create user directory

zfs destroy mypool/home

Delete home filesystem and below (users)

zfs set quota=20G mypool/home/user

 

zfs set compression=on mypool/home

 

zfs get all mypool/home

View settings

zfs set sharenfs=on mypool/home/user

Create NFS share

zfs set sharenfs=ro myspool/home/jumpstart

Create Read only NFS share

zfs set sharenfs=root=192.168.10.162 rpool/export/zones

 

zfs unshare mypool/home/user

disable NFS share

zfs list

List ZFS filesystem

zfs list -o name,quota,mountpoint

List ZFS filesystem options

zfs snapshot mypool/home@today

Create readonly snapshot of home called today

zfs set snapdir=visable mypool

Enable access to snapshot

ls /export/home/.zfs/snapshot/today

Access to snapshot

zfs rollback mypool/home@today

Rollback to snapshot

zfs clone myspool/home@today mypool/home_new

Clone home snapshot and create a   writeable mypool/home_new

zfs promote mypool/home_new

Make clone the primary data source

zfs rename mypool/home  mypool/home_old ; zfs rename mypool/home_new  mypool/home

rename clone to replace home, move old to home_old

zfs destroy mypool/home@today

Destroy snapshot

 

Solaris Containers (Zones)

 

Features

●     Software partition, single kernel!

●     share or individual packages and patches.

●     chroot on steroids!

●     Consolidation

●     Test and development

●     Resource Management

●     BrandZ (Solaris 8/9 and Linux)

●     IP Share & Exclusive Mode

●     Zone enable commands (ps / prstat ..)

●     Unbundled application Zonestat

Configuration Guide Lines

Network & Routing

The global zone must be connected and routing table correctly configured.

DHCP

Is not supported in a zone in IP Share mode on in Exclusive Mode

 

NFS Server

Unable to export

 

Commands

zonecfg

Manages zones configuration

zoneadm

Manages Zones

zlogin

Login into a zone

~. (drop to shell but my break ssh shell)

Change SSH break character.

ssh -e ^ <user>@<globalzone>

 

Create Zone

zonecfg -z myzone

zonecfg:myzone> create

zonecfg:myzone> set zonepath=/export/zones/myzone

zonecfg:myzone> set autoboot=true

zonecfg:myzone> add net

zonecfg:myzone:net> set address=10.10.25.33

zonecfg:myzone:net> set physical=e1000g0

zonecfg:myzone:net> end

zonecfg:myzone> verify

zonecfg:myzone> commit

zonecfg:myzone> exit

Basic Zone

zonecfg -z webzone

zonecfg:webzone> set zonepath=/export/zones/webzone

zonecfg:webzone> set autoboot=true

zonecfg:webzone> add net

zonecfg:webzone:net> set address=10.10.25.34

zonecfg:webzone:net> set physical=e1000g0

zonecfg:webzone:net> end

zonecfg:webzone> add fs

zonecfg:webzone:fs> set dir=/export/home

zonecfg:webzone:fs> set type=lofs

zonecfg:webzone:fs> set special=/export/home

zonecfg:webzone:fs> end

zonecfg:webzone> info

zonecfg:webzone> verify

zonecfg:webzone> commit

zonecfg:webzone> exit

Zone with home directories shared with Global zone

zonecfg -z ownzone

zonecfg:ownzone> create

zonecfg:ownzone> set zonepath=/export/zones/ownzone

zonecfg:ownzone> set autoboot=true

zonecfg:ownzone> add net

zonecfg:ownzone:net> set address=10.10.25.35

zonecfg:ownzone:net> set physical=e1000g0

zonecfg:ownzone:net> end

zonecfg:ownzone> remove inherit-pkg-dir dir=/lib

zonecfg:ownzone> remove inherit-pkg-dir \ dir=/platform

zonecfg:ownzone> remove inherit-pkg-dir dir=/sbin

zonecfg:ownzone> remove inherit-pkg-dir dir=/usr

zonecfg:ownzone> verify

zonecfg:ownzone> commit

zonecfg:ownzone> exit

Zone with no inherited packages

zonecfg -z poolzone

zonecfg:poolzone> create

zonecfg:poolzone> set        zonepath=/export/zones/poolzone

zonecfg:poolzone> set autoboot=true

zonecfg:poolzone> set pool=qa-pool

zonecfg:poolzone> add net

zonecfg:poolzone:net> set address=10.10.25.33

zonecfg:poolzone:net> set physical=e1000g0

zonecfg:poolzone:net> end

zonecfg:poolzone> verify

zonecfg:poolzone> commit

zonecfg:poolzone> exit

Zone with resource pool “qa-pool” allocated, See pools.

 

sysidcfg file, copy in <zonepath>/root/etc/sysidcfg to pre answer boot questions

name_service=DNS

       {domain_name=<domain>

       name_server=<default router>}

system_locale=en_GB.ISO8859-1

terminal=vt100

network_interface=primary {

                hostname=<hostname>}

security_policy=NONE

nfs4_domain=LOCAL.com

timezone=GB-Eire

root_password=<encrypted password>


Administer Zone

zoneadm -z myzone install

Install a configured zone

zoneadm -z myzone boot

Boot a zone

zoneadm -z myzone boot && zlogin -C myzone

Boot and watch console of a zone

zoneadm -z myzone halt

Stop a zone ( eg pull power)

zoneadm -z myzone reboot

 

zoneadm -z myzone uninstall -F

Deletes a zone

zonecfg -z myzone delete -F

Removes a zone config

zoneadm list -civ

Display Zones Status

zoneadm -z myzone detach

Detach zones (ready to move)

zoneadm -z myzone attach

Attach  Zone

zoneadm -z myzone attach -F

Attach  Zone with out verify

zoneadm -z myzone attach -u

Attach  Zone update any patches with global zone

zoneadm -z myzone attach -u -b <patch=id>

Attach  Zone update any patches with global zone, backing out patch  id

zlogin -C myzone

Login to the zone console

~. to drop out

zlogin -l sysadmin myzone

Login as sysadmin user

zlogin myzone shutdown -i 0

Shutdown zone gracefully

zlogin -S myzone

Login Safe mode for diagnostics

zonename

Tell me my zonename

 

Clone myzone to dolly (ZFS)

zlogin myzone shutdown -i 0

Shut down zone gracefully

zonecfg -z myzone export -f /export/zones/myzone.cfg

 

chmod 700 /export/zones/dolly

Strict permissions

vi /export/zones/myzone.cfg

Change path and IP address

zonecfg -z dolly -f /export/zones/myzone.cfg

Create zone from master template

zoneadm -z dolly clone myzone

Clone myzone to dolly.

zoneadm -z dolly boot

Boot dolly

 

Move myzone to different server

Source Host

1

zlogin myzone shutdown -i 0

Shut down zone gracefully

2

zonecfg -z myzone export -f /export/zones/myzone.cfg

Create export file

3

zoneadm -z myzone detach

 

4

tar cf myzone.tar /export/zones/myzone

 

5

scp myzone.cfg <user>@<target-host>

 

 

Target Host

1

tar xvf myzone.tar

Untar in to new root zonepath.

2

Edit myzone.cfg to reflect new zonepath

 

3

zonecfg -z myzone -f myzone.cfg

Create zone from master template

4

zoneadm -z myzone attach

Attach zone

5

zoneadm -z myzone boot

 

 

Resource Management CPU

 

Features

●     Fixed number of CPU's per zone

●     Variable CPU's per zone

●     FSS Fair Share, weighted zones. recommended for most application

●     Mixed workloads

●     In Solaris 10 8/07 and later we have dedicated CPU' feature  which can be an effective alternative to pools.

Commands

pooladm

Administer pools

poolcfg

Configure pools

dispadmin

Dispatch “Scheduler” Admin

 

 

Create Fixed CPU Zone Pool

pooladm -e

Enable pools

svcadm enable pools

Enable pools

pooladm -s

Save configuration

poolcfg -c 'create pset db-pset (uint pset.min=10; uint pset.max=10)'

Processor Set “db-pset” 10 CPU's

poolcfg -c 'create pool db-pool'

 

poolcfg -c 'associate pool db-pool (pset db-pset)'

 

pooladm -c

Activate configuration

zonecfg -z dbzone

zonecfg:dbzone> set pool=db-pool

zonecfg:dbzone> verify

zonecfg:dbzone> commit

zonecfg:dbzone> exit

Associate the zone with a resource pool

 

Create FSS Zone (Pool)

pooladm -e

Enable pools

svcadm enable pools

Enable pools

pooladm -s

Save configuration

poolcfg -c 'create pool db-pool ( string pool.scheduler = "FSS" )'

Resource pool with  FSS

poolcfg -c 'create pool ap-pool ( string pool.scheduler = "FSS" )'

Resource pool with  FSS

pooladm -c

Activate configuration

pooladm

Display configuration

zonecfg -z dbzone

zonecfg:dbzone> set pool=dbpool

zonecfg:dbzone> add rctl

zonecfg:dbzone:rctl>set name=zone.cpu-shares

zonecfg:dbzone:rctl>add add value (priv=privileged,limit=3,action=none)

zonecfg:dbzone:rctl> end

zonecfg:dbzone> verify

zonecfg:dbzone> commit

zonecfg:dbzone> exit

Associate the zone with a resource pool and set FSS CPU share to 3

zonecfg -z apzone

zonecfg:apzone> set pool=appool

zonecfg:apzone> add rctl

zonecfg:apzone:rctl>set name=zone.cpu-shares

zonecfg:apzone:rctl>add add value (priv=privileged,limit=2,action=none)

zonecfg:apzone:rctl> end

zonecfg:apzone> verify

zonecfg:apzone> commit

zonecfg:apzone> exit

Associate the zone with a resource pool and set FSS CPU share to 2

zlogin apzone init 6 && zlogin dbzone init 6

Reboot zones

dispadmin -d

Display default scheduler

dispadmin -d FSS

Set scheduler to FSS

priocntl -s -c FSS -i all

Set scheduler to FSS now

prctl -n zone.cpu-shares -i zone global

Display Global zone CPU shares

prctl -n zone.cpu-shares -v 2 -r -i zone global

Set Global Zone to FSS CPU share to 2

* not persistent after reboots

Prctl -n zone.cpu-shares -r -v 3 -i zone <zone>

Dynamically change zone CPU shares

 

Oracle Database Example using dedicated (need to add filesystems for /u01 ..)

In global

$ mkdir /usr/local

 

zonecfg -z orazone

zonecfg:orazone> set zonepath /zones/orazone

zonecfg:orazone> set max-shm-memory=4G

zonecfg:orazone> add dedicated-cpu

zonecfg:orazone:dedicated-cpu> set ncpus=12-16

zonecfg:orazone:dedicated-cpu> set importance=2

zonecfg:orazone:dedicated-cpu> end

zonecfg:orazone> add net

zonecfg:orazone:net> set address=10.10.25.35

zonecfg:orazone:net> set physical=e1000g0

zonecfg:orazone:net> end

zonecfg:orazone> add fs

zonecfg:orazone:fs> set dir=/usr/local

zonecfg:orazone:fs> set type=lofs

zonecfg:orazone:fs> set special=/usr/local

zonecfg:orazone:fs> end

zonecfg:orazone> verify

zonecfg:orazone> commit

zonecfg:orazone> exit

Create zone with

zonecfg -z orazone

zonecfg:orazone> set zonepath /zones/orazone

zonecfg:orazone> set max-shm-memory=4G

zonecfg:orazone> add capped-cpu

zonecfg:orazone:capped-cpu> set ncpus=3.75

zonecfg:orazone:capped-cpu> end

zonecfg:orazone> add net

zonecfg:orazone:net> set address=10.10.25.35

zonecfg:orazone:net> set physical=e1000g0

zonecfg:orazone:net> end

zonecfg:orazone> add fs

zonecfg:orazone:fs> set dir=/usr/local

zonecfg:orazone:fs> set type=lofs

zonecfg:orazone:fs> set special=/usr/local

zonecfg:orazone:fs> end

zonecfg:orazone> verify

zonecfg:orazone> commit

zonecfg:orazone> exit

 

Services management Facility

 

Features

●      Predictive hardware monitoring

●      isolation and deactivation

●      Fault Management Architecture FMA / Service Management Facility SMF

●      Message Identifier lookup @ http://www.sun.com/msg/

●      RC script, /etc/inetd.conf & /etc/inittab are legacy

●      Milestones as wellas run levels

●      FMRI – example svc:/network/ssh:default

●      Methods and Manifest (XML)

             

Commands and Logs

svcs

Display service status and dependencies

svcadm

Enable/Disable services

inetconv

convert inetd.conf

svccfg

Manifest Management

/var/adm/messages

System logs

/var/svc/log

Service Logs

/etc/svc/volatile

pre-single user logs

 

SMF Tasks

svcadm disable system/cron:default

Disables

svcadm enable system/cron:default

Enable cron

svcadm refresh network/ssh:default

reread ssh configuration

svcadm restart network/ssh:default

restart ssh

svcadm -v enable -r nfs/server

Enables all services required to start nfs

svcadm -v enable -r -t nfs/server

Enables all services required to start nfs

until a reboot

svcs -a

List all services

svcs -p ssh

Show processes attached to ssh server

svcs -d /network/smtp

Show what service smtp depend on

svcs -D /network/smtp:sendmail

Show what service  depend on smtp

svcs -xv

Display failed services

boot -m verbose

Display services on boot up.

svcadm milestone -d milestone/single-user:default

change default run level

svcadm milestone milestone/multi-user

change run level to multi-user

Ok> boot -m milestone=single-user

boot in to single user

 

Networking

 

 

 

 

 

 

Security

RBAC

•                   /etc/user/attr                                          # User and Role information

•                   /etc/security/prof_attr                            # Predefined profile (collection of rights)

•                   /etc/security/policy.conf              # User defaults

•                   /etc/security/exec_attr                            # Rights Profile and associated execution attributes

 

profiles <username>

Display security profiles assigned to user

profiles -l <username>

Displays individual commands within a profile

pfexec <cmd>

Executes commands with correct privileges

roles <username>

Display roles assigned to user

 

Solaris Security Toolkit

•                   Download from http://www.sun.com/software/security/jass/

•                   Installed into /opt/SUNWjass

•                   Run manual or integrated with Jumpstart

•                   Ready made templates in /opt/SUNWjass/Drivers

•                   Always have console access, as the tool-kit often blocks remote logins.

./jass-execute -d secure.driver

Hardens Solaris

./jass-execute -a secure.driver

Audits Solaris against template

./jass-execute -c

Clear previous edits.

 

Miscellaneous  Settings

/etc/ssh/sshd_config

SSH Settings

Disable Root, Allow on SSH-2 protocol

Consider naming specific users.

Or disable well know users, oracle, admin....

vi /etc/security/policy.conf

change CRYPT_DEFAULT to 1 (BSD MD5)

CRYPT_DEFAULT=1

Change password encryption

 

 

Solaris IP Filter

•                   Not enables by default

•                   Packet Filtering available between zones.

•                   NAT

•                   Statefull

•                   Manual configuration only

 

vi /etc/ipf/ipf.conf

Edit rules file

ipf -f /etc/ipf/ipf.conf

Enabe rules files

ipf -Fa

Disable Rules

ipf -Fi

Disable incoming filter

Ipfstat

IP Filter stastics

svcadm enable network/ipfilter

Enable the IP Filter

 

Rule Examples

#/etc/ipf/ipf.conf

 

# pass and log everything by default

pass in log on elxl0 all

pass out log on elxl0 all

 

# Disable SSH access to this machine from  192.168.10.254

block in quick from 192.168.10.254/32 to port = 22

 

# block, but don't log, incoming packets from other reserved addresses

block in quick on elxl0 from 10.0.0.0/8 to any

block in quick on elxl0 from 172.16.0.0/12 to any

 

# block and log untrusted internal IPs. 0/32 is notation that replaces

# address of the machine running Solaris IP Filter.

block in log quick from 192.168.1.15 to <thishost>

block in log quick from 192.168.1.43 to <thishost>

 

# block and log X11 (port 6000) and remote procedure call

# and portmapper (port 111) attempts

block in log quick on elxl0 proto tcp from any to elxl0/32 port = 6000 keep state

block in log quick on elxl0 proto tcp/udp from any to elxl0/32 port = 111 keep state

Note – example taken from Sun IP Security Manual

 

DTrace

 

A dynamic tracing facility that provides a comprehensive view of operating system and application behaviour. It has functionality similar to truss, apptrace, prex and mdb, bundled into a single scriptable tool that can examine both userland activity and the kernel. DTrace can be used on live production servers with often negligible impact on performance.

 

Example D-scripts are provided in /usr/demo/dtrace

 

DTrace toolkit                            http://www.opensolaris.org/os/community/dtrace/dtracetoolkit

 

DTrace manual              http://docs.sun.com/app/docs/doc/817-6223

 

Quick Ref                            http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_quickref.html

 

How to                             http://www.sun.com/software/solaris/howtoguides/dtracehowto.jsp

 

Dtrace Cheatsheet              http://blogs.sun.com/brendan/entry/dtrace_cheatsheet

 

 

Solaris 10 minor differences

 

routeadm -e ipv4-forwarding

routeadm -d ipv4-routing

routeadm -e ipv4-routing

Routing commands, for IP Forwarding and routing (in.routed)

echo “server IP_ADDRESS” >> /etc/inet/ntp.conf

svcadm enable /network/ntp

Enable NTP

vi /etc/security/policy.conf

change CRYPT_DEFAULT to 1 (BSD MD5)

CRYPT_DEFAULT=1

Change password encryption

svccfg -s x11-server setprop options/tcp_listen = true

Allow X11 connection Solaris 10

dumpadm -d /dev/dsk<device>

Manage Dumps to dedicated device (support ZFS root)

dumpadm -c /var/crash/<hostname>

Manage core dumps

 

Live Upgrade (ZFS)

lucreate -c <be_name> -n <new-be_name>

Name current boot environment and create New BE.

lucreate  -n <new-be_name>

Create new environment

lustatus

Display boot environment

luupgrade -u -n <new-be_name> -s /net/<ip address>/export/install

Live OS Upgrade

cd 10_Recommended

luupgrade -t -n <new-be_name> -O  \

-t -s . ./patch_order

Patch a live environment from downloaded patch cluster.

luactivate <new-be_name>

Activate Boot environment, after reboot.

DON'T USE “reboot” command, always use init or shutdown.

Reference Material

 

Little Known Solaris Features http://www.c0t0d0s0.org/pages/lksfbook.html

Solaris Security Tool Kit http://docs.sun.com/app/docs/prod/61ec778c-5688-47ba-b4bf-af20b140731a

Solaris Patching Best Practise http://www.sun.com/bigadmin/features/articles/patch_management.jsp

Solaris Zones FAQ http://hub.opensolaris.org/bin/view/Community+Group+zones/faq

Zonestat Util http://hub.opensolaris.org/bin/view/Project+zonestat/

SVC SMF https://www.sun.com/offers/docs/smfmanifest_howto.pdf

 

 

 

 

 

 

Andy Paton

18/18

7/11/09

Version 2.1

Wednesday, October 21, 2009

SMcli Examples

SMcli Examples from the command line


\\ Create snapshot
SMcli <ip address> -c "set session password=\"<password>\" ; create snapshotVolume  basevolume=\"TEST_VOL_REPL\"  repositoryPercentOfBase=80  repositoryFullPolicy=failSnapShot ; "

\\ Delete snapshot/volume
SMcli <ip address> -c "set session password=\"<password>\" ; delete volume [\"TEST_VOL_REPL-1\"] ; "

\\ Create Remote Mirror (ON PRIMARY STORAGE)
SMcli <Primary IP address>  -c "set session password=\"<password>\" ; create remoteMirror primary=\"TEST_VOL\" secondary=\"TEST_VOL_REPL\" remotestorageArrayName=\"<Secondary ARRAY NAME>\" remotePassword=\"<password>\" syncPriority=medium writeOrder=preserved writeMode=synchronous;"

\\ Remove Remote Mirror
SMcli <ip address> -c "set session password=\"<password>\" ; remove remoteMirror localVolume [\"TEST_VOL_REPL\"] ;"

\\ Map LUN
SMcli <ip address> -c "set session password=\"<password>\" ; set volume [\"TEST_VOL_REPL\"] logicalUnitNumber=6 host=\"<HOST NAME>\"; "

\\ Un Mapp LUN
SMcli <ip address> -c "set session password=\"<password>\" ; remove volume [\"TEST_VOL_REPL\"] lunMapping host=\"<HOST NAME>\"; "

\\ View Lun Maps
SMcli <ip address> -c "set session password=\"<password>\" ; Show storageArray lunMappings host [\"<HOST NAME>\"];"


SMcli Examples from a SMcli Script File


// call by SMcli <ip address> -f <script name>


// Set Password
set session password="<password>" ;

// Print statement
show "Hello World" ;

// Create snapshot
create snapshotVolume  basevolume="TEST_VOL_REPL"  repositoryPercentOfBase=80  repositoryFullPolicy=failSnapShot ;

// Delete snapshot-volume
delete volume ["TEST_VOL_REPL-1"] ;

// Create Remote Mirror

create remoteMirror primary="TEST_VOL" secondary="TEST_VOL_REPL" remotestorageArrayName="<Secondary ARRAY NAME>" remotePassword="<password>" syncPriority=medium writeOrder=preserved writeMode=synchronous;

// Remove Remote Mirror
show "* Break Mirror for TEST_VOL_REPL" ;
remove remoteMirror localVolume ["TEST_VOL_REPL"] ;

// Map LUN to HOST
set volume ["TEST_VOL_REPL"] logicalUnitNumber=<LUN ID> host="<HOST NAME>";

// Un Mapp LUN
remove volume ["TEST_VOL_REPL"] lunMapping host="<HOST NAME>";


// view mappings
show storageArray lunMappings host ["<HOST NAME>"];

Friday, March 06, 2009

Solaris 10 Administration Guide (11/06)

My Solaris 10 Admin Guide (Sol10 11/06), needs updating but its a good start. click here to view.

Saturday, February 14, 2009

P2V Slackware 11






P2V Slackware 11 2.4 Kernel 32bit


Slackware running on ESX 3.5u3

Needed media or ISO's


Use the VMWARE Convertor CD to transfer the environment.
Use cold boot from CD

FROM ESX/VMWARE

Change created VM machine settings to
  • Linux-32bit
  • BusLogic SCSI controller (default)
  • Add additional memory if required - recommended at-least 256Mb

Boot from Slackware CD media.
    Enter scsi module on LILO
    boot: scsi.s

Mount local root disk
$ mount /dev/<sda2> /mnt
$ cd /mnt/dev
$ ./MAKEDEV sda1
$ ./MAKEDEV sda2

Enter chrooted environment
$ chroot /mnt

Rebuild Slackware Kernel
As default kernel did have BusLogic support for me.

$  cd /usr/src/linux

Enable SCSI and BusLogic Support
Under SCSI/Advanced put a "*" next BusLogic kernel module
$ make menuconfig

Build images, took 45 minutes on 2.4Ghz CP 256MB Mem.
$ make bzImage
$ make modules
$ make modules_install

$ cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-ESX

$ vi /etc/lilo.conf

image = /boot/vmlinuz-ESX

root = /dev/hda1

label = Slackware-2.4-ESX

read-only

$ mount /proc
$ lilo
exit ;exit ;exit ; reboot

On reboot select Slackware-2.4-ESX on LILO screen


Done











Saturday, October 18, 2008

Veritas Volume Manager (VxVM) on AIX 5.3

I'm a fan of VxVM, I've use over many years. But I did get to a problem that stumped me recently.

I was unable to initialise the disks on AIX, I would get a permission denied error.

aix53# /usr/lib/vxvm/bin/vxdisksetup -if DS4700-0_1 format=aixdisk

/dev/hdisk3: Permission denied


Resolution.
The DS4700 storage must use AIX multipath MPIO and that needs the right reserve policy. (VxVM's DMP only sees a single path)

aix53# chdev -l hdisk3 -a reserve_policy=no_reserve


Config
Aix 5.3 TL8 SP2
DS4700 Firmware 9.6x
VxVM 5, MP1, Rolling Patch5, HotFix 5

Wednesday, July 09, 2008

Mount an ISO image on a Solaris/AIX filesystem




Solaris

lofiadm -a /export/temp/software.iso /dev/lofi/1


The lofi device creates a block device version of a file. This block device can be mounted to /mnt with the following command:

mount -F hsfs -o ro /dev/lofi/1 /mnt


These commands can be combined into a single command:

mount -F hsfs -o ro `lofiadm -a /export/temp/software.iso` /mnt


Unmount and close loopback filesystem
umount /mnt
lofiadm -d /dev/lofi/1


AIX 5.3

mklv -y cdlv -s n -L /dev/cdlv vg00 $(du -m 10gR2.iso|awk '{print
int($1+128)"M"}') hdisk2 ## 128M pp say
dd if=10gR2.iso of=/dev/cdlv # took hours
mount -v cdrfs -o ro /dev/cdlv /mnt/iso

Friday, July 04, 2008

Red Hat 4.6 AS x64_EMT

IBM/LSI RDAC LINUX DRIVERS INSTALL




Configuration example
  • IBM x3850
  • 2 x Emulex 4Gb FC Cards
  • Redhat 4 AS x64_EMT (lastest patches - up2date)
  • IBM DS4700 Storage - Direct Attached

This is required to be done on every kernel update.

Install kernel update through normal procedure (up2date) and reboot into new kernel
Use "uname -a" to show kernel details.


Check you using the correct C complier.

ls -ial /usr/bin/gcc
should be a link to /usr/bin/linuxEMT_64-gcc

If its not please change the link or update the CC flag in the LSI RDAC driver make file.

Download RDAC driver from LSI http://www.lsi.com/rdac/ds4000.html
Select 2.6 Kernel Version (Suports RHEL 4 U5)

Unpack
[root@main download]# ls
rdac-LINUX-09.01.B5.76-source.tar.gz
[root@main download]# gzip -d rdac-LINUX-09.01.B5.76-source.tar.gz
[root@main download]# tar xf rdac-LINUX-09.01.B5.76-source.tar
[root@main download]# ls
linuxrdac-09.01.B5.76
rdac-LINUX-09.01.B5.76-source.tar

[root@main download]# cd linuxrdac-09.01.B5.76

[root@main linuxrdac-09.01.B5.76]# ls
genfileattributes mppiscsi_umountall mppLnx26_vhbaproc.c
genuniqueid.c mpp_linux_headers mppLnx26_vhbatask.c
hbaCheck mpp_linux_sys_headers mpp_rcscript.REDHAT
License.txt mppLnx26_spinlock_size.c mpp_rcscript.SUSE
lsvdev mppLnx26_sysdep.c mppSupport
Makefile mppLnx26_upper.c Readme.txt
mppCmn_s2tos3.c mppLnx26_vhba.c setupDriver.REDHAT
mppCmn_SysInterface.c mppLnx26_vhbaio.c setupDriver.SUSE
mpp.conf mppLnx26_vhbalib.c utility
MPP_hba.c mppLnx26_vhbamisc.c



[root@main linuxrdac-09.01.B5.76]# make
make V=1 -C/lib/modules/2.6.9-67.ELlargesmp/build M=/home/apaton/download/linuxrdac-09.01.B5.76 MODVERDIR=/lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions SUBDIRS=/home/apaton/download/linuxrdac-09.01.B5.76 modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
mkdir -p /lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions
make -f scripts/Makefile.build obj=/home/apaton/download/linuxrdac-09.01.B5.76
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.MPP_hba.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=MPP_hba -DKBUILD_MODNAME=mppUpper -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_MPP_hba.o /home/apaton/download/linuxrdac-09.01.B5.76/MPP_hba.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_upper.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_upper -DKBUILD_MODNAME=mppUpper -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_upper.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_upper.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_sysdep.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_sysdep -DKBUILD_MODNAME=mppUpper -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_sysdep.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_sysdep.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppCmn_s2tos3.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppCmn_s2tos3 -DKBUILD_MODNAME=mppUpper -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppCmn_s2tos3.o /home/apaton/download/linuxrdac-09.01.B5.76/mppCmn_s2tos3.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppCmn_SysInterface.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppCmn_SysInterface -DKBUILD_MODNAME=mppUpper -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppCmn_SysInterface.o /home/apaton/download/linuxrdac-09.01.B5.76/mppCmn_SysInterface.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_vhba.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_vhba -DKBUILD_MODNAME=mppVhba -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_vhba.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhba.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_vhbaio.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_vhbaio -DKBUILD_MODNAME=mppVhba -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_vhbaio.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbaio.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_vhbatask.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_vhbatask -DKBUILD_MODNAME=mppVhba -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_vhbatask.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbatask.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_vhbalib.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_vhbalib -DKBUILD_MODNAME=mppVhba -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_vhbalib.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbalib.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_vhbamisc.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_vhbamisc -DKBUILD_MODNAME=mppVhba -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_vhbamisc.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbamisc.c
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppLnx26_vhbaproc.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -DMODULE -DKBUILD_BASENAME=mppLnx26_vhbaproc -DKBUILD_MODNAME=mppVhba -c -o /home/apaton/download/linuxrdac-09.01.B5.76/.tmp_mppLnx26_vhbaproc.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbaproc.c
ld -m elf_x86_64 -r -o /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.o /home/apaton/download/linuxrdac-09.01.B5.76/MPP_hba.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_upper.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_sysdep.o /home/apaton/download/linuxrdac-09.01.B5.76/mppCmn_s2tos3.o /home/apaton/download/linuxrdac-09.01.B5.76/mppCmn_SysInterface.o
ld -m elf_x86_64 -r -o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhba.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbaio.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbatask.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbalib.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbamisc.o /home/apaton/download/linuxrdac-09.01.B5.76/mppLnx26_vhbaproc.o
Building modules, stage 2.
make -rR -f /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/scripts/Makefile.modpost
scripts/mod/modpost -m -i /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/Module.symvers /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.o
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppUpper.mod.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -DKBUILD_BASENAME=mppUpper -DKBUILD_MODNAME=mppUpper -DMODULE -c -o /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.mod.o /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.mod.c
ld -m elf_x86_64 -r -o /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.ko /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.o /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.mod.o
gcc -Wp,-MD,/home/apaton/download/linuxrdac-09.01.B5.76/.mppVhba.mod.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -DKBUILD_BASENAME=mppVhba -DKBUILD_MODNAME=mppVhba -DMODULE -c -o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.mod.o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.mod.c
ld -m elf_x86_64 -r -o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.ko /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.mod.o
make[1]: Leaving directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
make V=1 -C/lib/modules/2.6.9-67.ELlargesmp/build M=/home/apaton/download/linuxrdac-09.01.B5.76 MODVERDIR=/lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions SUBDIRS=/home/apaton/download/linuxrdac-09.01.B5.76 modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
mkdir -p /lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions
make -f scripts/Makefile.build obj=/home/apaton/download/linuxrdac-09.01.B5.76
Building modules, stage 2.
make -rR -f /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/scripts/Makefile.modpost
scripts/mod/modpost -m -i /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/Module.symvers /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.o
make[1]: Leaving directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
gcc -D__KERNEL__ -I/lib/modules/2.6.9-67.ELlargesmp/build/include mppLnx26_spinlock_size.c -o mppLnx_Spinlock_Size
gcc -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -c ./utility/mppUtil.c -o mppUtil.o
/bin/bash ./genfileattributes bld
gcc -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -c ./utility/mppUtil26_sysdep.c -o mppUtilSysdep.o
gcc mppUtil.o mppUtilSysdep.o -o mppUtil
gcc -o genuniqueid genuniqueid.c




[root@main linuxrdac-09.01.B5.76]# make install
make V=1 -C/lib/modules/2.6.9-67.ELlargesmp/build M=/home/apaton/download/linuxrdac-09.01.B5.76 MODVERDIR=/lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions SUBDIRS=/home/apaton/download/linuxrdac-09.01.B5.76 modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
mkdir -p /lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions
make -f scripts/Makefile.build obj=/home/apaton/download/linuxrdac-09.01.B5.76
Building modules, stage 2.
make -rR -f /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/scripts/Makefile.modpost
scripts/mod/modpost -m -i /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/Module.symvers /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.o
make[1]: Leaving directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
make V=1 -C/lib/modules/2.6.9-67.ELlargesmp/build M=/home/apaton/download/linuxrdac-09.01.B5.76 MODVERDIR=/lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions SUBDIRS=/home/apaton/download/linuxrdac-09.01.B5.76 modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
mkdir -p /lib/modules/2.6.9-67.ELlargesmp/build/.tmp_versions
make -f scripts/Makefile.build obj=/home/apaton/download/linuxrdac-09.01.B5.76
Building modules, stage 2.
make -rR -f /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/scripts/Makefile.modpost
scripts/mod/modpost -m -i /usr/src/kernels/2.6.9-67.EL-largesmp-x86_64/Module.symvers /home/apaton/download/linuxrdac-09.01.B5.76/mppUpper.o /home/apaton/download/linuxrdac-09.01.B5.76/mppVhba.o
make[1]: Leaving directory `/usr/src/kernels/2.6.9-67.EL-largesmp-x86_64'
/bin/bash ./genfileattributes bld
gcc -I/home/apaton/download/linuxrdac-09.01.B5.76 -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_headers/ -I/home/apaton/download/linuxrdac-09.01.B5.76/mpp_linux_sys_headers/ -c ./utility/mppUtil26_sysdep.c -o mppUtilSysdep.o
gcc mppUtil.o mppUtilSysdep.o -o mppUtil
Checking Host Adapter Configuration...
Detected 2 Emulex Host Adapter Port(s) on the system
Please wait while we modify the system configuration files.
Your kernel version is 2.6.9-67.ELlargesmp
Preparing to install MPP driver against this kernel version...
Generating module dependencies...
Creating new MPP initrd image...
You must now edit your boot loader configuration file, /boot/grub/menu.lst, to
add a new boot menu, which uses mpp-2.6.9-67.ELlargesmp.img as the initrd image.
Now Reboot the system for MPP to take effect.
The new boot menu entry should look something like this (note that it may
vary with different system configuration):

...

title Red Hat Linux (2.6.9-67.ELlargesmp) with MPP support
root (hd0,5)
kernel /vmlinuz-2.6.9-67.ELlargesmp ro root=LABEL=RH9
initrd /mpp-2.6.9-67.ELlargesmp.img
...



MPP driver package has been successfully installed on your system.



Check that the make install script has found your Fibre Channel HBA's.


Update Grub boot loader to use the kernel (Note the initrd line changed plus the description)
[root@main linuxrdac-09.01.B5.76]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-67.ELlargesmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-67.ELlargesmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-67.ELlargesmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-67.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-67.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-67.EL.img
title Red Hat Enterprise Linux AS IBM-MPP (2.6.9-67.ELlargesmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-67.ELlargesmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /mpp-2.6.9-67.ELlargesmp.img


Check Status using the PROC file system

[root@main ~]# cat /proc/mpp/ifs-storage/virtualLun0
Linux MPP driver. Version:09.01.B5.76 Build:Thu Aug 30 15:11:23 CDT 2007
Lun WWN:600a0b80002ae8c40000025e479b3506
Virtual Scsi Address: host_no:3 channel:0 target:0 Lun:0
Queue Depth = 28
I/O Statistics:
Number of IOs:40
Longest trip of all I/Os:0
Shortest trip of all I/Os:0
Number of occurrences of path failover events:0
Number of occurrences of controller failover events:0
The longest Controller Failover Time:0
The shortest Controller Failover Time:0
total size:484

[root@main ~]# cat /proc/mpp/ifs-storage/controllerA/lpfc_h1c0t0/
LUN0 LUN2 LUN4 LUN6 UTM_LUN31
LUN1 LUN3 LUN5 LUN7

[root@main ~]# cat /proc/mpp/ifs-storage/controllerA/lpfc_h1c0t0/LUN0
Linux MPP driver. Version:09.01.B5.76 Build:Thu Aug 30 15:11:23 CDT 2007
Lun WWN:600a0b80002ae8c40000025e479b3506
Physical HBA driver: lpfc
Device Scsi Address: host_no:1 channel:0 target:0 Lun:0
Queue Depth = 30
I/O Statistics:
Number of IOs:42
Longest trip of all I/Os:0
Shortest trip of all I/Os:0
Number of occurences of IO failed events:0
Device state: [0] OPTIMAL
Device state: [1] OPTIMAL
Device state: [2] OPTIMAL
Device state: [3] OPTIMAL
Device state: [4] OPTIMAL
Device state: [5] OPTIMAL
Device state: [6] OPTIMAL
Device state: [7] OPTIMAL
Device state: [8] OPTIMAL
Device state: [9] OPTIMAL
Path state:[8] OPTIMALPath state:[9] OPTIMAL
Path state:[0] OPTIMAL_NEED_CHECK
Path state:[1] OPTIMAL_CHECKING
Path state:[2] OPTIMAL
Path state:[3] OPTIMAL_NEED_CHECK
Path state:[4] OPTIMAL_CHECKING
Path state:[5] OPTIMAL
Path state:[6] OPTIMAL_NEED_CHECK
Path state:[7] OPTIMAL_CHECKING
Controller Failed? 0
total size:1099



Config Files

/etc/mpp.conf
/etc/modprobe.conf
/opt/mpp/modprobe.conf.mppappend

[root@main etc]# cat /etc/mpp.conf
VirtualDiskProductId=VirtualDisk
DebugLevel=0x0
NotReadyWaitTime=270
BusyWaitTime=270
QuiescenceWaitTime=270
InquiryWaitTime=60
MaxLunsPerArray=256
MaxPathsPerController=4
ScanInterval=60
InquiryInterval=1
MaxArrayModules=30
ErrorLevel=3
SelectionTimeoutRetryCount=0
UaRetryCount=10
RetryCount=10
SynchTimeout=170
FailOverQuiescenceTime=20
FailoverTimeout=120
FailBackToCurrentAllowed=1
ControllerIoWaitTime=300
ArrayIoWaitTime=600
DisableLUNRebalance=0
IdlePathCheckingInterval=60
RecheckFailedPathWaitTime=30
FailedPathCheckingInterval=60
ArrayFailoverWaitTime=300
PrintSenseBuffer=0
S2ToS3Key=2e67f55c3f210c1c


[root@main mpp]# cat /etc/modprobe.conf
alias eth0 tg3
alias eth1 tg3
alias scsi_hostadapter aacraid
alias scsi_hostadapter1 lpfc
alias usb-controller ehci-hcd
alias usb-controller1 ohci-hcd
### BEGIN MPP Driver Comments ###
remove mppUpper if [ `ls -a /proc/mpp | wc -l` -gt 2 ]; then echo -e "Please Unload Physical HBA Driver prior to unloading mppUpper."; else /sbin/modprobe -r --ignore-remove mppUpper; fi
# Additional config info can be found in /opt/mpp/modprobe.conf.mppappend.
# The Above config info is needed if you want to make mkinitrd manually.
# Please read the Readme file that came with MPP driver for building RamDisk manually.
# Edit the '/etc/modprobe.conf' file and run 'mppUpdate' to create Ramdisk dynamically.
### END MPP Driver Comments ###


[root@main mpp]# cat /opt/mpp/modprobe.conf.mppappend
### BEGIN OF MPP Driver Changes ###
options scsi_mod max_report_luns=256 max_luns=512
alias scsi_hostadapter99 mppVhba
options lpfc lpfc_nodev_tmo=60
alias scsi_hostadapter97 lpfc
## END OF MPP Driver Changes ###



[root@main ~]# mppBusRescan
Starting new devices re-scan...
scan lpfc HBA host /sys/class/scsi_host/host2...
no new device found
scan lpfc HBA host /sys/class/scsi_host/host1...
no new device found
run /usr/sbin/mppUtil -s busscan...
scan mpp virtual host /sys/class/scsi_host/host3...
no new virtual device found
/usr/sbin/mppBusRescan is completed.


[root@main ~]# mppUtil -S
H3C0T0 Active Active ifs-storage
H1C0T0L000 Up H2C0T0L000 Up
H1C0T0L001 Up H2C0T0L001 Up
H1C0T0L002 Up H2C0T0L002 Up
H1C0T0L003 Up H2C0T0L003 Up
H1C0T0L004 Up H2C0T0L004 Up
H1C0T0L005 Up H2C0T0L005 Up
H1C0T0L006 Up H2C0T0L006 Up
H1C0T0L007 Up H2C0T0L007 Up

Missing Arrays
There are no missing arrays












Dilbert on Virtualization





T3 Setup for Vmware

Config - through SAN switch 5200, zones with multiple targets but single initiators.

set ip 192.168.10.198
set gateway 192.168.10.254

vol add v0 data u1d1-4 raid 5 standby u1d9
vol init v0 data
vol mount v0

volslice create vmfs -z 116GB v0

sys fc_topology fabric_p2p
sys mirror off
sys cache writethrough

lun default all_lun rw
AIX Increase SAN disk/filesystem

See change config

cfgmgr
chvg -g <volumegroup>

chfs -a size=+??G /<filesystem>


Wednesday, July 25, 2007

Xen & VxVM




The guys over at XenSource have pulled a master stoke, they have announced they will be integrating VxVM & VxFS into their Enterprise product. I'm a VMWARE VCP and it always amazed me that the VMWARE ESX didn't support fibre multipathing with load balancing. I've always taken multipathing for granted with Veritas (Symantec) VxVM DMP (a must with Photons) and latter MPXIO in Solaris.

I'm sure VMWARE will add EMC PowerPath soon to push along those CLARiiON.

Remember you can get Veritas Volume manager for free, check this blog post.

Solstice DiskSuite Command Summary

Having a sort out and found this course handout originally written by John Furlong - Sun Trainer in 23/10/2002  (Free to distribute). Remind...