Monitor LVM with the following commands:
bdf Similar to a Solaris style "df -k" output.
pvdisplay Display PV Information (PV = phys volume)
vgdisplay Display VG Information (VG = volume group)
lvdisplay Display LV Information (LV = logical volume
- Here's a list of commands:
----VG-----
vgcfgbackup
vgchange
vgcreate
vgexport
vgimport
vgremove
vgcfgrestore
vgchgid
vgdisplay
vgextend
vgreduce
vgscan
---LV----
lvchange
lvdisplay
lvlnboot
lvreduce
lvrmboot
lvcreate
lvextend
lvmmigrate
lvremove
---PV----
pvchange
pvck
pvcreate
pvdisplay
pvmove
pvremove
- There are 3 LVM Objects:
----------------------------
| Logical Volume |
----------------------------
\/ \/ \/ \/
----------------------------
| Volume Group |
----------------------------
\/ \/ \/ \/
----------------------------
| Physical Volume |
----------------------------
or: Disks are used to create PV's,
which we group into VG's, from
which we create LV's which
contains the filesystem we use.
- AIX Commands are:
--PV--
chpv
ldeletepv
lquerypv
lspv
replacepv
lchangepv
linstallpv
lresyncpv
migratepv
--VG--
cfgvg
importvg
lsvg
lvgenminor
reorgvg
varyonvg
chvg
lchangevg
lsvgfs
mirrorvg
syncvg
exportvg
lcreatevg
lvaryoffvg
mkvg
unmirrorvg
extendvg
lqueryvg
lvaryonvg
redefinevg
updatevg
getvgname
lqueryvgs
lvgenmajor
reducevg
varyoffvg
--LV--
chlv
getlvodm
lresynclv
lvrelmajor
rmlv
chlvcopy
lchangelv
lslv
lvrelminor
rmlvcopy
clvm_cfg
lchlvcopy
lvaryoffvg
mklv
splitlvcopy
clvmd
lcreatelv
lvaryonvg
mklvcopy
synclvodm
copyrawlv
ldeletelv
lvchkmajor
namerslv
updatelv
cplv
lextendlv
lvgenmajor
putlvcb
extendlv
lmigratelv
lvgenminor
putlvodm
getlvcb
lquerylv
lvlstmajor
readlvcopy
getlvname
lreducelv
lvmmsg
Monday, 23 March 2009
Wednesday, 18 March 2009
SNMP & community strings
Simple Network Management Protocol (SNMP) is used in network management systems to monitor network-attached devices for conditions that warrant administrative attention. SNMP is a component of the Internet Protocol Suite as defined by the Internet Engineering Task Force (IETF). It consists of a set of standards for network management, including an application layer protocol, a database schema, and a set of data objects.
SNMP exposes management data in the form of variables on the managed systems, which describe the system configuration. These variables can then be queried (and sometimes set) by managing applications.
In typical SNMP usage, there are a number of systems to be managed, and one or more systems managing them. A software component called an agent (see below) runs on each managed system and reports information via SNMP to the managing systems.
Essentially, SNMP agents expose management data on the managed systems as variables (such as "free memory", "system name", "number of running processes", "default route"). But the protocol also permits active management tasks, such as modifying and applying a new configuration. The managing system can retrieve the information through the GET, GETNEXT and GETBULK protocol operations or the agent will send data without being asked using TRAP or INFORM protocol operations. Management systems can also send configuration updates or controlling requests through the SET protocol operation to actively manage a system. Configuration and control operations are used only when changes are needed to the network infrastructure. The monitoring operations are usually performed on a regular basis.
The variables accessible via SNMP are organized in hierarchies. These hierarchies, and other metadata (such as type and description of the variable), are described by Management Information Bases (MIBs).
SNMP basic components
An SNMP-managed network consists of three key components:
Managed devices
Agents
Network-management stations (NMSs)
A managed device is a network node that contains an SNMP agent and that resides on a managed network. Managed devices collect and store management information and make this information available to NMSs using SNMP. Managed devices, sometimes called network elements, can be any type of device including, but not limited to, routers, access servers, switches, bridges, hubs, IP telephones, computer hosts, and printers.
An agent is a network-management software module that resides in a managed device. An agent has local knowledge of management information and translates that information into a form compatible with SNMP.
A network management system (NMS) executes applications that monitor and control managed devices. NMSs provide the bulk of the processing and memory resources required for network management. One or more NMSs may exist on any managed network.
SNMP Community Strings
An SNMP community string is a text string that acts as a password. It is used to authenticate messages that are sent between the management station (the SNMP manager) and the device (the SNMP agent). The community string is included in every packet that is transmitted between the SNMP manager and the SNMP agent.
After receiving an SNMP request, the SNMP agent compares the community string in the request to the community strings that are configured for the agent. The requests are valid under these circumstances:
Only SNMP Get and Get-next requests are valid if the community string in the request matches the read-only community.
SNMP Get, Get-next, and Set requests are valid if the community string in the request matches the agent's read-write community.
To check if there are community strings on a system - check the /etc/snmpd.conf file. If community strings are used, they will be uncommented as shown below;
#contact: # enter contact person for agent
#location: # enter location of agent
#max-trap-dest: # enter max no. of trap-dest entries to be maintained.
#trap-dest: # enter trap destination
get-community-name: Madeupname_mgt_read
set-community-name: Madeupname_mgt_write
trap-dest: perfhost
trap-dest: DSMHOST
See also;
http://support.3com.com/infodeli/tools/netmgt/tncsunix/product/091500/c15snmp.htm#7423 SNMP netowrk troubleshooting
SNMP exposes management data in the form of variables on the managed systems, which describe the system configuration. These variables can then be queried (and sometimes set) by managing applications.
In typical SNMP usage, there are a number of systems to be managed, and one or more systems managing them. A software component called an agent (see below) runs on each managed system and reports information via SNMP to the managing systems.
Essentially, SNMP agents expose management data on the managed systems as variables (such as "free memory", "system name", "number of running processes", "default route"). But the protocol also permits active management tasks, such as modifying and applying a new configuration. The managing system can retrieve the information through the GET, GETNEXT and GETBULK protocol operations or the agent will send data without being asked using TRAP or INFORM protocol operations. Management systems can also send configuration updates or controlling requests through the SET protocol operation to actively manage a system. Configuration and control operations are used only when changes are needed to the network infrastructure. The monitoring operations are usually performed on a regular basis.
The variables accessible via SNMP are organized in hierarchies. These hierarchies, and other metadata (such as type and description of the variable), are described by Management Information Bases (MIBs).
SNMP basic components
An SNMP-managed network consists of three key components:
Managed devices
Agents
Network-management stations (NMSs)
A managed device is a network node that contains an SNMP agent and that resides on a managed network. Managed devices collect and store management information and make this information available to NMSs using SNMP. Managed devices, sometimes called network elements, can be any type of device including, but not limited to, routers, access servers, switches, bridges, hubs, IP telephones, computer hosts, and printers.
An agent is a network-management software module that resides in a managed device. An agent has local knowledge of management information and translates that information into a form compatible with SNMP.
A network management system (NMS) executes applications that monitor and control managed devices. NMSs provide the bulk of the processing and memory resources required for network management. One or more NMSs may exist on any managed network.
SNMP Community Strings
An SNMP community string is a text string that acts as a password. It is used to authenticate messages that are sent between the management station (the SNMP manager) and the device (the SNMP agent). The community string is included in every packet that is transmitted between the SNMP manager and the SNMP agent.
After receiving an SNMP request, the SNMP agent compares the community string in the request to the community strings that are configured for the agent. The requests are valid under these circumstances:
Only SNMP Get and Get-next requests are valid if the community string in the request matches the read-only community.
SNMP Get, Get-next, and Set requests are valid if the community string in the request matches the agent's read-write community.
To check if there are community strings on a system - check the /etc/snmpd.conf file. If community strings are used, they will be uncommented as shown below;
#contact: # enter contact person for agent
#location: # enter location of agent
#max-trap-dest: # enter max no. of trap-dest entries to be maintained.
#trap-dest: # enter trap destination
get-community-name: Madeupname_mgt_read
set-community-name: Madeupname_mgt_write
trap-dest: perfhost
trap-dest: DSMHOST
See also;
http://support.3com.com/infodeli/tools/netmgt/tncsunix/product/091500/c15snmp.htm#7423 SNMP netowrk troubleshooting
Tuesday, 17 March 2009
VCS cheat sheet
Veritas Cluster Cheat sheet
LLT and GAB Commands | Port Membership | Daemons | Log Files | Dynamic Configuration | Users | Resources | Resource Agents | Service Groups | Clusters | Cluster Status | System Operations | Sevice Group Operations | Resource Operations | Agent Operations | Starting and Stopping
LLT and GRAB
VCS uses two components, LLT and GAB to share data over the private networks among systems.
These components provide the performance and reliability required by VCS.
LLT LLT (Low Latency Transport) provides fast, kernel-to-kernel comms and monitors network connections. The system admin configures the LLT by creating a configuration file (llttab) that describes the systems in the cluster and private network links among them. The LLT runs in layer 2 of the network stack
GAB GAB (Group membership and Atomic Broadcast) provides the global message order required to maintain a synchronised state among the systems, and monitors disk comms such as that required by the VCS heartbeat utility. The system admin configures GAB driver by creating a configuration file ( gabtab).
LLT and GAB files
/etc/llthosts
The file is a database, containing one entry per system, that links the LLT system ID with the hosts name. The file is identical on each server in the cluster.
/etc/llttab
The file contains information that is derived during installation and is used by the utility lltconfig.
/etc/gabtab
The file contains the information needed to configure the GAB driver. This file is used by the gabconfig utility.
/etc/VRTSvcs/conf/config/main.cf
The VCS configuration file. The file contains the information that defines the cluster and its systems.
Gabtab Entries
/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2 -s 16 -S 1123
/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2 -s 144 -S 1124
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s 16 -p a -s 1123
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s 144 -p h -s 1124
/sbin/gabconfig -c -n2
gabdiskconf
-i Initialises the disk region
-s Start Block
-S Signature
gabdiskhb (heartbeat disks)
-a Add a gab disk heartbeat resource
-s Start Block
-p Port
-S Signature
gabconfig
-c Configure the driver for use
-n Number of systems in the cluster.
LLT and GAB Commands
Verifying that links are active for LLT lltstat -n
verbose output of the lltstat command lltstat -nvv | more
open ports for LLT lltstat -p
display the values of LLT configuration directives lltstat -c
lists information about each configured LLT link lltstat -l
List all MAC addresses in the cluster lltconfig -a list
stop the LLT running lltconfig -U
start the LLT lltconfig -c
verify that GAB is operating
gabconfig -a
Note: port a indicates that GAB is communicating, port h indicates that VCS is started
stop GAB running gabconfig -U
start the GAB gabconfig -c -n
override the seed values in the gabtab file gabconfig -c -x
GAB Port Memberbership
List Membership
gabconfig -a
Unregister port f /opt/VRTS/bin/fsclustadm cfsdeinit
Port Function a gab driver
b I/O fencing (designed to guarantee data integrity)
d ODM (Oracle Disk Manager)
f CFS (Cluster File System)
h VCS (VERITAS Cluster Server: high availability daemon)
o VCSMM driver (kernel module needed for Oracle and VCS interface)
q QuickLog daemon
v CVM (Cluster Volume Manager)
w vxconfigd (module for cvm)
Cluster daemons
High Availability Daemon had
Companion Daemon hashadow
Resource Agent daemonAgent
Web Console cluster managerment daemon CmdServer
Cluster Log Files
Log Directory /var/VRTSvcs/log
primary log file (engine log file) /var/VRTSvcs/log/engine_A.log
Starting and Stopping the cluster
"-stale" instructs the engine to treat the local config as stale
"-force" instructs the engine to treat a stale config as a valid one
hastart [-stale|-force]
Bring the cluster into running mode from a stale state using the configuration file from a particular server
hasys -force
stop the cluster on the local server but leave the application/s running, do not failover the application/s hastop -local
stop cluster on local server but evacuate (failover) the application/s to another node within the cluster hastop -local -evacuate
stop the cluster on all nodes but leave the application/s running
hastop -all -force
Cluster Status
display cluster summary hastatus -summary
continually monitor cluster hastatus
verify the cluster is operating hasys -display
Cluster Details
information about a cluster haclus -display
value for a specific cluster attribute haclus -value
modify a cluster attribute haclus -modify
Enable LinkMonitoring haclus -enable LinkMonitoring
Disable LinkMonitoring haclus -disable LinkMonitoring
Users
add a user hauser -add
modify a user hauser -update
delete a user hauser -delete
display all users hauser -display
System Operations
add a system to the cluster hasys -add
delete a system from the cluster hasys -delete
Modify a system attributes hasys -modify
list a system state hasys -state
Force a system to start hasys -force
Display the systems attributes hasys -display [-sys]
List all the systems in the cluster hasys -list
Change the load attribute of a system hasys -load
Display the value of a systems nodeid (/etc/llthosts) hasys -nodeid
Freeze a system (No offlining system, No groups onlining)
hasys -freeze [-persistent][-evacuate]
Note: main.cf must be in write mode
Unfreeze a system ( reenable groups and resource back online)
hasys -unfreeze [-persistent]
Note: main.cf must be in write mode
Dynamic Configuration
The VCS configuration must be in read/write mode in order to make changes. When in read/write mode the
configuration becomes stale, a .stale file is created in $VCS_CONF/conf/config. When the configuration is put
back into read only mode the .stale file is removed.
Change configuration to read/write mode haconf -makerw
Change configuration to read-only mode haconf -dump -makero
Check what mode cluster is running in
haclus -display |grep -i 'readonly'
0 = write mode
1 = read only mode
Check the configuration file
hacf -verify /etc/VRTS/conf/config
Note: you can point to any directory as long as it has main.cf and types.cf
convert a main.cf file into cluster commands hacf -cftocmd /etc/VRTS/conf/config -dest /tmp
convert a command file into a main.cf file
hacf -cmdtocf /tmp -dest /etc/VRTS/conf/config
Service Groups
add a service group haconf -makerw
hagrp -add groupw
hagrp -modify groupw SystemList sun1 1 sun2 2
hagrp -autoenable groupw -sys sun1
haconf -dump -makero
delete a service group haconf -makerw
hagrp -delete groupw
haconf -dump -makero
change a service group
haconf -makerw
hagrp -modify groupw SystemList sun1 1 sun2 2 sun3 3
haconf -dump -makero
Note: use the "hagrp -display" to list attributes
list the service groups hagrp -list
list the groups dependencies hagrp -dep
list the parameters of a group hagrp -display
display a service group's resource hagrp -resources
display the current state of the service group hagrp -state
clear a faulted non-persistent resource in a specific grp hagrp -clear [-sys]
Change the system list in a cluster
# remove the host
hagrp -modify grp_zlnrssd SystemList -delete
# add the new host (don't forget to state its position)
hagrp -modify grp_zlnrssd SystemList -add 1
# update the autostart list
hagrp -modify grp_zlnrssd AutoStartList
Service Group Operations
Start a service group and bring its resources online hagrp -online -sys
Stop a service group and takes its resources offline hagrp -offline -sys
Switch a service group from system to another hagrp -switch to
Enable all the resources in a group hagrp -enableresources
Disable all the resources in a group hagrp -disableresources
Freeze a service group (disable onlining and offlining)
hagrp -freeze [-persistent]
note: use the following to check "hagrp -display | grep TFrozen"
Unfreeze a service group (enable onlining and offlining)
hagrp -unfreeze [-persistent]
note: use the following to check "hagrp -display | grep TFrozen"
Enable a service group. Enabled groups can only be brought online
haconf -makerw
hagrp -enable [-sys]
haconf -dump -makero
Note to check run the following command "hagrp -display | grep Enabled"
Disable a service group. Stop from bringing online
haconf -makerw
hagrp -disable [-sys]
haconf -dump -makero
Note to check run the following command "hagrp -display | grep Enabled"
Flush a service group and enable corrective action. hagrp -flush -sys
Resources
add a resource haconf -makerw
hares -add appDG DiskGroup groupw
hares -modify appDG Enabled 1
hares -modify appDG DiskGroup appdg
hares -modify appDG StartVolumes 0
haconf -dump -makero
delete a resource haconf -makerw
hares -delete
haconf -dump -makero
change a resource
haconf -makerw
hares -modify appDG Enabled 1
haconf -dump -makero
Note: list parameters "hares -display"
change a resource attribute to be globally wide hares -global
change a resource attribute to be locally wide hares -local
list the parameters of a resource hares -display
list the resources hares -list
list the resource dependencies hares -dep
Resource Operations
Online a resource hares -online [-sys]
Offline a resource hares -offline [-sys]
display the state of a resource( offline, online, etc) hares -state
display the parameters of a resource hares -display
Offline a resource and propagate the command to its children hares -offprop -sys
Cause a resource agent to immediately monitor the resource hares -probe -sys
Clearing a resource (automatically initiates the onlining) hares -clear [-sys]
Resource Types
Add a resource type hatype -add
Remove a resource type hatype -delete
List all resource types hatype -list
Display a resource type hatype -display
List a partitcular resource type hatype -resources
Change a particular resource types attributes hatype -value
Resource Agents
add a agent pkgadd -d .
remove a agent pkgrm
change a agent n/a
list all ha agents haagent -list
Display agents run-time information i.e has it started, is it running ? haagent -display
Display agents faults haagent -display |grep Faults
Resource Agent Operations
Start an agent haagent -start[-sys]
Stop an agent haagent -stop[-sys]
LLT and GAB Commands | Port Membership | Daemons | Log Files | Dynamic Configuration | Users | Resources | Resource Agents | Service Groups | Clusters | Cluster Status | System Operations | Sevice Group Operations | Resource Operations | Agent Operations | Starting and Stopping
LLT and GRAB
VCS uses two components, LLT and GAB to share data over the private networks among systems.
These components provide the performance and reliability required by VCS.
LLT LLT (Low Latency Transport) provides fast, kernel-to-kernel comms and monitors network connections. The system admin configures the LLT by creating a configuration file (llttab) that describes the systems in the cluster and private network links among them. The LLT runs in layer 2 of the network stack
GAB GAB (Group membership and Atomic Broadcast) provides the global message order required to maintain a synchronised state among the systems, and monitors disk comms such as that required by the VCS heartbeat utility. The system admin configures GAB driver by creating a configuration file ( gabtab).
LLT and GAB files
/etc/llthosts
The file is a database, containing one entry per system, that links the LLT system ID with the hosts name. The file is identical on each server in the cluster.
/etc/llttab
The file contains information that is derived during installation and is used by the utility lltconfig.
/etc/gabtab
The file contains the information needed to configure the GAB driver. This file is used by the gabconfig utility.
/etc/VRTSvcs/conf/config/main.cf
The VCS configuration file. The file contains the information that defines the cluster and its systems.
Gabtab Entries
/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2 -s 16 -S 1123
/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2 -s 144 -S 1124
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s 16 -p a -s 1123
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s 144 -p h -s 1124
/sbin/gabconfig -c -n2
gabdiskconf
-i Initialises the disk region
-s Start Block
-S Signature
gabdiskhb (heartbeat disks)
-a Add a gab disk heartbeat resource
-s Start Block
-p Port
-S Signature
gabconfig
-c Configure the driver for use
-n Number of systems in the cluster.
LLT and GAB Commands
Verifying that links are active for LLT lltstat -n
verbose output of the lltstat command lltstat -nvv | more
open ports for LLT lltstat -p
display the values of LLT configuration directives lltstat -c
lists information about each configured LLT link lltstat -l
List all MAC addresses in the cluster lltconfig -a list
stop the LLT running lltconfig -U
start the LLT lltconfig -c
verify that GAB is operating
gabconfig -a
Note: port a indicates that GAB is communicating, port h indicates that VCS is started
stop GAB running gabconfig -U
start the GAB gabconfig -c -n
override the seed values in the gabtab file gabconfig -c -x
GAB Port Memberbership
List Membership
gabconfig -a
Unregister port f /opt/VRTS/bin/fsclustadm cfsdeinit
Port Function a gab driver
b I/O fencing (designed to guarantee data integrity)
d ODM (Oracle Disk Manager)
f CFS (Cluster File System)
h VCS (VERITAS Cluster Server: high availability daemon)
o VCSMM driver (kernel module needed for Oracle and VCS interface)
q QuickLog daemon
v CVM (Cluster Volume Manager)
w vxconfigd (module for cvm)
Cluster daemons
High Availability Daemon had
Companion Daemon hashadow
Resource Agent daemon
Web Console cluster managerment daemon CmdServer
Cluster Log Files
Log Directory /var/VRTSvcs/log
primary log file (engine log file) /var/VRTSvcs/log/engine_A.log
Starting and Stopping the cluster
"-stale" instructs the engine to treat the local config as stale
"-force" instructs the engine to treat a stale config as a valid one
hastart [-stale|-force]
Bring the cluster into running mode from a stale state using the configuration file from a particular server
hasys -force
stop the cluster on the local server but leave the application/s running, do not failover the application/s hastop -local
stop cluster on local server but evacuate (failover) the application/s to another node within the cluster hastop -local -evacuate
stop the cluster on all nodes but leave the application/s running
hastop -all -force
Cluster Status
display cluster summary hastatus -summary
continually monitor cluster hastatus
verify the cluster is operating hasys -display
Cluster Details
information about a cluster haclus -display
value for a specific cluster attribute haclus -value
modify a cluster attribute haclus -modify
Enable LinkMonitoring haclus -enable LinkMonitoring
Disable LinkMonitoring haclus -disable LinkMonitoring
Users
add a user hauser -add
modify a user hauser -update
delete a user hauser -delete
display all users hauser -display
System Operations
add a system to the cluster hasys -add
delete a system from the cluster hasys -delete
Modify a system attributes hasys -modify
list a system state hasys -state
Force a system to start hasys -force
Display the systems attributes hasys -display [-sys]
List all the systems in the cluster hasys -list
Change the load attribute of a system hasys -load
Display the value of a systems nodeid (/etc/llthosts) hasys -nodeid
Freeze a system (No offlining system, No groups onlining)
hasys -freeze [-persistent][-evacuate]
Note: main.cf must be in write mode
Unfreeze a system ( reenable groups and resource back online)
hasys -unfreeze [-persistent]
Note: main.cf must be in write mode
Dynamic Configuration
The VCS configuration must be in read/write mode in order to make changes. When in read/write mode the
configuration becomes stale, a .stale file is created in $VCS_CONF/conf/config. When the configuration is put
back into read only mode the .stale file is removed.
Change configuration to read/write mode haconf -makerw
Change configuration to read-only mode haconf -dump -makero
Check what mode cluster is running in
haclus -display |grep -i 'readonly'
0 = write mode
1 = read only mode
Check the configuration file
hacf -verify /etc/VRTS/conf/config
Note: you can point to any directory as long as it has main.cf and types.cf
convert a main.cf file into cluster commands hacf -cftocmd /etc/VRTS/conf/config -dest /tmp
convert a command file into a main.cf file
hacf -cmdtocf /tmp -dest /etc/VRTS/conf/config
Service Groups
add a service group haconf -makerw
hagrp -add groupw
hagrp -modify groupw SystemList sun1 1 sun2 2
hagrp -autoenable groupw -sys sun1
haconf -dump -makero
delete a service group haconf -makerw
hagrp -delete groupw
haconf -dump -makero
change a service group
haconf -makerw
hagrp -modify groupw SystemList sun1 1 sun2 2 sun3 3
haconf -dump -makero
Note: use the "hagrp -display
list the service groups hagrp -list
list the groups dependencies hagrp -dep
list the parameters of a group hagrp -display
display a service group's resource hagrp -resources
display the current state of the service group hagrp -state
clear a faulted non-persistent resource in a specific grp hagrp -clear
Change the system list in a cluster
# remove the host
hagrp -modify grp_zlnrssd SystemList -delete
# add the new host (don't forget to state its position)
hagrp -modify grp_zlnrssd SystemList -add
# update the autostart list
hagrp -modify grp_zlnrssd AutoStartList
Service Group Operations
Start a service group and bring its resources online hagrp -online
Stop a service group and takes its resources offline hagrp -offline
Switch a service group from system to another hagrp -switch
Enable all the resources in a group hagrp -enableresources
Disable all the resources in a group hagrp -disableresources
Freeze a service group (disable onlining and offlining)
hagrp -freeze
note: use the following to check "hagrp -display
Unfreeze a service group (enable onlining and offlining)
hagrp -unfreeze
note: use the following to check "hagrp -display
Enable a service group. Enabled groups can only be brought online
haconf -makerw
hagrp -enable
haconf -dump -makero
Note to check run the following command "hagrp -display | grep Enabled"
Disable a service group. Stop from bringing online
haconf -makerw
hagrp -disable
haconf -dump -makero
Note to check run the following command "hagrp -display | grep Enabled"
Flush a service group and enable corrective action. hagrp -flush
Resources
add a resource haconf -makerw
hares -add appDG DiskGroup groupw
hares -modify appDG Enabled 1
hares -modify appDG DiskGroup appdg
hares -modify appDG StartVolumes 0
haconf -dump -makero
delete a resource haconf -makerw
hares -delete
haconf -dump -makero
change a resource
haconf -makerw
hares -modify appDG Enabled 1
haconf -dump -makero
Note: list parameters "hares -display
change a resource attribute to be globally wide hares -global
change a resource attribute to be locally wide hares -local
list the parameters of a resource hares -display
list the resources hares -list
list the resource dependencies hares -dep
Resource Operations
Online a resource hares -online
Offline a resource hares -offline
display the state of a resource( offline, online, etc) hares -state
display the parameters of a resource hares -display
Offline a resource and propagate the command to its children hares -offprop
Cause a resource agent to immediately monitor the resource hares -probe
Clearing a resource (automatically initiates the onlining) hares -clear
Resource Types
Add a resource type hatype -add
Remove a resource type hatype -delete
List all resource types hatype -list
Display a resource type hatype -display
List a partitcular resource type hatype -resources
Change a particular resource types attributes hatype -value
Resource Agents
add a agent pkgadd -d .
remove a agent pkgrm
change a agent n/a
list all ha agents haagent -list
Display agents run-time information i.e has it started, is it running ? haagent -display
Display agents faults haagent -display |grep Faults
Resource Agent Operations
Start an agent haagent -start
Stop an agent haagent -stop
VxVm cheat sheet
Veritas Volume Manager
VM daemons
vxconfigd
Maintains system configuration in the kernel & disk (private region). If the daemon is stopped it does not disable any configuration state loaded into the kernel, it only affects the ability to make configuration changes until vxconfigd is restarted.
It can be in three states:
Enabl = Normal mode
Disable = Most operations cannot be be used
Booted = Normal startup while using boot disk group
vxrelocd Monitors for failure events and relocates failed subdisks
vxconfigbackupd Used to backup configuration chnages, the files created can be used with vxmake to restored lost groups.
vxnotify Display vertias volume manager events used with the vxconfigd daemon
Kernel Info
Kernel States
The kernel can be in three states:
Enabled - both private and public regions are accessible
Disabled - no private or public regions are accessible
Detached - only private regions are accessible
VM utilities
VxVM debug
vxconfigd -k -m enable -x
-x log log to /var/vxvm/vxconfigd.log
-x logfile = log to filename
-x syslog log to syslog
-x timestamp date and timestamp every entry
-x tracefile=name log all possible tracing to file
vxiod
The vxiod utility starts, stops, or reports on VERITAS Volume Manager (VxVM) I/O daemons. An I/O daemon provides a process context for performing I/O in VxVM.Manage extended disk i/o & handles dirty regions, logging
vxiod set = set number of runnning viod daemon
Note: when run on its own it displays # of vxiod daemons that are running.
vxdctl [option]
The vxdctl utility manages aspects of the state of the volume configuration daemon vxconfigd and also manages aspects of configuration for bootstrapping the rootdg disk group.
mode = what mode the vxconfigd is running in
enable = enable the vxconfigd daemon (reread the db)
disable = disable the vxconfigd daemon
stop = kill the vxconfigd daemon (Use 'vxconfigd -k -m disable' to start again)
license [init] = print out license info or reread licenses
support = display version and components
list = display entries in /etc/vx/volboot
init [dmp] = recreate /etc/vx/volboot
Note: when is disabled or stop mode no VX commands will be able to run
vxinstall
Install volume manger (use /etc/vx/disk to exclude any disks or controllers)
Disk Regions
Private
This is were veritas holds the meta data regarding the disk. A copy of the configuration database is copied to each private region within the disk group. Veritas will try and keep 5 copies of the configuration database.
Normally configured as slice 3
Public
This is the area that will store the users data.
Normally configured as slice 4.
Disk Layouts
Sliced Disk layout
private region and public region slices are on seprate partitions (3 & 4), tis type of disk is not suitable for moving between different O/S's but are suitable for boot partitions
Can be converted to CDS
CDS (Cross-platform Data Sharing) private and public regions are one slice (slice 7) , this type is suitable for moving between different O/S's but not suitable for boot parttions.
Simple
Private and public are the same partition but continuous (slice 3)
Can be converted to CDS
None None partitioning
VxVM Configuration Database
DB size vxdg list | grep permlen - the size of the configuration db
DB location vxdisk list | grep -i configs - db location
File Locations
vxinstall has not be run /etc/vx/reconfig.d/state.d/install-db
Host ID's /etc/vx/volboot
backup config files (vxconfigbackupd) /etc/vx/cbr/bk
delete or deported disk group config files /etc/vx/dgcfg/deport
All commands logs /var/adm/vx/veacmdlog
Licenses /etc/vx/licenses/lic
Imported disk groups info
/var/vxvm/tempdb
Note: to clear the tempdb file:
vxconfigd -k -x cleartempdir - clear the /var/vxvm/tempdb
vxconfigd log file /var/vxvm/vxconfigd.log
Backup & Restore
Backup
/usr/lib/vxvm/bin/vxconfigbackup -l /var/vxvm/backups
-l = location where to store backup
Restore (precommit/commit)
vxconfigrestore -p
# either one of the below after the precommit
vxconfigrestore -d
vxconfigrestore -c
Note:
-p = when you want to check that the restore is correct (use vxprint to check)
-d = abort the precommit
-c = commit the precommit
Disks
Initialize disk
vxdisksetup -i c2t0d0 privlen=768
vxdisksetup -i format=sliced - initialized a disk as a sliced disk
Note: format can be either sliced, simple, cdsdisk or none (see above - Disk Regions)
Uninitialize disk vxdiskunsetup -C c2t0d0
Disk Information vxdisk -g list
vxdisk -s list
Resize a LUN vxdisk -g resize length=8G
Add a disk slice to volboot vxdctl add disk type=simple
Add a disk slice vxdisk –f type=simple
Add a disk vxdiskadd c1t0d0 or c1 (all disk on controller)
vxdisksetup -i
Remove a disk totally from VM vxdisk rm
Remove a disk from a volume vxdg -g rmdisk
Remove a disk slice from VM vxdctl rm disk
Clear any host ID flags vxdisk clearimport
Renaming a disk vxedit -g rename
Move disk to different disk group vxdg move
VM daemons
vxconfigd
Maintains system configuration in the kernel & disk (private region). If the daemon is stopped it does not disable any configuration state loaded into the kernel, it only affects the ability to make configuration changes until vxconfigd is restarted.
It can be in three states:
Enabl = Normal mode
Disable = Most operations cannot be be used
Booted = Normal startup while using boot disk group
vxrelocd Monitors for failure events and relocates failed subdisks
vxconfigbackupd Used to backup configuration chnages, the files created can be used with vxmake to restored lost groups.
vxnotify Display vertias volume manager events used with the vxconfigd daemon
Kernel Info
Kernel States
The kernel can be in three states:
Enabled - both private and public regions are accessible
Disabled - no private or public regions are accessible
Detached - only private regions are accessible
VM utilities
VxVM debug
vxconfigd -k -m enable -x
-x log log to /var/vxvm/vxconfigd.log
-x logfile =
-x syslog log to syslog
-x timestamp date and timestamp every entry
-x tracefile=name log all possible tracing to file
vxiod
The vxiod utility starts, stops, or reports on VERITAS Volume Manager (VxVM) I/O daemons. An I/O daemon provides a process context for performing I/O in VxVM.Manage extended disk i/o & handles dirty regions, logging
vxiod set
Note: when run on its own it displays # of vxiod daemons that are running.
vxdctl [option]
The vxdctl utility manages aspects of the state of the volume configuration daemon vxconfigd and also manages aspects of configuration for bootstrapping the rootdg disk group.
mode = what mode the vxconfigd is running in
enable = enable the vxconfigd daemon (reread the db)
disable = disable the vxconfigd daemon
stop = kill the vxconfigd daemon (Use 'vxconfigd -k -m disable' to start again)
license [init] = print out license info or reread licenses
support = display version and components
list = display entries in /etc/vx/volboot
init [dmp] = recreate /etc/vx/volboot
Note: when is disabled or stop mode no VX commands will be able to run
vxinstall
Install volume manger (use /etc/vx/disk to exclude any disks or controllers)
Disk Regions
Private
This is were veritas holds the meta data regarding the disk. A copy of the configuration database is copied to each private region within the disk group. Veritas will try and keep 5 copies of the configuration database.
Normally configured as slice 3
Public
This is the area that will store the users data.
Normally configured as slice 4.
Disk Layouts
Sliced Disk layout
private region and public region slices are on seprate partitions (3 & 4), tis type of disk is not suitable for moving between different O/S's but are suitable for boot partitions
Can be converted to CDS
CDS (Cross-platform Data Sharing) private and public regions are one slice (slice 7) , this type is suitable for moving between different O/S's but not suitable for boot parttions.
Simple
Private and public are the same partition but continuous (slice 3)
Can be converted to CDS
None None partitioning
VxVM Configuration Database
DB size vxdg list
DB location vxdisk list
File Locations
vxinstall has not be run /etc/vx/reconfig.d/state.d/install-db
Host ID's /etc/vx/volboot
backup config files (vxconfigbackupd) /etc/vx/cbr/bk
delete or deported disk group config files /etc/vx/dgcfg/deport
All commands logs /var/adm/vx/veacmdlog
Licenses /etc/vx/licenses/lic
Imported disk groups info
/var/vxvm/tempdb
Note: to clear the tempdb file:
vxconfigd -k -x cleartempdir - clear the /var/vxvm/tempdb
vxconfigd log file /var/vxvm/vxconfigd.log
Backup & Restore
Backup
/usr/lib/vxvm/bin/vxconfigbackup -l /var/vxvm/backups
-l = location where to store backup
Restore (precommit/commit)
vxconfigrestore -p
# either one of the below after the precommit
vxconfigrestore -d
vxconfigrestore -c
Note:
-p = when you want to check that the restore is correct (use vxprint to check)
-d = abort the precommit
-c = commit the precommit
Disks
Initialize disk
vxdisksetup -i c2t0d0 privlen=768
vxdisksetup -i
Note: format can be either sliced, simple, cdsdisk or none (see above - Disk Regions)
Uninitialize disk vxdiskunsetup -C c2t0d0
Disk Information vxdisk -g
vxdisk -s list
Resize a LUN vxdisk -g
Add a disk slice to volboot vxdctl add disk
Add a disk slice vxdisk –f
Add a disk vxdiskadd c1t0d0 or c1 (all disk on controller)
vxdisksetup -i
Remove a disk totally from VM vxdisk rm
Remove a disk from a volume vxdg -g
Remove a disk slice from VM vxdctl rm disk
Clear any host ID flags vxdisk clearimport
Renaming a disk vxedit -g
Move disk to different disk group vxdg move
check if ftp is running and if ftp ports are open
note - ftp runs on port 20 and 21
check the /etc/inetd.conf and see if the ftp entry is hashed out
if it is, then the ftp service is not running
(you can also ps -ef | grep ftp)
also run a
netstat -a | grep ftp
if it comes back blank, then you know ftp is not running
check the /etc/inetd.conf and see if the ftp entry is hashed out
if it is, then the ftp service is not running
(you can also ps -ef | grep ftp)
also run a
netstat -a | grep ftp
if it comes back blank, then you know ftp is not running
A whole bag of Cisco, VMWare, Windows, VI, Ftp, EMC, Brocade and VxVm commands
:: MDS-SERIES (CISCO) COMMANDS ::
MDS-SERIES Switch Commands
ip address 191.168.123.234 255.255.255.0
View = ~ show running-config
show environment ~ shows status of all installed hardware components
show flogi database ~ shows database list of all FLOGI events
show fcns database ~ shows database list of all N-ports logged in
show vsan membership ~ shows list of VSAN members
show interface brief ~ lists the interfaces and status
MDS-SERIES Zoning Commands
config terminal ~Enters configuration terminal
zone name TestZone1 vsan 4 ~ creates a zone
member pwwn 10:01:10:01:10:ab:cd:ef ~ adds node to the zone above
no member pwwn
zoneset name Zoneset1 vsan 4 ~ creates a zoneset
member
no zone name
zoneset activate name Zoneset1 vsan 4
zone copy active-zoneset full-Zoneset1 vsan 4
copy running-config start-up config ~ copy from source to startup configuration
vsan database ~ go into vsan configuration mode
vsan 4 interface fc3/21 ~move port 21 on module 3 to vsan 4
show zoneset ~ shows all zonesets that are active
show zone vsan <#> ~ shows all zones active in vsan
show zoneset active ~ displays the active zoneset
show vsan ~ shows the vsans on the switch
show zoneset active vsan
:: B-SERIES (BROCADE) COMMANDS ::
B-SERIES Switch Commands
switchDisable ~ offline
ipAddrSet ~set the IP address of a Brocade switch
switchShow ~ display switch info
supportShow ~ full detailed switch info
portShow # ~ display port info
nsShow ~ Name server contents
nsAllShow ~ NS for full fabric
fabricShow ~ fabric information
ad --create ~create a new Admin Domain.
ad –apply ~enforce the new Admin Domain configuration.
B-SERIES Zoning Commands
aliCreate “Alias”, “20:00:00:e0:69:40:07:08”
zoneCreate “Zone1”, “20:00:00:e0:69:40:07:08; 50:06:04:82:b8:90:c1:8d”
cfgCreate “Test_cfg”, “Zone1; Zone2”
cfgSave ~ saves zoning information across reboots
cfgEnable “Test_cfg”
zoneShow or cfgShow ~ shows defined and effective zones and configurations
zoneAdd ~ adds a member to a zone
zoneRemove ~ removes a member from a zone
zoneDelete ~ deletes a zone
cfgAdd ~ adds a zone to a zone configuration
cfgRemove ~ removes a zone from a zone configuration
cfgDelete ~ deletes a zone from a zone configuration
cfgClear ~ clears all zoning information/ must disable the effective configuration
:: M-SERIES (McDATA) COMMANDS ::
M-SERIES Switch Commands
View= ~ config ip show
Config> ip ~ (new IP and Subnet mask)
Show> switch
Show> switch
Show > system
Show> nameserver
Show> loginServer
Show> nameServer
Show.Fabric> nodes
Maint > system > setOnlineState
M-SERIES Zoning Commands
Config.Zoning> addWwnMem:
Config.Zoning> addZone ~ add a new zone to the working area
Config.Zoning> activateZoneset ~ activation of changes
Config.Zoning> showactive ~ shows actively connected running zoneset
Config.Zoning> clearZone ~ clear WWNs in a zone
Config.Zoning> deletezone ~ remove zone from the running config
Config.Zoning> showPending ~ show pending zones
Config.Zoning> renameZone:
Config.Zoning> deleteWwnMem ~
Config.Zoning> renameZoneSet ~
::Veritas VM HOST COMMANDS ::
http://www.symantec.com/business/support/documentation.jsp?language=english&view=manuals&pid=15273
Veritas VM Device Commands
vxdisk list ~ List all disks under volume manager control and give there status.
vxdiskadd c1t2d3 ~ add or bring a disk under volume manager control
vxdiskadmin ~ Interactive front end to the vxdisk program
Veritas VM Filesystem commands
vxdisk init ~ Initialize Physical Volume
vxdg init mydg mydg-01=c1t11d0 ~ Create Disk Group
vxassist -g mydg make myvol
mkfs -F vxfs /dev/vx/rdsk/mydg/myvol ~ create file system
vxvol -g mydg stopall ~ stop a volume
vxdg deport mydg ~ deport disk group
vxdg import mydg ~ import disk group
vxvol -g mydg startall ~ starting a imported volume
::VMware ESX HOST COMMANDS ::
http://www.b2v.co.uk/b2vguide2vmware.htm
http://b2v.co.uk/b2vguide2vmware3.htm
VMware ESX Device Commands
esxcfg-rescan
esxcfg-swiscsi –e ~enable iSCSI initiator
more /proc/scsi/lpfc/X ~ wwn of HBA
esxcfg-vswitch ~
VMware ESX Filesystem Commands
vmkfstools ~
:: Windows HOST COMMANDS ::
http://support.microsoft.com/default.aspx/ph/3198?sid=26
Windows 2003 server SP1 Device Commands
SystemInfo ~ Displays detailed configuration information about a computer and its operating system
Shutdown /r /f ~ forced reboot
Netstat ~ Displays active TCP connections, ports on which the computer is listening
mstsc /v: 255.255.255.255 /console ~ launches a Remote desktop Connection
net use \\ComputerName\ShareName\volume ~ Connects a computer to a computer shared resource
FC ~ compares two files and displays the differences
ChkDsk ~ check and repair disk problems
Recover ~ Recover a damaged file from a defective disk.
fcinfo /details ~ if fcinfo is installed ,this will list the HBA’s wwns
Windows 2003 server SP1 LVM Commands
Diskpart rescan ~ Locates new disks that may have been added to the computer
Diskpart list disk ~ Displays a list of disks and information about them,
Diskpart select disk ~ Selects the specified disk and shifts the focus to it.
Diskpart detail disk ~ Displays the properties of the selected disk and the volumes on that disk.
MountVol ~ Creates, deletes, or lists a volume mount point.
Diskpart assign ~ Assigns a drive letter or mount point to the volume with focus.
Diskpart extend ~ Extends the volume with focus into next contiguous unallocated space
Diskpart import ~ Imports a foreign disk group into the local computer's disk group
Format /FS:filesystem ~ Specifies the type of the file system (FAT, FAT32, or NTFS).
FSutil volume dismount
:: VI COMMANDS ::
Cursor movements
h ~ left one character
l ~ right one character
j ~ down one line
k ~ up one line
w ~ right one word
b ~ back one word
Deleting, Yanking, and Pasting
d ~ delete
x ~ delete character cursor is on
r ~ replace one character
y ~ yank (copy into temporary buffer)
Y ~ yank line cursor is on
p ~ paste below cursor line (deleted or copied text)
Saving and Exiting
u ~ undo last editing command
ZZ ~ save and exit (hold down shift and press "z" twice)
:wq! ~ write and quit even if it is read-only
:: FTP COMMANDS ::
open
close
bin ~set to transfer for binary and text files
hash ~display progress during get
mget ~mutiple get – download files in to current directory
mput ~multiple pu – upload files from current directory
:: AIX/IBM HOST COMMANDS ::
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic
AIX Software Installation
/usr/lpp ~ Software Directory
lslpp -L all ~ List installed software
lslpp -f fileset ~ List all files
instfix –i ~ List installed patches
cp *.lpp /usr/sys/inst.images ~ copy lpp software to the install directory
smit installp ~ Install a software package
rmdev ~ Remove a device
AIX Device Commands
lscfg ~ lists all comfigured components
smit or smitty ~ system management utility
lscfg –v l
emc_cfgmgr ~ configures symmetrix devices
mkbcv ~ makes BCV visable to AIX to avoid locking during boot
(1) chdev -l fcsX -a init_link=pt2pt –P ~ “To change INIT Link flags parameter”
(2) chdev -l fscsiX -a fc_err_recov=fast_fail –P ~ “Fabric Event Error RECOVERY Policy”
(3) cfgmgr –v ~ cofigures devices and optionally installs device software
AIX NFS Commands
exportfs ~Lists all exported filesystems
exportfs -a ~Exports all fs's in /etc/exports file
exportfs -u (filesystem) ~Un-exports a filesystem
mknfs ~Configures and starts NFS services
rmnfs ~Stops and un-configures NFS services
mknfsexp -d /directory ~Creates an NFS export directory
mknfsmnt ~Creates an NFS mount directory
mount hostname:/filesystem /mount-point ~Mount an NFS filesystem
nfso -a ~Display NFS Options
AIX iSCSI Commands
smit iscsi
AIX Filesystem Commands
lsdev –Cc disk ~ Device Listing and status
mkdev ~ configures a disk device masking sue it is available as a physical volume
chdev -l hdisk# -a pv=yes ~ Initialize Physical Volume
lspv -l hdisk# ~ Disk Label
mkvg -y myvg -s 16 hdisk2 ~ groups one or more physical devices into a volume group
mirrorvg ~Creates mirror volumes for all volumes in a volume group.
extendvg myvg hdisk3 hdisk4 ~ Extend Volume Goup
lsvg –l vgname ~ displays volumes, with a specified volume group
mklv -y mylv myvg 16 ~ Make logical volume
mklvcopy hd1 2 hdisk1 ~(2) makes a copy of lv should be followed up by syncvg command
lslv ~ List Logical Volume
crfs –v jfs –d mylv –m /myfs
mount ~ mounts a filesystem
varyoffvg myvg ~ Deactivate Volume Group
exportvg myvg ~ Export Volume Group
importvg -y myvg -f /dev/hdisk9 ~ Import Volume Group
varyonvg myvg ~ Activate Volume Group
:: HP/UX HOST COMMANDS ::
http://www.docs.hp.com/en/B2355-90681/index.html
HP/UX Software Installation
sysdef ~ analyzes current running system
swlist –l bundle ~ displays version and type of HP-UX
swlist -l patch ~ List installed patches
swreg –l depot /full/path/to/your/depot_file ~ Register a depot package for install
swinstall ~ Install the Software depot
HP/UX Device Commands
insf –e ~ install special device files
ioscan -fnC disk ~ scans system hardware
sam ~ System administration tool
dd if=/dev/rdsk/c34t15d0 of=/dev/zero count=1 ~ makes HP register with a Clariion thru LUNZ device
navicli –h
lsdev –C disk ~ list device drivers in the system
mknod ~ makes a directory, special, or ordinary file
/stand/system ~ system configuration file
HP SAN Commands
fcmsutil /dev/fcd0 ~ List HBA wwn
tdutil /dev/td0 ~ List HBA wwn
HP iSCSI Commands
http://docs.hp.com/en/T1452-90011/T1452-90011.pdf
HP NFS Commands
/etc/exports ~file controls which file systems are exported to remote hosts and specify options
/exported/directory example.emc.com ~Exports directory to host example.emc.com (found in /etc/exports)
exportfs –a ~command to read /etc/export and export filesystem
mount shadowman.emc.com:/misc/export /misc/local ~mount an NFS export from shadowman.emc.com to the dir /misc/local
HP/UX Filesystem commands
pvcreate /dev/rdsk/c1t0d2 ~ creates a physical volume within a LVM volume group
pvdisplay ~ display info about physical volumes within an LVM volume group
ls -l /dev/*/group ~list the minor number of each vg in 6th field (all not listed are available)
mkdir /dev/myvg ~Create directory entry in /dev for Volume Group
mknod /dev/myvg/group c 64 0x010000 ~ Create a file for Volume Group
vgcreate -s 16 /dev/myvg /dev/dsk/c1t0d0 ~ creates a LVM volume group
vgextend /dev/myvg /dev/dsk/c1t0d1 ~ add disk to VG
vgchange -a y myvg ~ Avtivate VG
vgscan ~ scan physical volumes for LVM volume groups
vgdisplay ~ displays info about LVM volume groups
lvcreate -l 16 -n mylv /dev/myvg ~ creates LVM logical volumes
lvcreate -m mylv /dev/myvg ~ creates mirrored logical volumes
lvdisplay ~ displays LVM logical volumes
newfs /dev/myvg/rmylv ~ Create file system
mount /dev/myvg/mylv /myfs ~ Mount file system
vgchange -a n myvg ~ Deactivate Volume Group
vgexport myvg ~ Export Volume Group
vgimport /dev/myvg /dev/dsk/c1t0d0 ~ Import Volume Group
:: PROCEDURES ::
zone hp server to symm
symmask list hba –v ~to list your servers paths to the symm
symmask –wwn –dir –p add dev ~(use wwn, dir, p values from above command) run command for each hba to FA zone
symmask –wwn –dir –p set heterogeneous on HP_UX ~use wwn from the (symmask list hba –v )
symmask refresh
ioscan –fnC disk
insf –e
symcfg dis
sympd list
To get HPUX to register with Clariion if using NaviAgent
Install NaviAgent
Edit agent.config file
ioscan –fnC disk
insf –e
/sbin/init.d/agent stop
rm /etc/log/HostIdFile.txt
/sbin/init.d/agent start
dd if=/dev/rdsk/c34t15d0 of=/dev/zero count=1 ~ makes HP register with a Clariion thru LUNZ device
navicli –h
# rmsf path ( The paths are showing NO_HW or not sensing).
# ioscan -fnc disk (check)
# insf -e
# symcfg discover
# powermt display ( check for any dead path)
# powermt check (checks and corrects dead path).
# powermt config
# powermt save
:: Linux HOST COMMANDS ::
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/
Linux Software Installation
rpm –hiv
Linux Device Commands
modprobe -l *lpfc* `List Emulex modules
modprobe –r ~ discover new disk
/sys/class/scsi_host/host1/issue_lip ~ discover new disk
/sys/class/scsi_host/host1/scan ~ discover new disk
/usr/sbin/lpfc lun_scan all
Linux FC SAN Commands
more /proc/scsi/lpfc/X ~ wwn on RHEL3
more /sys/class/scsi_host/hostX/port_name ~ wwn on RHEL4
more /sys/class/fc_host/hostX/port_name ~ wwn on RHEL5
(X is the instance number of the HBA)
Linux iSCSI Commands
yum install iscsi-initiator-utils ~install iSCSI soft initiator
rpm -q srvadmin-deng iscsi-initiator-utils ~install iSCSI soft initiator
rpm -ql iscsi-initiator-utils ~confiure iSCSI soft initiator
iscsiadm -m discovery -t -p 192.168.1.100 ~discover iSCSI target
iscsiadm --mode node --targetname iqn ~
Linux NFS Commands
/etc/exports ~file controls which file systems are exported to remote hosts and specify options
/exported/directory example.emc.com ~Exports directory to host example.emc.com (found in /etc/exports)
exportfs –a ~command to read /etc/export and export filesystem
mount shadowman.example.com:/misc/export /misc/local ~mount an NFS export
redhat-config-nfs ~RedHat NFS tool
Linux Filesystem commands
http://linux.about.com/od/commands/l/blcmdl_8m.htm
pvcreate /dev/emcpowerX ~ initializes PhysicalVolume for later use by the Logical Volume Manager
vgcreate VG_Name /dev/emcpowerX ~ creates a new volume group
lvcreate --size 2000m --name LV_Name /dev/VG_Name ~creates 2000MB logical volume mkfs -t ext2 /dev/VG_Name/LV_Name ~ Make a file system on a logical volume
mount -t ext2 /dev/VG_Name/LV_Name /mnt/FS_MountPoint ~ mount File system
df –a ~display filesystems
Fdisk /dev/sda ~ partition table manipulation
pvdisplay ~ allows you to see the attributes of one or more physical volumes
pvscan ~ scans all supported LVM block devices in the system for physical volumes
vgdisplay ~display attributes of volume groups
vgextend ~ allows you to add one or more initialized physical volumes
vgscan ~ scan physical volumes for LVM volume groups
vgexport ~make volume groups unknown to the system
vgimport ~make volume groups known to the system
lvdisplay ~display attributes of a logical volume
lvextend ~ Extend logigal volume
e2fsadm ~ resizing of a logical volume
fsck ~Command used to check and repair a Linux filesystem
:: SUN/SOLARIS HOST COMMANDS ::
http://developers.sun.com/openstorage/articles/opensolaris_storage_server.html
SOLARIS Software Installation
ptree –a ~ Shows all running processes in a tree format
showrev –p ~ Displays currently installed Solaris patches
prtconf ~ prints system configurations
pkginfo ~ lists installed software packages
pkgadd ~ install software packages
pkgrm ~ removes installed software packages
Solaris Device Commands
cfgadm –a ~ list all
cfgadm –c configure c4 ~ configure StorEdge Leadville driver.(Search for new devices)
devfsadm –vC ~ searches for devices and also cleans up old
update_drv -f sd -d –I ~ searches for devices
devinfo ~ print device specific information about disk devices
drvconfig ~ generates special device files
reboot -- -r ~ reboots system to discover configuration changes, and rebuild special files
/etc/system ~ system files
/kernel/drv/sd.conf ~ lists of available target ids and luns
/kernel/drc/lpfc.conf ~ used for persistent binding on Emulex (qla22xx.conf for Qlogic)
/var/adm/messages ~ system messages
Solaris iSCSI Commands
iscsiadm add static-config iqn.1999-08.com.array:sn.01234567,192.168.1.3:3260 ~map target
iscsiadm add discovery-address 192.168.1.13:3260
iscsiadm modify discovery --isns enable
iscsiadm list target –vS Target: iqn.1986-03.com
devfsadm -Cv -i iscsi
Solaris FC SAN Commands
fcinfo hba-port ~ Lists information and WWNs
fcinfo remote-port -p 10000000c937694f –ls ~ Lists the remote-port information
Solaris NFS Commands
share -F nfs -d "Cartman dir" / share2
mount -F nfs cartman:/share2 /cartman
share -F nfs -o ro=sun.ucs.indiana.edu,rw=teak.uwsg.indiana.edu /reports ~ export (share) /reports à read only to sun.ucs.indiana.edu, read,write to teak.uwsg.indiana.edu
/etc/dfs/dfstab ~ file to edit to make a share permanent
shareall –F nfs ~ command to excute that will read /etc/dfs/dfstab and share to the network
SOLARIS Filesystem Commands
*** Format and lable all devices before using zpool ***
zpool create spoon c3t6d9 ~create & mounts storage pool named spoon and mounts it at /spoon (no slice #)
zpool create spoon mirror emcpower3c emcpower4c ~create a RAID1 storage pool mounted at /spoon
zpool destroy –f spoon ~destroy a zpool
zfs create spoon/fs ~creates ZFS file system spoon/fs, automatically mounted at /spoon/fs.
zpool list ~list pools
format ~ Disk partitioning and maintenance program
sysdef ~ Device Listing
prtvtoc ~ Disk Label
metadevadm ~ Checks device ID configuration.
metainit ~ Configures volumes.
metastat ~ Displays the status of volumes or hot spare pools.
metaset ~ Administers disk sets.
newfs –v ~ makes a UFS filesystem on disk drive or partition within a diskdrive
:: SOLUTIONS ENABLER COMMANDS ::
Commands to see devices
syminq ~ list all devides seen by host OS
syminq -cids ~ list Clariion devices
syminq hba –fibre ~ list HBA
syminq –pdevfile ~List the location of devices
sympd list ~ lists the Symmetrix devices that the host OS can see
sympd list –vcm ~ lists all the physical device name in the device masking database
symdev list pd ~ lists the Symmetrix devices that the host OS can see
symdisk
Symdev Commands
symdev list ~ list all devices on symm
symdev –sa –p list ~ list devices maped to that one FA
symdev list –bcv or –rdf1 ~ list all bcv or rdf1 volumes
symdev list –noport ~ list devices not mapped to any FE ports
symdev list –clariion
symdev show 0123 -v ~ vebose listing of one device
symdev list -RANGE 0001:0123 –v ~ vebose listing of a rage of devices
symdev list pd ~ list devices this host can see
Symcfg Commands
symcfg discover ~ discover the storage environment
symcfg list ~ list local and remote symmetrixes
symcfg list –clariion ~ list clariions
symcfg list –v ~ lists whether the Symmetrix director has device masking turned on
symcfg list –FA all list ~ lists all fibre directors in a Symmetrix system
symcfg list -dir all -address -sid 6196 ~ identify the address information for devices
symcfg list -dir all -address -available ~ sid 6196 ~ returns the next available LUN address
symcfg list -lockn all ~ list of visible Symm exclusive locks
symcfg -sid 098712341357 -lockn 15 release ~ release a lock on a Symmetrix array.
Symconfigure Commands
symconfigure –sid
symconfigure –sid
symconfigure –sid
Symmaskdb Commands
symmaskdb list devs ~ lists all devices accessible to an HBA on a specified Symmetrix system
symmaskdb remove ~ removes the meta member devices
symmaskdb restore ~ restores a database from a specified file
symmaskdb backup ~ backs up a database to a specified file
symmaskdb init ~ deletes and creates a new VCMDB
symmaskdb list assignment ~lists deives already assigned
symmaskdb list no_assignment ~lists deives not yet assigned
Symmask Commands
symmask add devs ~ adds a device to the list of devices that a WWN can access in the database
symmask remove devs ~ removes a device from the list of devices that a WWN can access in the database
symmask delete ~ deletes all access rights for a WWN in the database
symmask replace ~ allows one HBA to replace another
symmask refresh ~ refresh vcmdb to all FA ports
symmask login ~ lists for each Fibre director which hosts and HBA’s are logged in to a Symmetrix system
symmask list HBA’s ~ lists the WWN of the Fibre HBAs on this host
symmask -sid 381 -wwn 50060B000024F9F6 -dir 16C -p 1 set heterogeneous on HP_UX
symmask -sid SymmID set lunoffset on offset base \ -awwn awwn -dir # -p # ~ offset high lun numbers
Other SYMCLI Commands
symsan ~list ports and LUN WWNs seen from a specific Symmetrix director and port
symdg ~ creates/deletes/renames device groups
symld ~ addes & removes devices to a deivce group
symbcv ~ associates/disassociate BCV with device groups
symmir ~ performs (split/establish/restore) BCV mirror commands against device groups
symclone ~ performs (split/establish/restore/activate/terminate/recreate)
symsnap ~ performs (restore/activate/terminate/recreate)
symrdf ~ performs (split/establish/restore/failover/update/failback/suspend/resume) against RDF device groups
symcg ~ Performs operations on a Symmetrix RDF composite group
symrslv ~ Displays logical-to-physical mapping information about a logical object that is stored on a disk.
symstat ~ Displays statistics information about a Symmetrix, any or all directors, a device group, a disk, or a device.
symioctl ~ sends I/O control commands to application
:: NAVICLI COMMANDS ::
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
navicli –h
:: POWERPATH COMMANDS ::
powermt ~ manage powerpath environment
powercf ~ configure powerpath devices
emcpreg ~ manage powerpath license registration
emcpupgrade ~ convert powerpath configuration files
:: INQ ::
INQ
Inq –h ~ list options and syntax
Inq –hba ~ list hba wwn
Inq –btl ~ display Bus Target and Lun
Inq –show_vol ~ display Symmetrix Volume Number.
Inq –winvol ~ show Windows filesystems
Inq –dev ## –page0 ~ Raw unformatted data on a single device
Inq -clariion ~ display CLARiiON device information
Printers & Linux
Setting up network printers in linux
Make sure the printer name resolves (use nslookup and also do a ping test) – if that is the case you can assume that the initial printer config has been set up and the printer is on the network (ie the initial jetadmin setup etc)
Confirm that there is /etc/printcap present
su to root
then run the following;
redhat-config-printer
or
system-config-printer
you get a TUI (text user interface)
set up your printer
you can then send a test print and then you can run an
lpq
to confirm that the queue is active
also do a ps –ef | grep cupsd
also see
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-printing.html
http://www.linuxfoundation.org/images/8/8b/System-config-printer.pdf
Make sure the printer name resolves (use nslookup and also do a ping test) – if that is the case you can assume that the initial printer config has been set up and the printer is on the network (ie the initial jetadmin setup etc)
Confirm that there is /etc/printcap present
su to root
then run the following;
redhat-config-printer
or
system-config-printer
you get a TUI (text user interface)
set up your printer
you can then send a test print and then you can run an
lpq
to confirm that the queue is active
also do a ps –ef | grep cupsd
also see
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-printing.html
http://www.linuxfoundation.org/images/8/8b/System-config-printer.pdf
Subscribe to:
Posts (Atom)