Sonntag, 25. Januar 2015

Oracle

Oracle Database

Oracle DBA tips

http://www.clusterbuilder.com/vmware/
SQL

To list all the tables

 SELECT table_name
 FROM all_tables;

 SELECT SYSDATE FROM DUAL;

Default passwords:
SCOTT/TIGER, ADAMS/WOOD, JONES/STEEL, CLARK/CLOTH and BLAKE/PAPER.

10G onwards, by default the above users are disabled. The "emp" table is in scott's shema. To enable user scot;

  01. sqlplus
   SQL> connect sys/oracle as sysdba;
   Connected.
   SQL> alter user scott account unlock;
   User altered.

Now exit the SQL* plus command prompt and launch it once again with scott/tiger.
It will say password expired and you may have to provide new password.
SQL Plus
SQL Plus

To save settings of a SQLplus session (like "set linesize") as default

Check out ORACLE_HOME/sqlplus/admin. There's a file in there called "glogin.sql". Make changes to that, such as pagesize
and linesize, and every time you then log onto SQL*Plus, those settings will take effect.

You can over-ride the glogin.sql settings by creating a login.sql, too. If it's in the directory where you launch SQL*Plus from, then login.sql takes precedence over glogin.sql.

To edit the buffer file afiedt.buf

 SQL> edit

To rerun the last command you entered which is the in the buffer file afiedt.buf

 SQL> / <return>

To run an SQL query that is in a file named myquery.sql

 SQL> start myquery
        (or)
 SQL> @ myquery.sql

To install a procedure named proc1 in the database from a file named mydbproc.sql (Make sure the first line of the file begins create or replace procedure proc1. Make sure the last line of the script contains a forward slash / on a line by itself with no spaces)

 SQL> start mydbproc

To see compilation errors, at the SQL> prompt type show errors
If there were no errors, proc1 is now installed in the database and available to be run
To run proc1 which you just installed, at the SQL> prompt type exec proc1;

The SET command

You can control various features of SQLPLUS using the SET command at the SQL> prompt. These commands do not need a semicolon but SQLPLUS is kind enough to let you use one.

To repeat the column headers every 100 lines rather than every 14

 SQL> set pagesize 100

To make the screen 100 characters wide rather than 80

 SQL> set linesize 100

To show one screen (pagesize lines) at a time (shows you one screen (pagesize lines) at a time)

 SQL> set pause on

To show the sql commands on the screen when they are executed from a file using the start command

 SQL> set echo

To display XXX instead of blanks for a null field

 SQL> set null XXX

To make DBMS_OUTPUT commands actually work

 SQL> set serveroutput on

Other SQLPLUS Commands

To send a copy of the terminal activity to myfile.lst

 SQL> spool myfile.1st

To write the contents of file myfile.sql to SQL buffer

 SQL> Get myfile.sql

To display the basic information about mytable's fields

 SQL> describe mytable 

To go out temporarily to Unix shell from sqlplus (To get back to SQLPLUS, type exit)

 SQL> !* (exclamation point)

To Shell out to the operating system, run the ls command and return to SQLPLUS

 SQL> !ls 

DBA

export ORACLE_HOME=/products/oracle/ora9i
export ORACLE_SID=testdb

sqlplus '/ as sysdba'

Tables

To get the list of accessible tables

 SELECT table_name FROM all_tables;
           OR

A user grants access to his table to another user and then that other user creates a synonym in his schema. Then simply type

 SELECT SYNONYM_NAME FROM USER_SYNONYMS;

To get the list of tables that you possess

 SELECT TABLE_NAME FROM USER_TABLES ;

To get the list of views that you possess

 SELECT VIEW_NAME FROM USER_VIEWS ;

Users

To list the users

  SQL> select username, user_id from dba_users;

To list the users who own objects

 SQL> select distinct(owner) from dba_objects;

To list the counts of object types by owner

 Sql>  select  owner, object_type, count(*)
       from    dba_objects
       group by owner, object_type

http://www.cuddletech.com/articles/oracle/

9i Install

Pre-Requisites

 rpm -Uvh xorg-x11-deprecated-libs*.rpm
 rpm -Uvh xorg-x11-libs-*.rpm
 rpm -Uvh xorg-x11-xfs-*.rpm
 rpm -Uvh alsa-lib-devel-*.rpm
 rpm -Uvh fontconfig-devel*.rpm
 rpm -Uvh freetype-devel*.rpm
 rpm -Uvh libjpeg-devel*.rpm
 rpm -Uvh libtiff-devel*.rpm
 rpm -Uvh libungif-devel*.rpm
 rpm -Uvh xorg-x11-6*.rpm
 rpm -Uvh xorg-x11-deprecated-libs-devel*.rpm
 rpm -Uvh xorg-x11-devel-*.rpm
 rpm -Uvh audiofile-devel*.rpm
 rpm -Uvh esound-devel*.rpm
 rpm -Uvh libaio-0*.rpm
 rpm -Uvh libaio-devel*.rpm
 rpm -Uvh openmotif21-*.rpm
 rpm -Uvh glib-devel*
 rpm -Uvh ORBit-devel-*
 rpm -Uvh gtk+-devel-*
 rpm -Uvh imlib-devel-1*
 rpm -Uvh gnome-libs-devel-*

Search for patch 4198954 and download it from http://metalink.oracle.com
p4198954_21_LINUX.zip

 yum -u install compat-gcc-32 compat-gcc-32-c++ compat-libstdc++-33  compat-libstdc++-296 compat-libgcc-296
 rpm -Uvh compat-libcwait-2.0-2.i386.rpm
 rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm

Create Oracle User, groups and directory

 # groupadd -g 1001 oinstall
 # groupadd -g 1002 dba
 # useradd -g oinstall -G dba -u 1001 oracle


 # mkdir -p /u01/apps/oracle/product/920
 # chown -R oracle:oinstall /u01/apps/oracle

Add the following lines to $HOME/.bash_profile or $HOME/.bashrc

 ORACLE_BASE=/u01/apps/oracle
 ORACLE_HOME=$ORACLE_BASE/product/920
 ORACLE_SID=TESTDB
 LD_ASSUME_KERNEL=2.4.19
 export ORACLE_SID ORACLE_BASE ORACLE_HOME LD_ASSUME_KERNEL

 PATH=$ORACLE_HOME/bin:$PATH:.
 LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
 EDITOR=/bin/vi
 export PATH LD_LIBRARY_PATH EDITOR

Setting Kernel parameters

Add the following lines to /etc/sysctl.conf

 kernel.shmall = 2097152
 kernel.shmmax = 2147483648
 kernel.shmmni = 4096
 kernel.sem = 250 32000 100 128
 fs.file-max = 65536
 net.ipv4.ip_local_port_range = 1024 65000

To take effect the new kernel parametes immediately

 # /sbin/sysctl -p

9i Installation problem:

After installing, In the configuration tools, it gave the following error

jre was not found in /u01/apps/oracle/product/920/oracle.swd.jre/bin/i386/native_threads/jre.

solution:

    Go to /u01/apps/oracle/product/920/oracle.swd.jre/bin/i386/native_threads directory
    run "ln -s java jre"

http://www.dizwell.com/oracle/albums/linora9/album/prelim1.html
http://www.puschitz.com/InstallingOracle9i.shtml
http://download-uk.oracle.com/docs/html/B13670_06/toc.htm#BABIJIFJ

Veritas

Veritas Volume Manager

VERITAS Volume Manager software is an advanced, system-level disk and storage array solution that alleviates downtime during system maintenance by enabling easy, online disk administration and configuration. The product also helps ensure data integrity and high availability by offering fast failure recovery and fault tolerant features. VERITAS Volume Manager software provides easy-to-use, online storage management for enterprise computing and emerging Storage Area Network (SAN) environments. Through the support of RAID redundancy techniques, VERITAS Volume Manager software helps protect against disk and hardware failures, while providing the flexibility to extend the capabilities of existing hardware. By providing a logical volume management layer, VERITAS Volume Manager overcomes the physical restriction imposed by hardware disk devices.
The main features of volume manager are following :
1. Allows creation of logical volumes spanning over multiple disks. This overcomes the physical limit of the disk .
2. Provides high availability storage solutions through RAID ,Mirroring of disks .
3. Provides fail over features by providing transferable disk group ownership between systems.
4. Dynamic reconfiguration of disk storage in an online system state. what is veritas volume manager .

 

Fundas

1.0 Volume Manager Objects

Disks
Disks are referred in volume manager by two terms - device name and disk name . The device name specifies controller , target id and slice of the disk . Disk name is the common name given to the device name as an easy to remember name .
For example device name c2t3d0s2 represents controller number 2 , target id 3 , disk group 0 and slice 2 and disk01 may be its disk name . While device name is system dependent based on controller and disk id the disk name is user defined .

Disk groups:
A disk group is a collection of volume manager disks grouped together to hold the data . All the configuration changes made to a disk group are applied to the disks in that disk group only.
Volume Manager objects cannot span disk groups i.e. all the operations on a particular disk group remains confined to that particular group .
Disk groups enable high availability as these can be shared by two or more hosts but can be accessed by only one host at a time. In two hosts and a shared storage situation one host can take over the ownership of the disk groups and drives in case other host fails.

volume Manager disks
Adding physical disks to the volume manager results in creation of public and private region in the disk by the volume manager .The public region is the disk space available for volume space and the private region stores the configuration information.
A Volume Manager disks are created from the public region of a physical disk that is under Volume Manager control. Each volume manager disk corresponds to one physical disk.
A volume manager disk is given a disk media name when it is added to a disk group which can be default or unique user defined..
Once a volume manager disk is assigned a disk media name, the disk is no longer referred to by its physical address of c#t#d#. The physical address of c#t#d# becomes known as the disk access record.

Subdisks
A subdisk is a subsection of a disk's public region and is the smallest unit of storage in Volume Manager.
A subdisk is defined by an offset and a length in sectors on a volume manager disk.
A volume manager disk can contain multiple subdisks but subdisks cannot overlap or share the same portions of a volume manager disk.
volume manager disk space that is not reserved or that is not part of a subdisk is free space. You can use free space to create new subdisks.
A subdisk is similar to a partition but with following differences :
The maximum number of partitions to a disk is eight.
There is no theoretical limit to number of subdisks that can be attached to a single plex, but it has been limited to a default value of 4096. If required, this default can be changed, using the vol_subdisk_num tunable parameter.

Plexes
A plex is a structured or ordered collection of subdisks that represents one copy of the data in a volume. A plex consists of one or more subdisks located on one or more physical disks.
A plex is also called a mirror. The terms plex and mirror can be used interchangeably, even though a plex is only one copy of the data. The terms "mirrored" or "mirroring" imply two or more copies of data.
The length of a plex is determined by the last block that can be read or written on the last subdisk in the plex.
The default naming convention for plexes in a volume is volumename-##. The default plex name consists of the volume name, a hyphen, and a two-digit number

Volumes
A volume is composed of one or more plexes not restricted by the physical size of the disk.
A volume can span across multiple disks.
Volume Manager uses the default naming convention vol## for volumes, where ## represents a two-digit number but can be user defined as per requirement.

Veritas Kernel modules and Daemons

VERITAS actually utilizes kernel modules, which are the backbone of the application. You can see some of the driver loads in /etc/system. You'll see several driver forceloads. This is important to note because on most systems you'll see "WARNING: Forceload of dev/XXX Failed!" messages at boot up. Don't worry about these, it just means that VERITAS is trying to load a driver for a piece of hardware you don't have.
VERITAS also has several daemons running all the time to keep watch over your volumes, and to ensure smooth operation. Generally will see 3 common daemons, which are:
  • vxiod
  • vxconfigd
  • vxrelocd

vxiod
vxiod is the VERITAS IO Manager, which manages reads and writes to volumes. The vxiod daemons are started at system boot time. There are typically several vxiod daemons running at all times. Rebooting after your initial installation starts the vxiod daemon.
The vxiod daemon is a kernel thread and is not visible through the ps command To find out whether the any vxiod daemons are running, run the vxiod command. If any vxiod daemons are running, the following message is displayed:
 # vxiod 
 10 volume I/O daemons running
where 10 is the number of vxiod daemons currently running.
If no vxiod daemons are currently running, start some by entering this command:
 # vxiod set 10
where 10 can be substituted by the desired number of vxiod daemons. It is recommended that at least one vxiod daemon exist for each CPU in the system.

vxconfigd
The Volume Manager configuration daemon (vxconfigd) maintains Volume Manager disk and disk group configurations. The vxconfigd daemon communicates configuration changes to the kernel and modifies configuration information stored on disk. Startup scripts invoke the vxconfigd daemon during the boot procedure.
To determine whether the volume daemon is enabled
 # vxdctl mode
 mode: enabled  (if vxconfigd running and    
If vxconfigd is running, but not enabled then you get the following output
 # vxdctl mode
 mode: disabled
If the vxconfigd daemon is not running:
 # vxdctl mode
 mode: not-running
To enable the volume daemon,
 # vxdctl enable
To start the vxconfigd daemon, use the following command:
 # vxconfigd
Once started, the vxconfigd daemon automatically becomes a background process.

vxrelocd
The Vx Hot Swap Manager, which monitor VERITAS Volume Manager for failure events and reacts to disk failures with spares.
By default, vxrelocd sends mail to root with information about a detected failure and the status of any relocation and recovery attempts. To send mail to other users, add the user login name to the vxrelocd startup line in the startup script /etc/init.d/vxvm-recover and reboot the system. 

Using vxdiskadm


2.0 Volume Manager Configuration
Volume configuration consists of adding two or more disks to form disk group and create volume/s from this disk group. File system can be created on these volumes or these can be accessed as raw devices for some database applications. First step in volume manager configuration consists of adding and initializing disks under volume manager which creates a public region which is bulk of disk space available for volume space .Private region which is generally of a few megabytes stores the disk configuration information .
Most of the volume manager operation related to disks & volume can be performed by a character based menu utility call vxdiskadm
Following paragraphs describes the use of vxddiskadm to configure and manage volume manager.
 # vxdiskadm
Typing vxdiskadm brings up a menu based utility (text). The options , their explanation and screen shots are given below. Most of the options need a disk name , device name or disk group name and you can have this information by typing list in the vxdiskadm menu .The list menu option is used to display a list of disks attached to your system. This also lists removed or failed disks. Most useful to get a quick view of all disks or list details of a single disk - its name , volume association and status.
A disk needs to be formatted in order to be included in volume manager . volume manager will report unformatted disk as invalid and a will only recognize after formatting
By default all the available disks in the system are considered for inclusion as volume manager disk however to exclude certain disks, list the names of the disks to be excluded in the file /etc/vx/disks.exclude before the initialization or encapsulation. Similarly, you can exclude all disks on specific controllers from initialization or encapsulation by listing those controllers in the file /etc/vx/cntrls.exclude.
? & ?? options provide help about the menu item and menu system.
 # vxdiskadm

  Volume Manager Support Operations  
  Menu: VolumeManager/Disk  

  1    Add or initialize one or more disks  
  2    Encapsulate one or more disks  
  3    Remove a disk  
  4    Remove a disk for replacement  
  5    Replace a failed or removed disk  
  6    Mirror volumes on a disk  
  7    Move volumes from a disk  
  8    Enable access to (import) a disk group  
  9    Remove access to (deport) a disk group  
  10   Enable (online) a disk device  
  11   Disable (offline) a disk device  
  12   Mark a disk as a spare for a disk group  
  13   Turn off the spare flag on a disk  
  list List disk information  

  ?    Display help about menu  
  ??   Display help about the menuing system  
  q    Exit from menus  

  Select an operation to perform 

2.1 Add or initialize one or more disks
The formatted disks can be added or initialized with volume manager . Disk groups needs to be given for making a new group or adding disks in existing group. Default disk group is rootdg and if none is specified the disks are added to volume manager and are kept as hot spares which can be used in place of a failed disk.
Select 1 (Add or initialize one or more disks) from the vxdiskadm main menu. Add or initialize disks
 Menu: VolumeManager/Disk/AddDisks 
   Use this operation to add one or more disks to a disk group. You can 
   add the selected disks to an existing disk group or to a new disk group 
   that will be  created as a part of the operation. The selected disks may 
   also be added to a disk group as spares. The selected disks may also be 
   initialized without adding them to a disk group leaving the disks available
   for use as replacement disks.   

   More than one disk or pattern may be entered at the prompt. Here are some 
   disk selection examples:  

   all:           all disks  
   c3 c4t2:       all disks on both controller 3 and controller 4, target 2  
   c3t4d0:        a single disk  
   xyz_0 :       a single disk (in the enclosure based naming scheme)
   xyz_ :        all disks on the enclosure whose name is xyz


  Select disk devices to add: 
  [<pattern-list>,all,list,q,?]list 
  • <pattern-list> can be a single or more disks and/or controllers. If <pattern-list> consists of multiple items, those items must be separated by white space.
  • list at the prompt displays a list of the disks available to the system, followed by a prompt at which you should type the device name of the disk to be added:
  • All disks attached to the system are recognized by the Volume Manager and displayed here.. Error status indicates disks not recognized by volume manager as part of volume manager and can be used to add in the volume manager .. Disks with a name , group and online status are present in volume manager in a valid volume manager disk group .One or more disks separated by space can be selected for adding into volume manager.
  • You can choose to add this disk to an existing disk group, a new disk group, or leave the disk available for use by future add or replacement operations. To create a new disk group, select a disk group name that does not yet exist. To leave the disk available for future use, specify a disk group name of "none".
  Select disk devices to add: 
  [<pattern-list>,all,list,q,?]list 

  DEVICE       DISK         GROUP        STATUS  
  c0t0d0       disk01       rootdg       online  
  c0t1d0       disk02       rootdg       online  
  c0t2d0       disk03       rootdg       online  
  c0t3d0       -            -            online  
  c1t0d0       disk10       rootdg       online  
  c1t0d1       -            -            error  
  .  
  .  
  .  
  c3t0d0       -            -            error  
  c3t1d0       disk33       rootdg       online  
  c3t2d0       disk34       rootdg       online  
  c3t3d0       disk35       rootdg       online  

  Select disk devices to add: [<pattern-list>,all,list,q,?] c1t0d0  

   Here is the disk selected.  Output format: [Device_Name]  
    c1t0d0  
Continue operation? [y,n,q,?] (default: y) y
  You can choose to add this disk to an existing disk group, a
  new disk group, or leave the disk available for use by future
  add or replacement operations.  To create a new disk group,
  select a disk group name that does not yet exist.  To leave
  the disk available for future use, specify a disk group name
  of "none".

  Which disk group [<group>,none,list,q,?] (default: rootdg)   

  Use a default disk name for the disk? [y,n,q,?] (default: y)

  Add disk as a spare disk for rootdg? [y,n,q,?] (default: n) n  

  The selected disks will be added to the disk group rootdg with  
  default disk names.  

    c1t2d0  

  Continue with operation? [y,n,q,?] (default: y) y   

    The following disk device has a valid VTOC, but does not appear to have  
    been initialized for the Volume Manager.  If there is data on the disk  
    that should NOT be destroyed you should encapsulate the existing disk  
    partitions as volumes instead of adding the disk as a new disk.  
    Output format: [Device_Name]  

    c1t2d0  

  Encapsulate this device? [y,n,q,?] (default: y) n  

    c1t2d0  

  Instead of encapsulating, initialize? [y,n,q,?] (default: n) y   
  Initializing device c1t2d0.  
  Adding disk device c1t2d0 to disk group rootdg with disk  
  name disk39. 

  Add or initialize other disks? [y,n,q,?] (default: n)   

2.2 Encapsulate one or more disks
This is used to bring the disk under volume manager , which are already present in the system with data but without volume manager . Data on these disks are not disturbed and if these disks meets certain volume manager requirements these are added under volume manager.
  • System needs rebooting if encapsulation is used for disk with mounted filesystem or running applications . Also the old device names needs to be changed in applications/scripts to reflect the new volume name.
  • vfstab information is updated automatically but it is worthwhile to check vfstab if changes are proper as any discrepancy in vfstab may cause system boot failure on next reboot.
  • Encapsulation preserves any existing data on the disk when the disk is placed under volume manager control. To reduce the chance of encapsulation failure, make sure that the disk meets the following requirements:-
    • It has a small amount of free space (at the beginning or end of the disk) that does not belong to any partition
    • It has two free partitions
    • It has an s2 slice that represents the whole disk
Procedure for encapsulating a disk for volume manager use is as follows:
Select menu item 2 (Encapsulate one or more disks) from the vxdiskadm main menu and follow the prompts :-
 Encapsulate one or more disks  
 Menu: VolumeManager/Disk/Encapsulate  

 Use this operation to convert one or more disks to use the Volume Manager.
 This adds  the disks to a disk group and replaces existing partitions with 
 volumes.  Disk  encapsulation requires a reboot for the changes to take effect.  

 More than one disk or pattern may be entered at the prompt. Here are some 
 disk selection examples:  

    all:           all disks  
    c3 c4t2:       all disks on both controller 3 and controller 4, target 2  
    c3t4d0:        a single disk  

  Select disk devices to encapsulate:  
  [<pattern-list>,all,list,q,?] c2t5d0  
<pattern-list> can be a single disk, or a series of disks and/or controllers (with optional targets). If <pattern-list> consists of multiple items, those items must be separated by white space.
 Here is the disk selected.  Output format: [Device_Name]  
    c2t5d0  
  Continue operation? [y,n,q,?] (default: y) y   

    You can choose to add this disk to an existing disk group or to  
    a new disk group.  To create a new disk group, select a disk group
    name that does not yet exist.  

  Which disk group [<group>,list,q,?] (default: rootdg)  

 Use a default disk name for the disk? [y,n,q,?] (default: y) 
    The selected disks will be encapsulated and added to the rootdg  
    disk group with default disk names.  

    c2t5d0  

  Continue with operation? [y,n,q,?] (default: y) y 
  The following disk has been selected for encapsulation.  Output format:  
  [Device_Name]  

    c2t5d0  

  Continue with encapsulation? [y,n,q,?] (default: y) y   

    The disk device c2t5d0 will be encapsulated and added to the disk  
    group  rootdg with the disk name disk01.  
    The c2t5d0 disk has been configured for encapsulation.  
    The first stage of encapsulation has completed successfully.  You  
    should now reboot your system at the earliest possible opportunity.  
    The encapsulation will require two or three reboots which will happen 
    automatically after the next reboot.  To reboot execute the command:  
    shutdown -g0 -y -i6  
    This will update the /etc/vfstab file so that volume devices are  
    used to mount the file systems on this disk device.  You will need  
    to update any other references such as backup scripts, databases,
    or manually created swap devices.   

  Encapsulate other disks? [y,n,q,?] (default: n) n   

    The disk device c2t5d0 will be encapsulated and added to the 
    disk group rootdg with the disk name disk01.  
    The encapsulation operation failed with the following error:  
    It is not possible to encapsulate c2t5d0, for the following reason:  
    <vxvm:vxslicer: ERROR: Unsupported disk layout.>  

 Hit RETURN to continue. 
  • Encapsulation may fail if there is not enough free space available on the disk to accommodate volume manager. If this happens, the procedure above will end abruptly with an error message as above .

2.3 Remove a disk
This option is used to remove a disk from a disk group provided there is no active volume using this disk. If there are some volumes using the disk the those have to be either moved to some other disk or removed if they are no longer needed.
However since a diskgroup must have at least one disk you can not remove all the disks from a disk group . To remove all disks from a diskgroup you have to disable the volume group with the exception of rootdg disk group which can not be disabled .
Select menu item 3 (Remove a disk) from the vxdiskadm main menu.
  Remove a disk  
  Menu: VolumeManager/Disk/RemoveDisk  

  Use this operation to remove a disk from a disk group. This  
  operation takes, as input, a disk name. This is the same name  
  that you gave to the disk when you added the disk to the disk  
  group.  

  Enter disk name [<disk>,list,q,?] disk01 

  Requested operation is to remove disk disk01 from group rootdg.  

  Continue with operation? [y,n,q,?] (default: y)   

  Removal of disk disk01 is complete.  

  Remove another disk? [y,n,q,?] (default: n)

2.4 Remove a disk for replacement
This option is used for removing the disk but retaining the name of the disk so that it can be used by the newly replaced disk . The replacement disk can be a newly added disk or already available disk in the other disk groups
Select menu item 4 (Remove a disk for replacement) from the vxdiskadm main menu.
  Remove a disk for replacement  
  Menu: VolumeManager/Disk/RemoveForReplace  

  Use this menu operation to remove a physical disk from a disk  
  group, while retaining the disk name. This changes the state  
  for the disk name to a removed disk. If there are any  
  initialized disks that are not part of a disk group, you will be  
  given the option of using one of these disks as a replacement.  

  Enter disk name [<disk>,list,q,?] disk02  
Additional screens display if there are volumes associated with the disk you want to remove. You have to decide if data is needed or not needed and answer the prompts as asked .
 The following devices are available as replacements:  
       c1t1d0  

  You can choose one of these disks now, to replace disk02.  
  Select "none" if you do not wish to select a replacement disk.  

  Choose a device, or select "none"  
  [<device>,none,q,?] (default: c1t1d0)   

  Requested operation is to remove disk disk02 from group rootdg.  
  The removed disk will be replaced with disk device c1t1d0.  

  Continue with operation? [y,n,q,?] (default: y)

  Removal of disk disk02 completed successfully.  

  Proceeding to replace disk02 with device c1t1d0. 

    Disk replacement completed successfully. 

     Remove another disk? [y,n,q,?] (default: n) 

2.5 Replace a failed or removed disk
This option is used to replace a failed or removed disk . The new disk can be initialized or non initialized as this option does initialization .
Select menu item 5 (Replace a failed or removed disk) from the vxdiskadm main menu.
  Replace a failed or removed disk  
  Menu: VolumeManager/Disk/ReplaceDisk  

  Use this menu operation to specify a replacement disk for a disk  
  that you removed with the "Remove a disk for replacement" menu  
  operation, or that failed during use. You will be prompted for  
  a disk name to replace and a disk device to use as a replacement.  
  You can choose an uninitialized disk, in which case the disk will  
  be initialized, or you can choose a disk that you have already  
  initialized using the Add or initialize a disk menu operation.  

  Select a removed or failed disk [<disk>,list,q,?] disk02    

  The following devices are available as replacements:  
       c1t0d0s2 c1t1d0s2  

  You can choose one of these disks to replace disk02.  
  Choose "none" to initialize another disk to replace disk02.  

  Choose a device, or select "none"  
  [<device>,none,q,?] (default: c1t0d0s2)   

  The requested operation is to use the initialized device c1t0d0s2  
  to replace the removed or failed disk disk02 in disk group rootdg.  

  Continue with operation? [y,n,q,?] (default: y)  

  Replacement of disk disk02 in group rootdg with disk device  
  c1t0d0s2 completed successfully. 

2.6 Mirror volumes on a disk
volumes can be mirrored to another disk with available space however it can not be used to mirror existing mirrors or mirrors spanning more than one sub disk .
To mirror volumes on a disk, make sure that the target disk has an equal or greater amount of space as the originating disk and then do the following
Select menu item 6 (Mirror volumes on a disk) from the vxdiskadm main menu.
  Mirror volumes on a disk  
  Menu: VolumeManager/Disk/Mirror  

  This operation can be used to mirror volumes on a disk. These  
  volumes can be mirrored onto another disk or onto any  
  available disk space. Volumes will not be mirrored if they are  
  already mirrored. Also, volumes that are comprised of more than  
  one subdisk will not be mirrored.  

  Mirroring volumes from the boot disk will produce a disk that can  
  be used as an alternate boot disk.  

  Enter disk name [<disk>,list,q,?] disk02 

 You can choose to mirror volumes from disk disk02 onto any  
  available disk space, or you can choose to mirror onto a specific  
  disk. To mirror to a specific disk, select the name of that disk.  
  To mirror to any available disk space, select "any".  

  Enter destination disk [<disk>,list,q,?] (default: any) disk01    
  • Be sure to always specify the destination disk when you are creating an alternate root disk. Otherwise, the volume manager will select space available in the disk group which might span disk and will result in boot failure from this disk.

2.7 Move volumes from a disk
This option is used in case the disk is to be replaced or removed and has active volumes on the disk. . Also volumes can be moved to different disk groups for better space , performance etc.
Select menu item 7 (Move volumes from a disk) from the from the from the from the vxdiskadm main menu.
  Move volumes from a disk  
  Menu: VolumeManager/Disk/Evacuate  

  Use this menu operation to move any volumes that are using a  
  disk onto other disks. Use this menu immediately prior to  
  removing a disk, either permanently or for replacement. You can  
  specify a list of disks to move volumes onto, or you can move the  
  volumes to any available disk space in the same disk group.  

  NOTE: Simply moving volumes off of a disk, without also removing  
        the disk, does not prevent volumes from being moved onto  
        the disk by future operations. For example, using two  
        consecutive move operations may move volumes from the  
        second disk to the first.  

  Enter disk name [<disk>,list,q,?] disk01   


  You can now specify a list of disks to move onto.  Specify a list  
  of disk media names (e.g., disk01) all on one line separated by  
  blanks.  If you do not enter any disk media names, then the  
  volumes will be moved to any available space in the disk group.

 Requested operation is to move all volumes from disk disk01 in  
  group rootdg.  

  NOTE: This operation can take a long time to complete.  

  Continue with operation? [y,n,q,?] (default: y)  

  Move volume vol3 ...  
  Move volume vol3-bk00 ...  
  Evacuation of disk disk01 is complete. 

 Move volumes from another disk? [y,n,q,?] (default: n)   

2.8 Enable access to (import) a disk group
Used in enabling ownership of the other system to a disk group which has been deported by the other system. Used in failover configurations where the ownership of a shared disk/disk group is transferred to the other system in case of failure of current system.
Select menu item 8(Enable access to (import) a disk group) from the vxdiskadm main menu.
  Enable access to (import) a disk group  
  Menu: VolumeManager/Disk/EnableDiskGroup  

  Use this operation to enable access to a disk group. This can be  
  used as the final part of moving a disk group from one system to  
  another. The first part of moving a disk group is to use the  
  "Remove access to (deport) a disk group" operation on the  
  original host.  

  A disk group can be imported from another host that failed without  
  first deporting the disk group. Be sure that all disks in the disk  
  group are moved between hosts.  

  If two hosts share a SCSI bus, be very careful to ensure that the  
  other host really has failed or has deported the disk group. If  
  two active hosts import a disk group at the same time, the disk  
  group will be corrupted and will become unusable.  

  Select disk group to import [<group>,list,q,?] (default: list)  

  newdg   

 The import of newdg was successful.
Select another disk group? [y,n,q,?] (default: n)

2.9 Disable access to (deport) a disk group
Disk group is deported if disks groups ownership needs to be transferred to another system or all the disks in a disk groups needs to be freed from group. Disks in a disk groups to be deported should not be active.
Select menu item 9 (Remove access to (deport) a disk group) from the vxdiskadm main menu. Remove access to (deport) a disk group
  Menu: VolumeManager/Disk/DeportDiskGroup  

  Use this menu operation to remove access to a disk group that is  
  currently enabled (imported) by this system. Deport a disk  
  group if you intend to move the disks in a disk group to another  
  system. Also, deport a disk group if you want to use all of the  
  disks remaining in a disk group for some new purpose.  

  You will be prompted for the name of a disk group. You will also  
  be asked if the disks should be disabled (offlined). For  
  removable disk devices on some systems, it is important to  
  disable all access to the disk before removing the disk.  

  Enter name of disk group [<group>,list,q,?] (default: list) newdg   

  The requested operation is to disable access to the removable  
  disk group named newdg. This disk group is stored on the  
  following disks:  

      newdg01 on device c1t1d0s2  

  You can choose to disable access to (also known as "offline")  
  these disks. This may be necessary to prevent errors if  
  you actually remove any of the disks from the system.  

  Disable (offline) the indicated disks? [y,n,q,?] (default: n)  

  Continue with operation? [y,n,q,?] (default: y)  

  Removal of disk group newdg was successful. 

  Disable another disk group? [y,n,q,?] (default: n)

2.10 Enable (online) a disk device
Disks which are turned offline by volume manager , or which are to be imported can be enabled by this option. This operation causes disks to be scanned and find out the disk belonging to a disk group.
Select menu item 10 (Enable (online) a disk device) from the vxdiskadm main menu.
  Enable (online) a disk device  
  Menu: VolumeManager/Disk/OnlineDisk  

  Use this operation to enable access to a disk that was disabled  
  with the "Disable (offline) a disk device" operation.  

  You can also use this operation to re-scan a disk that may have  
  been changed outside of the Volume Manager. For example, if a disk  
  is shared between two systems, the Volume Manager running on the  
  other system may have changed the disk. If so, you can use this  
  operation to re-scan the disk.  

  NOTE: Many vxdiskadm operations re-scan disks without user  
        intervention. This will eliminate most needs to online a  
        disk directly, except when the disk is directly offlined.  

  Select a disk device to enable [<address>,list,q,?] c1t1d0    

  Enable another device? [y,n,q,?] (default: n)

2.11 Disable (offline) a disk device
This option disables all access to a disk which is not part of any disk group . This is used to remove disk from volume group. Some systems do not support disks that can be removed from a system during normal operation. On such systems, the offline operation is not very useful.
Select menu item 11 (Disable (offline) a disk device) from the vxdiskadm main menu.
  Disable (offline) a disk device  
  Menu: VolumeManager/Disk/OfflineDisk  

  Use this menu operation to disable all access to a disk device  
  by the Volume Manager. This operation can be applied only to  
  disks that are not currently in a disk group. Use this operation  
  if you intend to remove a disk from a system without rebooting.  

  NOTE: Many systems do not support disks that can be removed from  
        a system during normal operation. On such systems, the  
        offline operation is seldom useful.  

  Select a disk device to disable [<address>,list,q,?] c1t1d0    

  Disable another device? [y,n,q,?] (default: n)  

2.12 Mark a disk as a spare for a disk group
 This   is used to reserve the disk as an automatic replacement disk ( hot-relocation) in case of  another disk in the disk group  fails. Hot-relocation  relocates redundant subdisks to other disks and restores  the affected volume manager objects and data. If a disk has already been designated as a spare in the disk group, the subdisks from the failed disk are relocated to the spare disk. Otherwise, any suitable free space in the disk group is used.  
Select menu item 12 (Mark a disk as a spare for a disk group) from the vxdiskadm main menu.
  Mark a disk as a spare for a disk group  
  Menu: VolumeManager/Disk/MarkSpareDisk  

    Use this operation to mark a disk as a spare for a disk group.  
    This operation takes, as input, a disk name. This is the same name  
    that you gave to the disk when you added the disk to the disk group.  

  Enter disk name [<disk>,list,q,?] disk01   
  Marking of disk01 in rootdg as a spare disk is complete.  


  Mark another disk as a spare? [y,n,q,?] (default: n)  
  • Any VM disk in this disk group can now use this disk as a spare in the event of a failure. If a disk fails, hot-relocation should automatically occur .The failed disk needs to be replaced.

2.13 Turn off the spare flag on a disk
This is used to remove a VM Disk From the Hot-Relocation Pool & free hot-relocation spare disks for use as regular volume manager disks While a disk is designated as a spare, the space on that disk is not used as free space for the creation of volume manager objects within its disk group and this option makes this space available.
Select menu item 13 (Turn off the spare flag on a disk) from the vxdiskadm main menu.
  Turn off the spare flag on a disk  
  Menu: VolumeManager/Disk/UnmarkSpareDisk  

    Use this operation to turn off the spare flag on a disk.  
    This operation takes, as input, a disk name. This is the same  
    name that you gave to the disk when you added the disk to the  
    disk group.  

  Enter disk name [<disk>,list,q,?] disk01   

  Disk disk01 in rootdg no longer marked as a spare disk.

  Turn-off spare flag on another disk? [y,n,q,?] (default: n) 
 
Cookbooks
Table of Contents

01. Initialize the Volume manager
02. Create Raid 5 volume using vxmake
03. Unencapsulating Your Root Disk
04. Replacing a failed boot disk


Volume Manager Initialization

The vxinstall utility provides a menu driven interface to configure VERITAS Volume Manager (VxVM). If you install the VERITAS Volume Manager software package using the operating system's package administration commands, you can run vxinstall to configure VxVM for initial use on your system

 # vxinstall
  VxVM uses license keys to control access.  If you have a SPARCstorage
  Array (SSA) controller or a Sun Enterprise Network Array (SENA) controller
  attached to your system, then VxVM will grant you a limited use license
  automatically.  The SSA and/or SENA license grants you unrestricted use
  of disks attached to an SSA or SENA controller, but disallows striping,
  RAID-5, and DMP on non-SSA and non-SENA disks.  If you are not running an
  SSA or SENA controller, then you must obtain a license key to operate.

  Licensing information:
    System host ID: 80f7cd50
    Host type: SUNW,Ultra-80
    SPARCstorage Array or Sun Enterprise Network Array: No arrays found
  No valid licenses found.

  VM lite/full license(s) is needed to proceed with vxinstall.
  See VERITAS Volume Manager Installation Guide for more details
  on obtaining and installing the license keys.

Are you prepared to enter a license key [y,n,q] (default: y)

VERITAS License Manager vxlicinst utility version 3.02.005
Copyright (C) 1996-2004 VERITAS Software Corp. All Rights reserved.

Enter your license key : xxxx-xxxx-xxxx-xxxx-xxxx-xxxx

License key successfully installed for VERITAS Storage Foundation Standard
License key successfully installed for VERITAS Volume Manager
License key successfully installed for VERITAS File System
License key successfully installed for VERITAS SANPoint Control

Do you wish to enter another license key [y,n,q] (default: n) n

Do you want to use enclosure based names for all disks ?
[y,n,q,?] (default: n)

    Starting the cache deamon, vxcached.

Do you want to setup a system wide default disk group?
[y,n,q,?] (default: y)

Which disk group [<group>,list,q,?] list

NAME STATE ID

Which disk group [<group>,list,q,?] defdg

  The installation is successfully completed.


Cook-book to create a RAID5 Volume using vxmake

Scenario: We have 3 vmdisks named disk01, disk02 and disk03. We have to create a RAID5 volume with 2 column and a stripe width of 32k. Raid 5 layout will have 2 plexes in it. One for striping and the another one for the log. So we have to create two plexes.

01. Create 3 subdisks called disk01-02, disk02-02, disk03-02 (2 column & 1 log)

  # vxmake sd disk01-02 disk01,500000,100m
  # vxmake sd disk02-02 disk02,500000,100m
  # vxmake sd disk03-02 disk03,500000,100m

02. Create a plex called raidplex with 2 subdisks for striping

 # vxmake plex  raidplex  layout=raid5 stwidth=32 ncolumn=2 sd=disk01-02,disk02-01

03. Create one more plex called logplex with one subdisk for log

 # vxmake plex logplex  sd=disk03-02

04. Create a volume raidvol associating both plexes. Make sure the usage type is raid5

 # vxmake -U raid5 vol raidvol plex=raidplex,logplex

05. Initialize the RAID5 volume

 # vxvol start raidvol  (If facing any problem, ten initialize with b option)
 # vxvol init zero reaidvol

06. Building a VxFS Filesystem:

 # /usr/lib/fs/vxfs/mkfs -F vxfs -o largefiles /dev/vx/rdsk/exampledg/vol01
 version 4 layout
 35363560 sectors, 4420445 blocks of size 4096, log size 256 blocks
 unlimited inodes, largefiles supported
 4420445 data blocks, 4419853 free data blocks
 135 allocation units of 32768 blocks, 32768 data blocks
 last allocation unit has 29533 data blocks

07. To fsck the Vxfs file system

 # fsck -F vxfs -o full,nolog /dev/vx/rdsk/exampledg/vol01


Unencapsulating Your Root Disk

There are two methods for this. The preferable choice is to use the command "vxunroot". If you can�t do this for some reason, or you need to repair a system that has crashed, you can manually un-encapsulate the disk using the following steps:

1. Boot off the cdrom

 # boot cdrom -sw

2. Mount the root file system. Your root slice could be different.

 # mount /dev/dsk/c0t0d0s0 /a

3. Edit /a/etc/system
Using "*" comment out the lines between VXVM BEGIN and VXVM END
NOTE: There might be a file /a/etc/system.prevm That could be used. The lines look like the following:

 *rootdev:/pseudo/vxio@0:0
 *set vxio:vol_rootdev_is_volume=1

4. Edit /a/etc/vfstab
Need to comment out the line that references the Volume Manager volumes.
NOTE: There might be a file /a/etc/vfstab.prevm

4a. Using the information in the vfstab file change the root device to system root disk. ie.

 /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -

There are lines within the vfstab starting with "NOTE:" that indicates the original boot device. Use this information to recreate the original vfstab file. There are line similar to this:

 #NOTE: volume rootvol (/) encapsulated partition c0t0d0s0

4b. Do the same thing for the other encapsulated volumes (ie. /usr , /opt, ..etc)

5. If the install-db file exists, the VxVM daemons will not start on bootup:

 # touch /a/etc/vx/reconfig.d/state.d/install-db

6. The root-done file indicates that the root disk has been encapsulated. Remove it now:

 # rm /a/etc/vx/reconfig.d/state.d/root-done 

7. Unmount /a, and reboot.

Replacing a failed boot device

01. Boot the system from the mirror device "vx-rootmirror":

 ok boot vx-rootmirror

02. Check extent of failures. Logs into the system and checks the status of the system. Note that the device c0t0d0s2 is listed as "failed", and the all plexes on that device are listed as DISABLED/NODEVICE".

 # vxdisk list
 DEVICE       TYPE      DISK         GROUP        STATUS
 c0t1d0s2     sliced    rootmirror   rootdg       online
 -            -         rootdisk     rootdg       failed was:c0t0d0s2

 # vxprint -ht
 Disk group: rootdg

 dg rootdg       default      default  0        1035555399.1025.pegasus

 dm rootdisk     -            -        -        -        NODEVICE
 dm rootmirror   c0t1d0s2     sliced   3359     17690400 -

 v  rootvol      -            ENABLED  ACTIVE   13423200 ROUND     -        root
 pl rootvol-01   rootvol      DISABLED NODEVICE 13423200 CONCAT    -        RW
 sd rootdisk-B0  rootvol-01   rootdisk 17690399 1        0         -        NDEV
 sd rootdisk-02  rootvol-01   rootdisk 0        13423199 1         -        NDEV
 pl rootvol-02   rootvol      ENABLED  ACTIVE   13423200 CONCAT    -        RW
 sd rootmirror-01 rootvol-02  rootmirror 0      13423200 0         c0t1d0   ENA

 v  swapvol      -            ENABLED  ACTIVE   2100000  ROUND     -        swap
 pl swapvol-01   swapvol      DISABLED NODEVICE 2100000  CONCAT    -        WO
 sd rootdisk-01  swapvol-01   rootdisk 13423199 2100000  0         -        NDEV
 pl swapvol-02   swapvol      ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootmirror-02 swapvol-02  rootmirror 13423200 2100000 0        c0t1d0   ENA

 v  var          -            ENABLED  ACTIVE   2100000  ROUND     -        fsgen
 pl var-01       var          DISABLED NODEVICE 2100000  CONCAT    -        WO
 sd rootdisk-03  var-01       rootdisk 15523199 2100000  0         -        NDEV
 pl var-02       var          ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootmirror-03 var-02      rootmirror 15523200 2100000 0        c0t1d0   ENA

03. Replace failed disk and restore redundancy. The administrator replaces the failed disk with a new disk of the same geometry. Depending on the system model, the disk replacement may require that the system be powered down. Once the operating system can "see" the new disk c0t0d0 via the format command, the administrator tells Veritas volume manager to rescan the system via the "vxdctl enable" command.

 # vxdctl enable

 # vxdisk list
 DEVICE       TYPE      DISK         GROUP        STATUS
 c0t0d0s2     sliced    -            -            error
 c0t1d0s2     sliced    rootmirror   rootdg       online
 -            -         rootdisk     rootdg       failed was:c0t0d0s2

Now the administrator can make use of "vxdiskadm" to manage the process of replacing the boot disk volumes.

 # vxdiskadm

 Volume Manager Support Operations
 Menu: VolumeManager/Disk

  1      Add or initialize one or more disks
  2      Encapsulate one or more disks
  3      Remove a disk
  4      Remove a disk for replacement
  5      Replace a failed or removed disk
  6      Mirror volumes on a disk
  7      Move volumes from a disk
  .........
  .........
 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

 Select an operation to perform: 4


 Remove a disk for replacement
 Menu: VolumeManager/Disk/RemoveForReplace

  Use this menu operation to remove a physical disk from a disk
  group, while retaining the disk name.  This changes the state
  for the disk name to a "removed" disk.  If there are any
  initialized disks that are not part of a disk group, you will be
  given the option of using one of these disks as a replacement.

 Enter disk name [<disk>,list,q,?] list

 Disk group: rootdg

  DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE

  dm rootdisk     -            -        -        -        NODEVICE
  dm rootmirror   c0t1d0s2     sliced   3359     17690400 -

 Enter disk name [<disk>,list,q,?] rootdisk

   The following volumes will lose mirrors as a result of this
   operation:

        rootvol swapvol var

   No data on these volumes will be lost.

   The requested operation is to remove disk rootdisk from disk group
   rootdg.  The disk name will be kept, along with any volumes using
   the disk, allowing replacement of the disk.

   Select "Replace a failed or removed disk" from the main menu
   when you wish to replace the disk.

 Continue with operation? [y,n,q,?] (default: y) y

   Removal of disk rootdisk completed successfully.

 Remove another disk? [y,n,q,?] (default: n) n

 Volume Manager Support Operations
 Menu: VolumeManager/Disk

 Volume Manager Support Operations
 Menu: VolumeManager/Disk

  1      Add or initialize one or more disks
  2      Encapsulate one or more disks
  3      Remove a disk
  4      Remove a disk for replacement
  5      Replace a failed or removed disk
  6      Mirror volumes on a disk
  7      Move volumes from a disk
  .........
  .........

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

 Select an operation to perform: 5


 Replace a failed or removed disk
 Menu: VolumeManager/Disk/ReplaceDisk

   Use this menu operation to specify a replacement disk for a disk
   that you removed with the "Remove a disk for replacement" menu
   operation, or that failed during use.  You will be prompted for
   a disk name to replace and a disk device to use as a replacement.
   You can choose an uninitialized disk, in which case the disk will
   be initialized, or you can choose a disk that you have already
   initialized using the Add or initialize a disk menu operation.

 Select a removed or failed disk [<disk>,list,q,?] list

 Disk group: rootdg

 DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE

 dm rootdisk     -            -        -        -        REMOVED


 Select a removed or failed disk [<disk>,list,q,?] rootdisk

 Select disk device to initialize [<address>,list,q,?] list

 DEVICE       DISK         GROUP        STATUS
 c0t0d0       -            -            error
 c0t1d0       rootmirror   rootdg       online

 Select disk device to initialize [<address>,list,q,?] c0t0d0

   The following disk device has a valid VTOC, but does not appear to have
   been initialized for the Volume Manager.  If there is data on the disk
   that should NOT be destroyed you should encapsulate the existing disk
   partitions as volumes instead of adding the disk as a new disk.
   Output format: [Device_Name]

   c0t0d0

 Encapsulate this device? [y,n,q,?] (default: y) n

   c0t0d0

 Instead of encapsulating, initialize? [y,n,q,?] (default: n) y

   The requested operation is to initialize disk device c0t0d0 and
   to then use that device to replace the removed or failed disk
   rootdisk in disk group rootdg.

 Continue with operation? [y,n,q,?] (default: y) 

   Replacement of disk rootdisk in group rootdg with disk device
   c0t0d0 completed successfully.

 Replace another disk? [y,n,q,?] (default: n) n

Now quit from the vxdiskadm. Having replaced the disk in Veritas volume manager, the disk device is now listed as "online", and VxVM is in the process of attaching the replacement plexes to the original volumes.

 # vxdisk list
 DEVICE       TYPE      DISK         GROUP        STATUS
 c0t0d0s2     sliced    rootdisk     rootdg       online
 c0t1d0s2     sliced    rootmirror   rootdg       online

 # vxprint -ht
 dg rootdg       default      default  0        1035555399.1025.pegasus

 dm rootdisk     c0t0d0s2     sliced   3359     17690400 -
 dm rootmirror   c0t1d0s2     sliced   3359     17690400 -

 v  rootvol      -            ENABLED  ACTIVE   13423200 ROUND     -        root
 pl rootvol-01   rootvol      ENABLED  STALE    13423200 CONCAT    -        WO
 sd rootdisk-05  rootvol-01   rootdisk 2100000  13423200 0         c0t0d0   ENA
 pl rootvol-02   rootvol      ENABLED  ACTIVE   13423200 CONCAT    -        RW
 sd rootmirror-01 rootvol-02  rootmirror 0      13423200 0         c0t1d0   ENA

 v  swapvol      -            ENABLED  ACTIVE   2100000  ROUND     -        swap
 pl swapvol-01   swapvol      DISABLED RECOVER  2100000  CONCAT    -        WO
 sd rootdisk-06  swapvol-01   rootdisk 15523200 2100000  0         c0t0d0   ENA
 pl swapvol-02   swapvol      ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootmirror-02 swapvol-02  rootmirror 13423200 2100000 0        c0t1d0   ENA

 v  var          -            ENABLED  ACTIVE   2100000  ROUND     -        fsgen
 pl var-01       var          DISABLED RECOVER  2100000  CONCAT    -        WO
 sd rootdisk-04  var-01       rootdisk 0        2100000  0         c0t0d0   ENA
 pl var-02       var          ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootmirror-03 var-02      rootmirror 15523200 2100000 0        c0t1d0   ENA

 # vxtask list
 TASKID  PTID TYPE/STATE    PCT   PROGRESS
    161           PARENT/R  0.00% 3/0(1) VXRECOVER rootdisk
    162   162     ATCOPY/R 01.22% 0/13423200/163680 PLXATT rootvol rootvol-01

After about an hour, all of the plexes have been synchronized, and full operating system redundancy has been restored:

 # vxtask list
 TASKID  PTID TYPE/STATE    PCT   PROGRESS

 # vxprint -ht
 Disk group: rootdg

 dg rootdg       default      default  0        1035555399.1025.pegasus

 dm rootdisk     c0t0d0s2     sliced   3359     17690400 -
 dm rootmirror   c0t1d0s2     sliced   3359     17690400 -

 v  rootvol      -            ENABLED  ACTIVE   13423200 ROUND     -        root
 pl rootvol-01   rootvol      ENABLED  ACTIVE   13423200 CONCAT    -        RW
 sd rootdisk-05  rootvol-01   rootdisk 2100000  13423200 0         c0t0d0   ENA
 pl rootvol-02   rootvol      ENABLED  ACTIVE   13423200 CONCAT    -        RW
 sd rootmirror-01 rootvol-02  rootmirror 0      13423200 0         c0t1d0   ENA

 v  swapvol      -            ENABLED  ACTIVE   2100000  ROUND     -        swap
 pl swapvol-01   swapvol      ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootdisk-06  swapvol-01   rootdisk 15523200 2100000  0         c0t0d0   ENA
 pl swapvol-02   swapvol      ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootmirror-02 swapvol-02  rootmirror 13423200 2100000 0        c0t1d0   ENA

 v  var          -            ENABLED  ACTIVE   2100000  ROUND     -        fsgen
 pl var-01       var          ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootdisk-04  var-01       rootdisk 0        2100000  0         c0t0d0   ENA
 pl var-02       var          ENABLED  ACTIVE   2100000  CONCAT    -        RW
 sd rootmirror-03 var-02      rootmirror 15523200 2100000 0        c0t1d0   ENA
Using vxassist

Attach:vxassit.pdf
Table of Contents

 About Vxassist
 1. Creating a Volume
     1.1 Creating a Concatenated Volume 
     1.2 Creating a Striped Volume 
     1.3 Creating a RAID-5 Volume
 2. Extending a Volume
    2.1 Extending a volume up to certain length 
    2.2 Extending by a Given Length
    2.3 Extending Volume and Filesystem using vxresize
 3. Shrinking a Volume
    3.1 Shrinking to a Given Length
    3.2 Shrinking by a Given Length
 4. Removing a Volume
 5. Mirroring a Volume
    5.1 Creating & Mirroring a New Volume
    5.2 Mirroring an Existing Volume
    5.3 Mirroring All Volumes
 6. Removing a Mirror
 7. Adding a RAID-5 Log
 8. Adding a DRL Log
 9.  Removing a RAID-5 Log 
 10.Preparing a Volume for Online Backup
 11.Displaying Volume Configuration Information 

About vxassist
vxassist utility in Veritas Volume Manager is used to create volumes, add mirrors and logs to existing volumes, extend and shrink existing volumes, provides for the migration of data from a specified set of disks, and provides facilities for the on-line backup of existing volumes.

The default behavior of vxassist is to create volumes in the rootdg diskgroup if diskgroup is not specified . The default length is taken as number of blocks but this can be specified in Kilobytes or Megabytes or Gigabytes.

Device Nodes :

Default rootdg disk group.
Block Device Node /dev/vx/dsk/volume_name
Raw Device Node /dev/vx/rdsk/volume_name
Other DiskGroups
Block Device Node /dev/vx/dsk/diskgroup_name/volume_name
Raw Device Node /dev/vx/rdsk/diskgroup_name/volume_name

vxassist command syntax:

  vxassist <option> <Keyword> volume_name [attributes]

Commonly used options are given below (See man vxassist for complete list of supported options)

 -g for specifying diskgroups 
 -b for background operation 
 -d file containing defaults for vxassist 
    if not specified /etc/default/vxassist is used 

 Keywords used are make, mirror, move, growto,growby,shrintto,
 shirnkby ,snapstart , snapshot ,snapwait 

 Attributes specify volumes layout disks controllar to include exclude etc 

1. Creating a Volume


1.1 Creating a Concatenated Volume

By default, vxassist creates a concatenated volume using the space available on a disk or on the number of disks in a diskgroup if the volume size specified is more then the one available on a single disk.

Disks can be specified from a diskgroup for a volume group but if not mentioned available disks are selected by the volume manager.

     vxassist make volume_name volume_length

To create a new volume appvol of 100 MB in the default disk group rootdg with available disks

 # vxassist make appvol 100m 

To create the volume appvol of 100MB on disk03

 # vxassist make appvol 100m disk03


1.2 Creating a Striped Volume

A striped volume contains at least one plex that consists of two or more subdisks located on two or more physical disks.

     vxassist make volume_name length layout=stripe

To create a striped volume appvol2 with the default stripe unit size on the default number of disks

 # vxassist make appvol2 100m layout=stripe

To create a striped volume appvol2 100MB striped volume on three specific disks.

 # vxassist make appvol2 100m layout=stripe disk04 disk05 disk06


1.3 Creating a RAID-5 Volume

A RAID-5 volume contains a RAID-5 plex that consists of two or more subdisks located on two or more physical disks. Only one RAID-5 plex can exist per volume. A RAID-5 volume may also contain one or more RAID-5 log plexes, which are used to log information about data and parity being written to the volume.

     vxassist make volume_name length layout=raid5

To create the RAID-5 volume appvol4 with the default stripe unit size on the default number of disks with RAID-5 log,

 # vxassist make appvol4 100m layout=raid5.

2. Extending a Volume

Caution : If you plan to use volume size change (grow or shrink ) on a volume with data make sure you have the good backup of the volume available before carrying out such operation .


2.1 Extending a volume up to certain length

    vxassist growto volume_name length

To extend vol3 upto 8000 sectors, type:

 # vxassist growto vol3 8000


2.2 Extending by a Given Length

    vxassist growby volume_name length

To extend volapp by 1000 sectors, type:

 # vxassist growby volapp 1000

After Extending the volume, extend the file system using fsadm command

 fsadm -F vxfs -b <size> <filesystem name>


2.3 Extending the Volume and file system using vxresize

    vxresize -F <fs_type> -g <disk_group> volume_name  size

To extend the file system size by 20GB

 # vxresize  -F vxfs -g appdg appvol 20g

To add 10GB to an existing file system

 # vxresize -F vxfs -g appdg appvol +10g

3. Shrinking a Volume

Caution - Do not shrink a volume below the size of the file system. If you have a VxFS file system, you can shrink the file system and then shrink the volume. If you do not shrink the file system first, you risk unrecoverable data loss.

Always make sure you have a good backup of the data volume to be shirnked.


3.1 Shrinking to a Given Length

     vxassist shrinkto volume_name length

Make sure you do not shrink the volume below the current size of the file system or database using the volume. This command can be safely used on empty volumes.

To shrink volcat to 1300 sectors, type:

 # vxassist shrinkto volcat 1300


3.2 Shrinking by a Given Length

     vxassist shrinkby volume_name length

To shrink volcat by 8000 sectors, type:

 # vxassist shrinkby volapp2 8000

4. Removing a Volume

Removing a volume requires removing all references to the volumes to be removed like unmounting the volume if mounted and removing its reference from /etc/vfstab .

An active volume has to be stopped first to stop all the activities to the volume only then it can be removed

Stopping Volume

     vxvol stop volume_name

To stop appvol1

 # vxvol stop appvol1

Removing Volume

     vxedit -rf rm volume_name
             or
     vxassist remove volume volume_name 

To remove the volume appvol1

 # vxedit -rf rm appvol11
           or
 # vxassist -g dg01 remove volume appvol1

5. Mirroring a Volume

Mirroring allow data to be written simultaneously to two disks so that in case of failure of one disk data is available from the other mirrored disk. Boot disks can be mirriored to provide alternate booting disk .


5.1 Creating & Mirroring a New Volume

     vxassist make volume_name length layout=mirror

To create the mirrored volume, appvol22 of 100mb

 # vxassist make appvol22 100m layout=mirror

To create a volume with Dirty Region Logging enabled

 # vxassist make volume_name length layout=mirror,log


5.2 Mirroring an Existing Volume

     vxassist mirror volume_name

Creating a mirror of volume vol44

 # vxassist mirror vol44


5.3 Mirroring All Volumes

To mirror all existing volumes to available disk space

 # /etc/vx/bin/vxmirror -a

6. Removing a Mirror

Removing a mirror involves first dissociating the plex from its volume and then removing the plex and any associated subdisks completely.The last valid mirror plex associated with a volume cannot be removed.

Dissociate and remove the plex from its volume as follows:

 # vxplex -o rm dis plex_name

vxprint -h shows the volume and associated plexes :

Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volm fsgen ENABLED 10240 - ACTIVE - - pl volm-01 volm ENABLED 10240 - ACTIVE - - sd disk01-02 volm-01 - 10240 0 - - - pl volm-02 volm ENABLED 10240 - ACTIVE - - sd disk02-03 volm-02 - 10240 0 - - -

To disassociate and remove volmir-02 from volmir, type:

 # vxplex -o rm dis volm-02

The output of vxprint -h for volm now shows volume volm with only one plex::

Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volm fsgen ENABLED 10240 - ACTIVE - - pl volm-01 volmir ENABLED 10240 - ACTIVE - - sd disk01-02 volmir-01 - 10240 0 - - -

7. Adding a RAID-5 Log

A RAID-5 log maintains a copy of the data and parity being written to the volume at any given time. If a system failure occurs, VxVM can replay the RAID-5 log to resynchronize the volume. This copies the data and parity that was being written at the time of failure from the log to the appropriate areas of the RAID-5 volume.

RAID-5 log plexes are used to log information about data and parity being written to the raid volume. A log plex is created for the volume by default when a raid volume is created but additional ones can be added by following command .

     vxassist addlog name_of_raid5_vol

8. Adding a DRL Log

Dirty region logging (DRL) is used with mirrored volume layouts. DRL keeps track of the regions that have changed due to I/O writes to a mirrored volume. Prior to every write, a bitmap is written to a log to record the area of the disk that is being changed. In case of system failure, DRL uses this information to recover only the portions of the volume that need to be recovered.

To put Dirty Region Logging into effect for a volume, a log subdisk must be added to that volume and the volume must be mirrored. Only one log subdisk can exist per plex.

To create a log for the mirrored volume vol03:

 # vxassist addlog vol03

When vxassist is used to add a log subdisk to a volume, a log plex is also created to contain the log subdisk, by default.

Once created, the plex containing a log subdisk can be treated as a regular plex. Data subdisks can be added to the log plex. The log plex and log subdisk can be removed using the same procedures used to remove ordinary plexes and subdisks.

9. Removing a RAID-5 Log

Removing a RAID-5 log involves first dissociating the log from its volume and then removing the log and any associated subdisks completely.

a. Dissociate the log from its volume as follows:

   # vxplex -o rm dis plex_name

b. To identify the log plex, use the command:

   # vxprint -ht raid5_volume_name

c. To disassociate the log plex volrd-02 from volrd, type:

   #vxplex -o rm dis volrd-02

The output of vxprint -h for volrd now shows:

 Disk group: rootdg 

 TY  NAME      ASSOC     KSTATE   LENGTH  PLOFFS   STATE    TUTIL0 PUTIL0 
 v   volrd     raid5     ENABLED  32         -     ACTIVE   -      - 
 pl  volrd-01  volrd     ENABLED  32         -     ACTIVE   -      - 
 sd  disk01-02 volrd-01  -        32         0     -        -      - 
 sd  disk02-03 volrd-01  -        32         0     -        -      -

10. Preparing a Volume for Online Backup

Volume manager provides an easy way to take backup of the online data by creating an offline snapshot mirror of the volume.

The vxassist snapstart operation creates a write-only backup mirror, which is attached to and synchronized with the volume to be backed up and later detached and made offline by vxassist snapshot command . The snapshot volume can be used by backup utilities while the original volume continues to be available for applications and users.

The volume backup method described here does not apply to RAID-5 volumes.

Backing up a volume with vxassist involves the following procedure

A. Create a snapshot mirror

snapstart starts creating a online snapshot mirror of the volume using the available disk space . The snapshot is completed with vxassist snapshot command when offline snapshot volume is created with a userdefined name .

     vxassist snapstart volume_name 

To create a snapshot mirror of a volume called vol8, type

 # vxassist snapstart vol8 

B. Create a snapshot volume

     vxassist snapshot volume_name new_volume_name

To create a snapshot volume of vol8, type:

 # vxassist snapshot vol8 snapvol8

You can now back up the snapshot volume by whatever means you prefer. To avoid wasting space, you can then remove the snapshot volume, which occupies as much space as the original volume

11 Displaying Volume Configuration Information

The vxprint command can be used to display information about how a volume is configured.

Display the volume, mirror, and subdisk record information for all volumes as follows:

 # vxprint -ht 


  Disk group: rootdg  

  DG  NAME        NCONFIG    NLOG      MINORS     GROUP-ID  
  DM  NAME        DEVICE     TYPE      PRIVLEN    PUBLEN     STATE  
  V   NAME        USETYPE    KSTATE    STATE      LENGTH     READPOL      PREFPLEX  
  PL  NAME        VOLUME     KSTATE    STATE      LENGTH     LAYOUT       NCOL/WID MODE  
  SD  NAME        PLEX       DISK      DISKOFFS LENGTH       [COL/]OFF    DEVICE   MODE  

  dg  rootdg      759096729.1025.tweety  

  dm  disk10      c1t0d0s2  sliced      559        1044400     -  
  dm  disk20      c2t0d0s2  sliced      559        1044400     -  

  v   pubs        fsgen      ENABLED ACTIVE       2288       SELECT       -  
  pl  pubs-01     pubs       ENABLED ACTIVE       2288       CONCAT       -          RW  
  sd  disk10-01   pubs-01    disk10    0          2288       0            c0t0d0     ENA  

  v   vol8        fsgen      ENABLED ACTIVE       20480      SELECT       -  
  pl  vol8-01     vol8       ENABLED ACTIVE       20480      CONCAT       -          RW  
  sd  disk10-02   vol8-0     disk10  2288         20480      0            c0t1d0     ENA  

where dg is a disk group, dm is a disk, v is a volume, pl is a plex, and sd is a subdisk. The top few lines indicate the headers that match each type of output line that follows. Each volume is listed along with its associated plex(es) and subdisk(s).

Display volume-related information for a specific volume as follows:

 # vxprint -t volume_name

To display information about vol8, type:

 # vxprint -t tmpvol1
 Disk group: tmpdg

 V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE

 v  tmpvol1      -            ENABLED  ACTIVE   2097152  SELECT    -        fsgen

Veritas Commands Reference

Commands_ref.pdf
Table of Contents

01. Disk group related tasks
02. Disk related tasks
03. Sub-Disk related tasks
04. Plex related tasks
05. Volume related tasks
06. vxprint
07. vxedit
08. Other Useful commands


Disk group related tasks

vxdiskadd or vxdiskadm
vxdiskadd and vxdiskadm are interactive programs. It may ask you series of questions. Answer to these questions according to your requirement.

 # vxdiskadd [ all | c0t0d0 c0t1d0]  
      OR
 # vxdiskadm

To add disk c1t1d0 to a diskgroup

 # vxdiskadd c1t1d0  ( answer the questions appropriately)
        or
 # vxdiskadm 

To find out maximum size that a volume could be created in the disk group in Megabytes (free space in a DG)

 # vxassist -g appdg maxsize
 Maximum volume size: 31170560 (15220MB)

To list the available diskgroups

 # vxdg list
 NAME         STATE           ID
 tmpdg        enabled,cds          1144189106.24.ultra5
 testdg       enabled,cds          1144135936.13.ultra5

To remove disk disk01 from diskgroup dg01

 # vxdg –g  dg01  rmdisk disk01

To get tha detailed information about dg01 diskgroup

 # vxdg list dg01

To display free space available in each disk in a disk group “dg01”

 # vxdg -g tmpdg free 
 DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
 tmpdg01      c1t2d0s2     c1t2d0       4194304   31171664  -
 tmpdg02      c1t3d0s2     c1t3d0       0         35365968  -

The actual space available is LENGTH in 512b

To deport a diskgroup dg01

 # vxdg deport dg01

To import a diskgroup dg01

 # vxdg import dg01

To import a diskgroup with a newname

 # vxdg -n <new_dgname> import <old_dgname>

To destroy a diskgroup dg01

 # vxdg destroy dg01

Disk related tasks

To display the disks information

 # vxdisk list
 DEVICE       TYPE            DISK         GROUP        STATUS
 c0t0d0s2     auto:none       -            -            online invalid
 c1t2d0s2     auto:cdsdisk    tmpdg01      tmpdg        online
 c1t3d0s2     auto:cdsdisk    tmpdg02      tmpdg        online
 c1t4d0s2     auto:none       -            -            online invalid
 c1t5d0s2     auto:cdsdisk    testdg01     testdg       online
 c1t10d0s2    auto:none       -            -            online invalid
 c1t11d0s2    auto:none       -            -            online invalid
 c1t12d0s2    auto:none       -            -            online invalid

To remove the disk c1t1d0 from volume manager control

 # vxdisk rm c1t1d0

To make a disk as spare for hot relocation spare

 # vxedit set spare=on disk03

To remove a spare disk disk03 from a hot relocation spare

 # vxedit set spare=off disk03

To rename disk01 to disk03

 # vxedit rename disk01 disk03

To make disk01 offline

 # vxdisk offline disk01

To display detailed disk information about disk01

 # vxdisk -g tmpdg list testdg01
 VxVM vxdisk ERROR V-5-1-558 Disk testdg01: Disk not in the configuration
 ultra5 [/tmpfs] # vxdisk -g tmpdg list tmpdg01
 Device:    c1t2d0s2
 devicetag: c1t2d0
 type:      auto
 hostid:    ultra5
 disk:      name=tmpdg01 id=1144189105.22.ultra5
 group:     name=tmpdg id=1144189106.24.ultra5
 info:      format=cdsdisk,privoffset=256,pubslice=2,privslice=2
 flags:     online ready private autoconfig autoimport imported
 pubpaths:  block=/dev/vx/dmp/c1t2d0s2 char=/dev/vx/rdmp/c1t2d0s2
 version:   3.1
 iosize:    min=512 (bytes) max=2048 (blocks)
 public:    slice=2 offset=2304 len=35365968 disk_offset=0
 private:   slice=2 offset=256 len=2048 disk_offset=0
 update:    time=1144283192 seqno=0.7
 ssb:       actual_seqno=0.0
 headers:   0 240
 configs:   count=1 len=1280
 logs:      count=1 len=192
 Defined regions:
  config   priv 000048-000239[000192]: copy=01 offset=000000 enabled
  config   priv 000256-001343[001088]: copy=01 offset=000192 enabled
  log      priv 001344-001535[000192]: copy=01 offset=000000 enabled
  lockrgn  priv 001536-001679[000144]: part=00 offset=000000
 Multipathing information:
 numpaths:   1
 c1t2d0s2        state=enabled

To find out the free space in a particular disk "tmpdg02"

 # vxdg -g tmpdg free tmpdg01
 DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
 tmpdg01      c1t2d0s2     c1t2d0       4194304   31171664  -

The actual space available is LENGTH in 512b

To display multipath to a VM Disk

 # vxdisk path
 SUBPATH    DANAME      DMNAME     GROUP      STATE 
 c1t0d0s2   c1t0d0s2    mydg01     mydg       ENABLED 
 c4t0d0s2   c1t0d0s2    mydg01     mydg       ENABLED 
 c1t1d0s2   c1t1d0s2    mydg02     mydg       ENABLED 
 c4t1d0s2   c1t1d0s2    mydg02     mydg       ENABLED

vxdisk list command also shows the multipathing information

Sub-Disk related tasks

To create a subdisk disk01-01 on disk disk01 of size 500MB

 # vxmake sd disk01-01 disk01,0,500m

    Note: If a second subdisk is created on the same vmdisk, the offset value 0 can not be
    given. It will overlap with the existing subdisk. We can find out the free offset value
    by giving the command vxdg –g (group-name) free which is used to find out the free
    disk space in diskgroups

To associate subdisks disk01-01, disk02-01 to an existing plex plex01

 # vxsd  assoc plex01 disk01-01 disk02-01

To dissociate subdisk disk01-01 from a plex

 # vxsd dis disk01-01

To remove a subdisk sd01

 # vxedit rm sd01

To move data from subdisk sd01 to subdisk sd02

 # vxsd mv sd01 sd02

To join two subdisks sd01 and sd02 and make it as single subdisk sd03

 # vxsd join sd01 sd02 sd03

To split subdisk sd01 into two subdisks called sd04 sd05

 # vxsd –s size split sd01 sd04 sd04 (-s zize - size of the first subdisk to be created)

   Note:- if sub disk sd01 is associated with a plex before split , after split, 
          both subdisks will be associated with the same plex. become 

To display detailed information about all subdisks

 # vxprint –ls

Plex related tasks

To create a plex and associate subdisks disk01-01 and disk03-01 to the plex

 # vxmake plex plex01 sd=disk01-01,disk03-01

To create a striped plex plex01

 # vxmake plex plex01 layout=stripe stwidth=32 ncolumn=2 sd=disk01-01,disk02-01

To create a RAID5 plex called plex01

 # vxmake plex plex01 layout=raid5 stwidth=32 ncolumn=2 sd=disk01-01,    disk02-01, disk03-01

To associate (attach) a plex to an existing volume

 # vxplex  att vol01 plex01

To create a new volume and associate plex to that volume

 # vxmake –U fsgen vol vol01 plex=plex01,plex02

To Dissociate a plex from a volume

 # vxplex dis plex02

To temporarily detach a plex from a volume

 # vxplex det plex02

To remove a plex

 # vxedit -r rm  plex02

To dissociate and remove a plex from a volume (removing mirror)

 # vxplex –o rm dis plex02

To display detailed information about all plexes

 # vxprint –lp

To display detailed information about a specific plex

 # vxprint –l plex01

To make a plex called plex01 to clean state from stale state

 # vxmend fix clean plex01

To make a plex from the disabled state to stale state

 # vxmend on plex01

Volume related tasks

To create a volume vol01 with attached plexes plex01 & plex02

 # vxmake –U fsgen vol vol01 plex=plex01,plex02

Note:- -U Usage type. It should be “fsgen”, if file system to be created on that volume

To enable (start) a volume

 # vxvol start vol01

To disable (stop) a volume

 # vxvol  stop vol01

To stop all enabled volumes

 # vxvol stopall

To set the state of the volume vol01 to CLEAN

 # vxvol init clean vol01

To display detailed information about all volumes

 # vxprint –lv

To start a volume vol01, vol02 which can not be enabled

 # vxrecover –s vol01 vol02

To increase or decrease the size of the volume & file system to 500MB

 # vxresize  vol01 500m

To list all the tasks currently running on the system

 # vxtask list

To remove the volume appvol1

 # vxedit -g appvg -rf rm appvol1

vxprint

vxprint command is used to display the various information about disk, diskgroups, subdisk, plex, volume and etc... It displays the informatin from Veritas volume manager configuration.

 vxprint [-aAbcCdfGhHlLmnpPqQrstvVx] [-g diskgroup] [name...]

where:

 -d    Display only disk media records
 -G    Display only disk group records
 -g diskgroup  Display records from the specified disk group
 -p    Display only the plex records
 -s    Display only subdisk records
 -h    List  hierarchies  below  selected  records
 -l    Display all information from each selected record

To display all the available diskgroups

 # vxprint -G
 TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
 dg dg01         dg01         -        -        -        -        -       -
 dg dg02         dg02         -        -        -        -        -       -

To display details about a diskgroup

 # vxprint -g dg01
 TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
 dg dg01         dg01         -        -        -        -        -       -

 dm disk01       c1t2d0s2     -        35365968 -        -        -       -
 dm disk02       c1t3d0s2     -        35365968 -        -        -       -

 v  vol01        fsgen        DISABLED 2097152  -        ACTIVE   -       -
 pl vol01-01     vol01        DISABLED 2097152  -        ACTIVE   -       -
 sd sd01         vol01-01     ENABLED  2097152  0        -        -       -

TO display short note of volume vol1

 # vxprint -g dg01 -v vol01
 TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
 v  vol01        fsgen        DISABLED 2097152  -        ACTIVE   -       -

To get the detailed output about a volume

 # vxprint -g dg01 -lv vol01
 Volume:   vol01
 info:     len=2097152
 type:     usetype=fsgen
 state:    state=ACTIVE kernel=DISABLED cdsrecovery=0/0 (clean)
 assoc:    plexes=vol01-01
 policies: read=SELECT (round-robin) exceptions=NO_OP
 flags:    closed writeback
 logging:  type=REGION loglen=0 serial=0/0 mapalign=0 maplen=0 (disabled)
 apprecov: seqno=0/0
 recovery: mode=default
 recov_id=0
 device:   minor=34000 bdev=272/34000 cdev=272/34000 path=/dev/vx/dsk/dg01/vol01
 perms:    user=root group=root mode=0600
 guid: {5d61a4fe-1dd2-11b2-8e6d-080020b5a36b}

vxedit

The vxedit utility can be used to rename/remove the disks, subdisks, plex and volume information from the veritas configuration.

  vxedit [-dpPsvV ] [-g diskgroup] rename oldname newname

  vxedit [-dfpPrsvV ] [-g diskgroup] rm name...

  vxedit  [-dfGpPrsvV  ]  [-e  pattern]  [-g  diskgroup]   set
      attribute=value...  [name...]

where:

 -d  for disk operation
 -p  for plex operation
 -s  for subdisk operation
 -v  for volume operation
 -G  for Disk group operation
 -f  Force an operation
 -r  Operate recursively on records associated with the selected  records
     For  selected volume records, this affects associated plex, subdisk, 
     and  subvolumes  records.   For  selected plex records, this affects 
     associated subdisk and subvolume records

To remove appvol1 including the associated plex and subdisks

 # vxedit -g appvg -rf rm appvol1

Note: if the above command tried with out the '-r' option, it will fail saying there are associated plexes.

 # vxedit -g dg01 -f rm vol01
 VxVM vxedit ERROR V-5-1-1189 Volume vol01 has associated plexes

To remove a plex plex01 along with associated sub-disks

 # vxedit -g appvg -rf rm plex01

To rename a plex name from plex-old to plex-new

 # vxedit -g dg01 -p rename plex-old plex-new

Some use ful commands

vxtask:vxtask command is used to administer operations on VxVM tasks that are running on the system. Operations include listing tasks, modifying the state of a task (pausing, resuming, aborting) and modifying the rate of progress of a task.

  vxtask abort taskid

  vxtask  [-ahlpqr  ]  [-g  dg_name  [-g  dg_name...]]    [[-G
     dg_name]   -v  volume  [-v  volume...]]   [-i  taskid]  list
     [taskid...]

  vxtask pause taskid

  vxtask resume taskid

To list all tasks currently running on the system

 # vxtask list

To print tasks hierarchically, with child tasks following the parent tasks

 # vxtask -h list

LINUX Vxdisk command tips

 [root@system7044 root]# vxdisk list
 DEVICE       TYPE            DISK         GROUP        STATUS
 sda          auto:sliced     rootdisk     rootdg       online
 sdb          auto:sliced     appdg01      appdg        online

 [root@system7044 root]# vxdisk list sda
 Device:    sda
 devicetag: sda
 type:      auto
 hostid:    system7044
 disk:      name=rootdisk id=1188098145.7.system7044
 group:     name=rootdg id=1188098145.9.sytem7044
 info:      format=sliced,privoffset=1,pubslice=3,privslice=6
 flags:     online ready private autoconfig autoimport imported
 pubpaths:  block=/dev/vx/dmp/sda3 char=/dev/vx/rdmp/sda3
 privpaths: block=/dev/vx/dmp/sda6 char=/dev/vx/rdmp/sda6
 version:   2.1
 iosize:    min=512 (bytes) max=256 (blocks)
 public:    slice=3 offset=0 len=71665902 disk_offset=63
 private:   slice=6 offset=1 len=2047 disk_offset=71663917
 update:    time=1188098305 seqno=0.8
 ssb:       actual_seqno=0.0
 headers:   0 248
 configs:   count=1 len=1481
 logs:      count=1 len=224
 Defined regions:
 config   priv 000017-000247[000231]: copy=01 offset=000000 enabled
 config   priv 000249-001498[001250]: copy=01 offset=000231 enabled
 log      priv 001499-001722[000224]: copy=01 offset=000000 enabled
 Multipathing information:
 numpaths:   2
 sda     state=enabled
 sdc     state=enabled 
Tips

01. To exclude disks from Volume Manager control

Create a file called /etc/vx/disks.exclude and place the disk name into this file

 # cat /etc/vx/disks.exclude
 c1t1d0
 c1t2d0

02. To exclude controllers from Volume Manager control

Create a file called /etc/vx/cntrls.exclude and place the disk name into this file

 # cat /etc/vx/cntrls.exclude
 c1
 c5

03. To make the new disks detected under Veritas

 Make sure the new disks are labled
 vxdctl enable
 vxdisk scandisks new

VCS

Service Group: It is a logical grouping of resources and resource dependencies.

Types of Service Groups:

01. Failover Service Groups
02. Parallel Service Groups
03. Hybrid Service Groups
04. ClusterService Group

The ClusterService group is a special purpose service group, which contains resources required by VCS components. The group contains resources for Cluster Manager (Web Console), Notification, and the wide-area connector (WAC) process used in global clusters.

The ClusterService group can fail over to any node despite restrictions such as “frozen.” It is the first service group to come online and cannot be autodisabled. The group comes online on the first node that goes in the running state. The VCS engine discourages taking the group offline manually.

High-Availability Daemon (HAD)
The high-availability daemon, or HAD, is the main VCS daemon running on each system. It is responsible for building the running cluster configuration from the configuration files, distributing the information when new nodes join the cluster, responding to operator input, and taking corrective action when something fails. It is typically known as the VCS engine. The engine uses agents to monitor and manage resources. HAD operates as a replicated state machine (RSM). This means HAD running on each node has a completely synchronized view of the resource status on each node

Group Membership Services/Atomic Broadcast (GAB)
The Group Membership Services/Atomic Broadcast protocol (GAB) is responsible for cluster membership and cluster communications. 
Netbackup

Adding New media volumes

01. On the LHS pane, epand Media and device management

02. Click on Media and expand it

03. Top menu bar, Actions --> New --> Volumes

04. Choose the number of Volumes, type the Media ID (if you are importing from other servers)

05. Click OK
Importing Netbackup tape From another netbackup server

01. Login to the Netbackup Administration Console. This administration control software can be installed on a windows PC and accessed from the PC. In Solaris, this can be accessed using the following command.

 /opt/openv/netbackup/bin/jnbSA

02. To import, Click catalog on the LHS Pan

03. Click Actions --> Intiate Import

04. Click the appropriate Media ID to import

05. Click OK to continue

steps 06 through 10 are optional if you do not have automated tape library.

06. Load the media on the tape drive if not already loaded

07. On the LHS pan, Click on Device Monitor

08. On the top RHS, Select the appropriate Tape drive

08. On the top menu bar, Click Actions --> UP Drive, Operator Control

09. On the bottom RHS, select the appopriate media to import. Right click and select "assign request"

10. This will start the "initiate import" process. This may take up to five minutes. Once, this is completed, we need to do the actual import and update the catalog.

To start the actual import continue doing the follows.

11. On the LHS side, Click on Catalog again

12. On the RHS side, select the right date range and click search now.

13. On the bottom RHS, the new media will appear now.

14. Select the new media to import on the bottom side.

15. Right click and select Import or Actions --> Import

16. Continue steps 6 thru 10 if automatic tape library is not present.

SAN

SAN

Storage Area Networks

SAN introduces the flexibility of networking to enable one server or many heterogeneous servers to share a common storage utility, which may comprise many storage devices, including disk, tape, and optical storage. And, the storage utility may be located far from the servers that use it.
SAN allows any-to-any connection across the network, using interconnect elements such as routers, gateways, hubs, switches, and directors. It eliminates the traditional dedicated connection between a server and storage, and the concept that the server effectively owns and manages the storage devices. 

EMC

01. Symmmetrix Device masking Command line interface
    1.1 Adding HBA access to Symmetrix Devices
    1.2 Removing HBA Access to Symmetrix Devices
    1.3 Mapping Symmetrix devices to a director and port
    Powerpath CLI commands
    Powermt command options
    Powermt command examples
    Powermt Command Examples with outputs

Symcli commands


To list all the Symmetrix systems
 # syscfg list
To list all the Logical volumes assigned to director 9b
 # symcfg -dir 9b -address -available list

 # symcfg -sid 0039 -sa all list

 # syscfg -sid 0880 -fa 16A -p1 -address -available list

Adding HBA Access to Symmetrix Devices


01. List devices mapped to the FA director that you will be configuring (for example, director 16A).
 # symcfg -sid 0280 list -FA 16A -addr
02. Make an entry for the HBA-to-FA connection in the VCMDB2, specifying devices that the HBA can access. For example, add a range of devices (0030 through 0034and 0038) to the VCMDB on the Symmetrix array (sid 814), specifying the HBA's WWN and the FA director/port that the HBA connects to.
 # symmask sid 814 -wwn 20000000c920b484 add devs 0030:0034,0038 -dir 16A -p 0
03. Back up the revised VCMDB to a file (for example, a file called MyDevMaskBackup).
 # symmask -sid 814 backup file MyDevMaskBackup
04.Refresh the WWN-related profile tables in the Symmetrix cache with the latest VCMDB data
 # symmak -sid 814 refresh

Removing HBA Access to Symmetrix Devices


To remove 0030 and 0031 devices that was added previously:
 # symmask sid 814 -wwn 20000000c920b484 remove devs 0031,0033 -dir 16A -p 0
To remove the remaining devices in the 0030-to-0034 device range, you can specify individual devices or the range with an option (force) that allows you to remove a noncontiguous range. For example:
 # symmask sid 814 -wwn 20000000c920b484 remove devs 0030:0034 -dir 16A -p 0 -force
To remove the entire set of devices that an HBA can access, use symmask delete and specify the WWN of the HBA. The delete action removes the HBA entry completely, including any attributes set previously. For example:
 # symmask sid 814 delete -wwn 20000000c920b484

Mapping Symmetrix devices to a director and port


1a. Obtain a list of used addresses, including the next available address
 # symcfg list -SA all -address -available
1b. Obtain list of used addresses, including the next available mapped to director 13B
 # symcfg -sid 1188 list -dir 13b -address -available list
02. Create a mapfile (map_1) with list of LUNs to be mapped to director 13bA
 map dev 02c7 to dir 13B:0 target=0 lun=0f8 ;
 map dev 02c8 to dir 13B:0 target=0 lun=0f9 ; 
 map dev 02c9 to dir 13b:0 target=0 lun=0fa ;
03. run the symconfigure command
 # symconfigure -sid 1188 -f map_1 commit

Other commands

To list all the LUNS accessible by HBA with WWN 10...xxxxxx
 # symmaskdb -sid 0665 -wwn 10...xxxxxx list devs
To delete client HBA form VCMDB
 # symmask -sid 0665 -wwn 10.....xxxxxx delete
 # symmask -sid 0665 refresh
To list all the HBAs logged in to DIR 4b and port 0 (4bA)
 # symmask -sid 0280 -dir 4b -p1 list logins

fpath commands


 # fpath adddev
 # fpath chgname
To refresh Volume Logic Database
 # fpath refresh
To backup Volume logix database
 # fpath backupdb

Powerpath


Powerpath CLI Commands
Command Description
powermt Manages a PowerPath environment
powercf Configures PowerPath devices
emcpreg -install Manages PowerPath license registration
emcpminor Checks for free minor numbers
emcpupgrade Converts PowerPath configuration files
powermt command
Command Description
powermt check Checks for, and optionally removes, dead paths.
powermt check_ registration Checks the state of the PowerPath license.
powermt config Configures logical devices as PowerPath devices.
powermt display powermt watch Displays the state of HBAs configured for PowerPath. powermt watch is deprecated.
powermt display options Displays the periodic autorestore setting.
powermt load Loads a PowerPath configuration.
powermt remove Removes a path from the PowerPath configuration.
powermt restore Tests and restores paths.
powermt save Saves a custom PowerPath configuration.
powermt set mode Sets paths to active or standby mode.
powermt set periodic_autorestore Enables or disables periodic autorestore.
powermt set policy Changes the load balancing and failover policy.
powermt set priority Sets the I/O priority
powermt version Returns the number of the PowerPath version for which powermt was created.

powermt command examples

powermt display:
 # powermt display paths class=all
 # powermt display ports dev=all
 # powermt display dev=all
powermt set:
To disable a HBA from passing I/O
 # powermt set mode=standby adapter=<adapter#> 
To enable a HBA from passing I/O
 # powermt set mode=active adapter=<adapter#> 
To set or validate the Load balancing policy
To see the current load-balancing policy and I/Os run the following command
 # powermt display dev=<device> 
  • so = Symmetrix Optimization (default)
  • co = Clariion Optimization
  • li = Least I/Os (queued)
  • lb = Least Blocks (queued)
  • rr = Round Robin (one path after another)
  • re = Request (failover only)
  • nr = No Redirect (no load-balancing or failover)
To set to no load balancing
 # powermt set policy=nr dev=<device> 
To set the policy to default Symmetrix Optimization
 # powermt set policy=so dev=<device>
To set the policy to default Clariion Optimization
 # powermt set policy=co dev=<device>

pprootdev

To bring the rootvg devices under powerpath control
 # pprootdev on
To bring back the rootvg disks back to hdisk control
 # pprootdev off
To temporarily bring the rootvg disks to hdisk control for running "bosboot"
 # pprootdev fix

powermt command examples with output

To validate the installation
  # powermt check_registration
  Key B3P3-HB43-CFMR-Q2A6-MX9V-O9P3
    Product: PowerPath
    Capabilities: Symmetrix CLARiiON
To display each device's path, state, policy and average I/O information
 # powermt display dev=emcpower6a
 Pseudo name=emcpower6a
 Symmetrix ID=000184503070
 Logical device ID=0021
 state=alive; policy=SymmOpt; priority=0; queued-IOs=0
 
 ---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
 ### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
 
   0 sbus@2,0/fcaw@2,0         c4t25d225s0 FA 13bA   active  dead       0      1
   1 sbus@6,0/fcaw@1,0         c5t26d225s0 FA  4bA   active  alive      0      0
To show the paths and dead paths to the storage port
 # powermt display paths
 Symmetrix logical device count=20
 
 ----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
 ### HW Path                            ID          Interface     Total    Dead
 
   0 sbus@2,0/fcaw@2,0             000184503070      FA 13bA         20      20
   1 sbus@6,0/fcaw@1,0             000184503070      FA  4bA         20       0

 CLARiiON logical device count=0
 
 ----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
 ### HW Path                            ID          Interface     Total    Dead
 
To display the storage ports information
 # powermt display ports
 Storage class = Symmetrix
 
 ----------- Storage System ---------------     -- I/O Paths --   --- Stats ---
     ID              Interface         Wt_Q      Total    Dead    Q-IOs  Errors
 
     000184503070     FA 13bA           256         20      20        0      20
     000184503070     FA  4bA           256         20       0        0       0

 Storage class = CLARiiON
 
 ----------- Storage System ---------------     -- I/O Paths --   --- Stats ---
     ID              Interface         Wt_Q      Total    Dead    Q-IOs  Errors
 

Powerpath on HP-UX

powermt display dev=all
CLARiiON ID=APM00080702201 [AEMSAQC1]
Logical device ID=6006016035901E000ABE8A31B53CDD11 [LUN 12]
state=alive; policy=BasicFailover; priority=0; queued-IOs=0
Owner: default=SP A, current=SP B
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
  10 0/3/1/0.1.0.0.0.0.1       c10t0d1   SP A5     unlic   alive      0      0
  11 0/3/1/0.2.0.0.0.0.1       c11t0d1   SP B5     unlic   alive      0      0
  12 0/7/1/0.1.0.0.0.0.1       c12t0d1   SP A4     active  alive      0      0
  13 0/7/1/0.2.0.0.0.0.1       c13t0d1   SP B4     active  alive      0      0

powermt set policy=co dev=all

powermt display dev=all
CLARiiON ID=APM00080702201 [AEMSAQC1]
Logical device ID=6006016035901E000ABE8A31B53CDD11 [LUN 12]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP B
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
  10 0/3/1/0.1.0.0.0.0.1       c10t0d1   SP A5     active  alive      0      0
  11 0/3/1/0.2.0.0.0.0.1       c11t0d1   SP B5     active  alive      0      0
  12 0/7/1/0.1.0.0.0.0.1       c12t0d1   SP A4     active  alive      0      0
  13 0/7/1/0.2.0.0.0.0.1       c13t0d1   SP B4     active  alive      0      0


Clarrion Storage

Snapview Clone and Snapview Snapshots

EMC SnapView is a storage-system-based software application that allows you to create a copy of a LUN by using either clones or snapshots. A clone is an actual copy of a LUN and takes time to create, depending on the size of the source LUN. A snapshot is a virtual point-in-time copy of a LUN which tracks differences to your original data, and takes only seconds to create.
SnapView has the following important benefits:
  • It allows full access to a point-in-time copy of your production data with modest impact on performance and without modifying the actual production data.
  • For decision support or revision testing, it provides a coherent, readable and writable copy of real production data.
  • For backup, it practically eliminates the time that production data spends offline or in hot backup mode. And it offloads the backup overhead from the production server to another server.
  • It provides instantaneous data recovery if the source LUN becomes corrupt. You can perform a recovery operation on a clone by initiating a reverse synchronization and on a snapshot session by initiating a rollback operation.

Clones

A clone is a complete copy of a source LUN. You specify a source LUN when you create a clone group. The copy of the source LUN begins when you add a clone LUN to the clone group. The software assigns each clone a clone ID. This ID remains with the clone until you remove the clone from its group.
While the clone is part of the clone group and unfractured, any production write requests made to the source LUN are simultaneously copied to the clone. Once the clone contains the desired data, you can fracture the clone. Fracturing the clone separates it from its source LUN, after which you can make it available to a secondary server.

Snapshot

A snapshot is a virtual LUN that allows a secondary server to view a point-in-time copy of a source LUN. You determine the point in time when you start a SnapView session. The session keeps track of the source LUN’s data at a particular point in time. A snapshot is a composite of the unchanged data chunks on the source LUN and data chunks on the reserved LUN.
During a session, the production server can still write to the source LUN and modify data. When this happens, the software stores a copy of the original point-in-time data on a reserved LUN in the reserved LUN pool. This operation is referred to as copy-on-first-write because it occurs only when a data chunk is first modified on the source LUN.
Create and activate a snapshot
01. Select the Source LUN to which the snapshot to be created. Start a SnapView Session. Provide a unique name to the SnapView Session. Once, the session is started, this will start copying the original data to Reserved LUN pool when ever the source LUN data is changed.
02. Create snapshot for the LUN. Give unique name for the snapshot. This snapshot is a virtual LUN that allows a secondary server to view a SnapView session. An active snapshot is a composite of a source LUN and reserved LUN data that lasts until you destroy the snapshot.
03. Add this snapshot to the appropriate storage group so that the hosts can access the snapshot.
04. Activate the snapshot. The Navisphere Manager activate option maps the snapshot to a SnapView session. The secondary server must be rebooted, or use some other means, so that this server recognizes the new device created when SnapView session started.
Deactivating a snapshot:
The deactivate option unmaps a snapshot from a SnapView session and destroys any secondary server writes made to the snapshot. The snapshot and session still exist but are not visible from the secondary server. The deactivate function is available only when a snapshot is active.
Stopping a SnapView session
Stopping a SnapView session ends the session’s point-in-time copy. Stopping the last SnapView session of a source LUN frees the reserved LUN(s) used by the session and any SP memory used to maintain the session image. The newly freed reserved LUN(s) becomes available for another session. Stopping a session also changes the snapshots' status from active to inactive.
Destroying a snapshot
If the snapshot is inactive, the software destroys only the selected snapshot.
If the snapshot is active, a warning message appears indicating that you should deactivate the snapshot before destroying it. If you accept the warning message, the software deactivates the snapshot, and destroys it (the snapshot) and any server writes made to the snapshot.
If the snapshot belongs to a storage group(s), an error message appears indicating that you cannot destroy a snapshot that is in a storage group. Remove the snapshot from the storage group(s), and then destroy the snapshot.

Navisphere Agent

Creating the Navisphere Agent file: agentID.txt
If you have a multihomed host and are running like :
  • IBM AIX,
  • HP-UX,
  • Linux,
  • Solaris,
  • VMware ESX Server (2.5.0 or later), or
  • Microsoft Windows
you must create a parameter file for Navisphere Agent, named agentID.txt
About the agentID.txt file:
This file, agentID.txt (case sensitive), ensures that the Navisphere Agent binds to the correct HBA/NIC for registration and therefore registers the host with the correct storage system. The agentID.txt file must contain the following two lines:
Line1: Fully-qualified hostname of the host Line 2: IP address of the HBA/NIC port that you want Navisphere Agent to use For example, if your host is named host28 on the domain mydomain.com and your host contains two HBAs/NICs, HBA/NIC1 with IP address 192.111.222.2 and HBA/NIC2 with IP address 192.111.222.3, and you want the Navisphere Agent to use NIC 2, you would configure agentID.txt as follows:
host28.mydomain.com 192.111.222.3
To create the agentID.txt file, continue with the appropriate procedure for your operating system:
For IBM AIX, HP-UX, Linux, and Solaris:
  1. Using a text editor that does not add special formatting, create or edit a file named agentID.txt in either / (root) or in a directory of your choice.
  2. Add the hostname and IP address lines as described above. This file should contain only these two lines, without formatting.
  3. Save the agentID.txt file.
  4. If you created the agentID.txt file in a directory other than root, for Navisphere Agent to restart after a system reboot using the correct path to the agentID.txt file, set the environment variable EV_AGENTID_DIRECTORY to point to the directory where you created agentID.txt.
  5. If a HostIdFile.txt file is present in the directory shown for your operating system, delete or rename it. The HostIdFile.txt file is located in the following directory for your operating system:
    AIX :- /etc/log/HostIdFile.txt
    HP-UX :- /etc/log/HostIdFile.txt
    Linux :- /var/log/HostIdFile.txt
    Solaris :- /etc/log/HostIdFile.txt
  6. Stop and then restart the Navisphere Agent.
    NOTE: Navisphere may take some time to update, however, it should update within 10 minutes.
  7. Once the Navisphere Agent has restarted, verify that Navisphere Agent is using the IP address that is entered in the agentID.txt file. To do this, check the new HostIdFile.txt file. You should see the IP address that is entered in the agentID.txt file.The HostIdFile.txt file is in the following directory for your operating system:
    AIX :/etc/log/HostIdFile.txt
    HP-UX :/etc/log/HostIdFile.txt
    Linux :-/var/log/HostIdFile.txt
    Solaris :-/etc/log/HostIdFile.txt
For VMware ESX Server 2.5.0 and later
  1. Confirm that Navisphere agent is not installed.
  2. Using a text editor that does not add special formatting, create or edit a file named agentID.txt in either / (root) or in a directory of your choice.
  3. Add the hostname and IP address lines as described above. This file should contain only these two lines, without formatting.
  4. Save the agentID.txt file.
  5. If you created the agentID.txt file in a directory other than root, for subsequent Agent restarts to use the correct path to the agentID.txt file, set the environment variable EV_AGENTID_DIRECTORY to point to the directory where you created agentID.txt.
  6. If a HostIdFile.txt file is present in the /var/log/ directory, delete or rename it.
  7. Reboot the VMWARE ESX server.
  8. Install and start Navisphere Agent and confirm that it has started.
    NOTE: Navisphere may take some time to update, however, it should update within 10 minutes.
  9. Once the Navisphere Agent has restarted, verify that Navisphere Agent is using the IP address that is entered in the agentID.txt file. To do this, check the new HostIdFile.txt file which is located in the /var/log/ directory. You should see the IP address that is entered in the agentID.txt file.
For Microsoft Windows:
  1. Using a text editor that does not add special formatting, create a file named agentID.txt in the directory C:/ProgramFiles/EMC/Navisphere Agent.
  2. Add the hostname and IP address lines as described above. This file should contain only these two lines, without formatting.
  3. Save the agentID.txt file.
  4. If a HostIdFile.txt file is present in the C:/ProgramFiles/EMC/Navisphere Agent directory, delete or rename it.
  5. Restart the Navisphere Agent
  6. Once the Navisphere Agent has restarted, verify that Navisphere Agent is using the correct IP address that is entered in the agentID.txt file. Either:
  7. In Navisphere Manager, verify that the host IP address is the same as the IP address that you you entered in the agentID.txt file. If the address is the same, the agentID.txt file is configured correctly.
  8. Check the new HostIdFile.txt file. You should see the IP address that is entered in the agentID.txt file. 

Celerra

 $ nas_server -list
 id      type  acl  slot groupID  state  name
 1        1    0     2              0    server_2
 2        4    0     3              0    server_3
server_export: Exports file systems, and manages access on the specified Data Mover(s) for NFS and CIFS clients

 $ server_export server_2 -o anon=0 /dir1
 $ server_export server_2 -i -o server_export server_2 -o anon=0 /tools/site/tools/kickstart /tools
Note: -i (ignore) over writes the previous options and comments
 $ server_export server_2
 export "/dir1" anon=0
 export "/tools" rw=allhosts root=server1:server2 access=allhosts
To extend a filesystem
 nas_fs -xtend tools size=50G pool=clarata_archive

Quota

To edit the default user and group quota for a filesystem
 $  nas_quotas -edit -config -fs home1
The system opens an edit session as shown in the Output table that follows. Edit it as required.
File System Quota Parameters:
fs "home1"
        Block Grace: (1.0 weeks)
        Inode Grace: (1.0 weeks)
        * Default Quota Limits:
            User: block (soft = 13670400, hard = 15728640) inodes (soft = 0, hard= 0)
            Group: block (soft = 0, hard = 0) inodes (soft = 0, hard= 0)
        Deny disk space to users exceeding quotas: (yes)
        * Generate Events when:
            Quota check starts:          (no)
            Quota check ends:            (no)
            soft quota crossed:          (no)
            hard quota crossed:          (yes)
To edit a quota for user id 500 for file system fs1 (The bellow command will open a vi screen. Edit it as per requirement)
 $ nas_quotas  -edit -user -fs fs1 500
 Userid : 501
 fs "fs1" blocks (soft = 29360128, hard = 31457280) inodes (soft = 0, hard = 0)
To view the quota usage of user ID 501 for file system /home
 $ nas_quotas -report -user -fs home2 501
 Report for user quotas on filesystem home2 mounted on /home
 +------------+-----------------------------------+-------------------------------+
 |User        |         Bytes Used  (1K)          |            Files              |
 +------------+--------+--------+--------+--------+--------+------+------+--------+
 |            |   Used |  Soft  |  Hard  |Timeleft|   Used | Soft | Hard |Timeleft|
 +------------+--------+--------+--------+--------+--------+------+------+--------+
 |#501        | 3960316|29360128|31457280|        |     188|     0|     0|        |
 +------------+--------+--------+--------+--------+--------+------+------+--------+

To list quota usage for all users
 $ nas_quotas -report -user -fs home all
 

IBM

Subsystem Device Driver(SDD)
To remove hdisks corresponding to IBM ESS devices
 # lsdev -Ct2105* -Fname | xargs -n1 rmdev -dl
To remove all the SDD disks (Vpaths)
 # rmdev -dl dpo -R

DS8000 Terms and Concepts

Storage complex
A storage complex is a group of DS8000s managed by a single S-HMC (Storage Hardware Management Console). It may consist of a single DS8000 storage unit. A storage complex is sometimes referred to as a storage-plex.
Storage facility
Storage facility refers to a single DS8000 unit (including the base frame and the optional expansion frames). A storage facility is also referred to as a storage unit. As an example, if your organization has one DS8000, then you have a single storage complex that contains a single storage unit.
Processor complex
Processor complex refers to one of the Power5 servers which runs, controls, and delivers all the services of the DS8000. There are two processor complexes in one storage facility: processor complex 0 and processor complex 1. Each processor complex can support one or more LPARs concurrently.
Logical partition (LPAR)
An LPAR uses software and firmware to logically partition the resources on a system. An LPAR consists of processors, memory, and I/O slots available in one processor complex.
Storage facility image (SFI)
A storage facility image consists of two LPARs, one on each processor complex in a storage facility. A storage facility image is capable of performing all functions of a storage server from the host's perspective. More than one SFI can be configured on a storage facility. A storage facility image might also be referred to as a storage image.
Storage facility image server
One SFI consists of two LPARs; each LPAR hosts a storage facility image server running a specific AIX instance. Thus, one SFI has two storage facility image servers, often referred as Server 0 and Server 1.
Array site
An array site is a group of 8 DDMs selected by the DS8000 server algorithm in a storage facility image. An array site is managed by one storage facility image.
Array
Each array site can be individually formatted by the user to a specific RAID format. A formatted array site is called an array. The supported RAID formats are RAID-5 and RAID-10. The process of selecting the RAID format for an array is also called defining an array.
Rank
A rank is defined by the user. The user selects an array and defines the storage format for the rank, which is either Count Key Data (CKD) or Fixed Block (FB) data. One rank will be assigned to one extent pool by the user.
Extents
The available space on each rank is divided into extents. The extents are the building blocks of the logical volumes. The characteristic of the extent is its size, which depends on the specified device type when defining a rank:
    For fixed block format, the extent size is 1 GB.
    For CKD format, the extent size is .94GB for model 1.
Extent pools
An extent pool refers to a logical construct to manage a set of extents. The user defines extent pools by selecting one to N ranks managed by one storage facility image. The user defines which storage facility image server (Server 0 or Server 1) will manage the extent pool. All extents in an extent pool must be of the same storage type (CKD or FB). Extents in an extent pool can come from ranks defined with arrays of different RAID formats, but the same RAID configuration within an extent pool is recommended. The minimum number of extent pools in a storage facility image is two (each storage facility image server manages a minimum of one extent pool).
Rank groups
Ranks are organized in two rank groups:
    Rank group 0 is controlled by server 0.
    Rank group 1 is controlled by server 1.
Logical volume
A logical volume is composed of a set of extents from one extent pool.
    A logical volume composed of fixed block extents is called a LUN.
    A logical volume composed of CKD extents is referred to as a CKD volume or logical device.
Logical subsystem
A logical subsystem (LSS) is a logical construct grouping logical volumes. One LSS can group up to 256 logical volumes from extent pools. The user can define up to 255 LSSs in a storage facility image with the following restriction: the logical volumes in one LSS must be of extent pools with identical extent types and from the same rank pool in one storage facility image. As a result, LSSs are either CKD or FB and have affinity with one storage facility image server. Up to 128 LSSs can be managed by Server 0 and up to 127 LSSs can be managed by Server 1 (one LSS address is reserved).
Address group
An address group refers to a group of LSSs. Up to 16 LSSs can be grouped into one address group. All LSSs in an address group must be of the same format (CKD or FB). The address groups are defined by the user. A storage facility image can manage up to 16 address groups.
Host attachment
One host attachment is a named group of World Wide Port Names (WWPNs) defined by the user. The definition of host attachment is necessary to manage the LUN masking. One WWPN can be defined in only one host attachment. The user assigns one host attachment to one volume group. Each WWPN in the host attachment will get access to all of the LUNs defined in the volume group.
Volume group
The user gathers LUNs into volume groups. The definition of volume groups is necessary to manage the LUN masking. One LUN can be defined in several volume groups. One volume group can be assigned to several host attachments.
Volumegroups are added to Host Ports
Host ports are assigned to IO ports
 
 

HP

AutoPath

To remove hdisks corresponding to Hitachi Lightning and HP
# lsdev -CtHitachi* -Fname | xargs -n1 rmdev -dl
To remove all the dlm drives from the system
# dlmrmdev
To get the detailed information of all the LUNS
# xpinfo -l Scanning disk devices...
Device File : /dev/rhdisk17 Model : XP1024
Port : CL1E Serial # : 00040318 Host Target : --- Code Rev : 2108
Array LUN : 00 Subsystem : 0004 CU:LDev : 00:69 CT Group : --- Type : OPEN-V CA Volume : SMPL Size : --- BC0 (MU#0) : SMPL ALPA : e1 BC1 (MU#1) : SMPL Loop Id : 04 BC2 (MU#2) : SMPL SCSI Id : 0x610813 RAID Level : RAID5 FC-LUN : 0000000000000000 RAID Group : 2-9 Port WWN : 50060e80039d7e04 ACP Pair : 2 Disk Mechs : R1408 R1508 R1608 R1708
Device File : /dev/rhdisk2 Model : XP1024
Port : CL2E Serial # : 00040318 Host Target : --- Code Rev : 2108
Array LUN : 00 Subsystem : 0004 CU:LDev : 00:69 CT Group : --- Type : OPEN-V CA Volume : SMPL Size : --- BC0 (MU#0) : SMPL ALPA : c9 BC1 (MU#1) : SMPL Loop Id : 14 BC2 (MU#2) : SMPL SCSI Id : 0x620813 RAID Level : RAID5 FC-LUN : 0000000000000000 RAID Group : 2-9 Port WWN : 50060e80039d7e14 ACP Pair : 2 Disk Mechs : R1408 R1508 R1608 R1708
There are two ways to limit the DLM drivers managed by HDLM:
- Define the disks (hdisk) that you would like the DLM driver to recognize in the /usr/DynamicLinkManager/drv/dlmfdrv.conf file. - Define the disks that you would not like the DLM driver to recognize in the /usr/DynamicLinkManager/drv/dlmfdrv.unconf file.
A specification in the dlmfdrv.unconf file has priority over a specification in the dlmfdrv.conf file. Therefore, if the same disk is defined in both the dlmfdrv.conf and dlmfdrv.unconf files, the DLM driver will not recognize the defined disk
To start or stop the HDLM Manager
# startsrc -s DLMManager # stopsrc -s DLMManager
To list all the HDLM drivers
# lsdev -C | grep dlm dlmadrv Available DLM Alert Driver dlmfdrv Available DLM Driver dlmfdrv5 Available DLM Driver
  • dlmfdrv is the driver instance for internal management.
  • dlmfdrv5 (5 indicate the instance numbers of drivers)
  • dlmadrv is the file name of the DLM alert driver.
HDLM Commands operation
# dlnkmgr operation-name [parameter [parameter-value]]
To clears statistics such as the path error count
# dlnkmgr clear -pdst
To make an online path to offline
# dlnkmgr offline -pathid 1 -s KAPL01022-I 1 path(s) were processed. Operation name = offline KAPL01001-I The DLM command completed successfully. Operation name = offline
To set various options
# dlnkmgr set <parameters>
Parameters for the Set Command
-lb{on|off} Enables or disables the load balancing function. Default = on. -ellv log-level The level of error information you want to collect in the error log. Default = 3 -afb{on[-intvl execution- interval]|off} on: Enables automatic failback execution interval: in minutes. Can be set from 1 to 1440 minutes.
To display the path or drive details
# dlnkmgr view -path # dlnkmgr view -drv
Problem: In AIX, hdisk devices are getting PVIDs instead of dlmfdrv drives.
Sol: Make sure the the hdisk names which are to be controlled by DLM are there in /usr/DynamicLinkManager/drv/dlmfdrv.conf file. If any of the hdisk names are missing, add it there.

XP Storage works XP series storage


HP XP 1024 - Creating Business copy
Creating LUSE Volume Login to Storage work command view GUI Click on LUN and VOL management Click on Vol Management ICON Expand LDEV Select the appropriate CU unit (ie. CU-8) (which has enough LDEV we required) select the starting LDEV and number of counts (for total size) and click set and apply The above step create the LUSE volume Assinging LUSE Volume PATH Click on LUN management ICON Expand the Fibre Expand the appropriate controller (ie. CL1-R) Select the appropriate system On the LDEV section select the CU (ie. CU-8) Select the LUSE name created in the LDEV section Go to LUN section and go to the last empty field and click on the "Add LU path" Copy the Path and paste in to other alternate path control unit (ie CL2-R) click on apply This process create the 2 paths to the created LUN Creating Business copy Click on the BC tab Select the system LUN which you want to create the BC ( CL1-A -> systemname001 -> LUSE name ) Right click on the LUSE and select create pair Select the port (CL1-R) Select the LUSE created from above process and click on set and apply 
 

Switches

Brocase switches

Some Usefull Brocade Switch commands
 aliadd                     Add a member to a zone alias
 alicreate                  Create a zone alias
 alidelete                  Delete a zone alias
 aliremove                  Remove a member from a zone alias
 alishow                    Print zone alias information

 cfgadd                     Add a member to a configuration
 cfgclear                   Clear all zone configurations
 cfgcreate                  Create a zone configuration
 cfgdelete                  Delete a zone configuration
 cfgdisable                 Disable a zone configuration
 cfgenable                  Enable a zone configuration
 cfgremove                  Remove a member from a configuration
 cfgsave                    Save zone configurations in flash
 cfgshow                    Print zone configuration information
 cfgsize                    Print size details of zone database
 cfgtransabort              Abort zone configuration transaction
 cfgtransshow               Print zone configurations in transaction buffer

 fabportshow                Display contents of a particular port's data
 fabricshow                 Print fabric membership info
 fabstateclear              Clears the fabric state information
 fabstateshow               Displays the fabric state information
 fabstatsshow               Displays the fabric statistics information
 fabswitchshow              Display fabric switch state information

 nsaliasshow                Display local Name Server information with Aliases
 nsallshow                  Print global Name Server information
 nscamshow                  Print local Name Server Cache information
 nsshow                     Print local Name Server information information
 nszonemember               Display the information of all the online devices

 switchshow                 Print switch and port status
 switchuptime               Displays the amount of time for which the switch is up

 portdisable                Disable a specified port
 portenable                 Enable a specified port

 zoneadd                    Add a member to a zone
 zonecreate                 Create a zone
 zonedelete                 Delete a zone
 zonehelp                   Print zoning help info
 zoneremove                 Remove a member from a zone
 zoneshow                   Print zone information 

Cookbook to create a zone and add it to a config

01. Create the alias for the Device WWNs
 swd77:admin> alicreate "ET_CM0_CA0_P1", "21:40:00:0b:5d:6a:05:82"
 swd77:admin> alicreate "test1_fcd0", "50:01:43:80:03:3a:86:ca"
02. Create a new zone called test1
 swd77:admin> zonecreate "test1", "ET_CM0_CA0_P0;test1_fcd0"
03. Create a Config and Add the zone to SAN0 config
 swd77:admin> cfgcreate "SAN0", "test31"   ## To create a config first time
 swd77:admin> cfgadd "SAN0", "test31"
04. Save the zone to flash memeory
 swd77:admin> cfgsave
05. Enable the modified configuration
 swd77:admin> cfgenable SAN0
06. Verify the zone
 swd77:admin> zoneshow
 Defined configuration:
  cfg:   SAN0    aembwpd1; aemtest3
  zone:  aembwpd1
                 Aembwpd1_P0; ET_CM0_CA0_P0
  zone:  test1
                 ET_CM0_CA0_P0; aemtest3_fcd0
  alias: Aembwpd1_P0
                 50:01:43:80:02:9a:92:f0
  alias: ET_CM0_CA0_P0
                 20:40:00:0b:5d:6a:05:82
  alias: ET_CM0_CA0_P1
                 21:40:00:0b:5d:6a:05:82
  alias: test1_fcd0
                 50:01:43:80:03:3a:86:ca   

 Effective configuration:
  cfg:   SAN0
  zone:  aembwpd1
                 50:01:43:80:02:9a:92:f0
                 20:40:00:0b:5d:6a:05:82
  zone:  test1
                 20:40:00:0b:5d:6a:05:82
                 50:01:43:80:03:3a:86:ca  
switchshow command
switchshow [-portcount | -iscsi]

swd77:admin> switchshow -portcount
FC ports =  24

swd77:admin> switchshow
switchName:     swd77
switchType:     71.2
switchState:    Online
switchMode:     Native
switchRole:     Principal
switchDomain:   1
switchId:       fffc01
switchWwn:      10:00:00:05:1e:9b:db:72
zoning:         ON (SAN0)
switchBeacon:   OFF

Area Port Media Speed State     Proto
=====================================
  0   0   id    N4   Online           F-Port  50:01:43:80:02:9a:92:f0
  1   1   id    N4   Online           F-Port  50:01:43:80:02:9a:92:4c
  2   2   id    N4   Online           F-Port  50:01:43:80:03:3a:86:ca
  3   3   id    N4   No_Light
  4   4   id    N4   No_Light
  5   5   id    N4   No_Light
  6   6   id    N4   No_Light
  7   7   id    N4   Online           F-Port  20:40:00:0b:5d:6a:05:82
  8   8   id    N4   No_Light
  9   9   id    N4   No_Light
 10  10   id    N4   No_Light
 11  11   id    N4   No_Light
 12  12   id    N4   No_Light
 13  13   id    N4   No_Light
 14  14   id    N4   No_Light
 15  15   id    N4   Online           F-Port  21:40:00:0b:5d:6a:05:82
 16  16   --    N8   No_Module        (No POD License) Disabled
 17  17   --    N8   No_Module        (No POD License) Disabled
 18  18   --    N8   No_Module        (No POD License) Disabled
 19  19   --    N8   No_Module        (No POD License) Disabled
 20  20   --    N8   No_Module        (No POD License) Disabled
 21  21   --    N8   No_Module        (No POD License) Disabled
 22  22   --    N8   No_Module        (No POD License) Disabled
 23  23   --    N8   No_Module        (No POD License) Disabled 

To delete an alias
 Switch1:admin> alidelete "test1_fcd0"
To Delete a Zone
 Switch1:admin> zonedelete "test01"
To remove test4 zone from configuration SAN1
 Switch2:admin> cfgremove "SAN1", "test4"

McData Switches:

Fabric Manager:
Create a zone
add it to a zoneset
Activate the Zone set
 

Cisco Switches

To show all fclias Names:
 # show fcalias
 fcalias name BC20-io1-0 vsan 101
  pwwn 20:00:00:c0:dd:0d:72:bd

 fcalias name BC20-qlogic3-0 vsan 101
  pwwn 20:00:00:c0:dd:0d:73:a5

 fcalias name BC21-io1-0 vsan 101
  pwwn 20:00:00:c0:dd:0d:77:7c
 .....
 .....
To show the fcalias of angel alone
 # show fcalias name angel-fcs0
  fcalias name angel-fcs0 vsan 201
    pwwn 10:00:00:00:c9:78:11:47
To rename the fcalias name
 # config t
 # fcalias rename old_name new_name vsan vsan_number

Zones

To list a zone to which fcalias is part of
 # show zone member fcalias <fcalias_name>
 fcalias <alias_name> vsan 202 
  zone <zon_ename>
To rename a zone
 # config t
 # zone rename old_name new_name vsan vsan_number

Zoneset:

 # show zoneset
 zoneset name svcprod101 vsan 101
   zone name svcprod101 vsan 101
    fcalias name svcprod101-2-4-prod0 vsan 101
      pwwn 50:05:07:68:01:40:36:ea

    fcalias name svcprod101-6-4-prod2 vsan 101
      pwwn 50:05:07:68:01:40:2c:a0

    fcalias name svcprod101-7-4-backup vsan 101
      pwwn 50:05:07:68:01:40:37:43

    fcalias name svcprod101-7-3-backup vsan 101
      pwwn 50:05:07:68:01:30:37:43

    fcalias name svcprod101-2-3-prod0 vsan 101
      pwwn 50:05:07:68:01:30:36:ea

    fcalias name svcprod101-6-3-prod2 vsan 101
      pwwn 50:05:07:68:01:30:2c:a0

Switch Configuration

To list which WWN are logged into the system
 # ssh admin@san03a show flog database 
 MDS Switch
 --------------------------------------------------------------------------------
 INTERFACE        VSAN    FCID           PORT NAME               NODE NAME       
 --------------------------------------------------------------------------------
 fc1/1            2001  0xc70018  50:05:07:68:01:10:5d:e5 50:05:07:68:01:00:5d:e5
 fc1/2            4001  0xe8000e  50:05:07:68:01:10:5f:09 50:05:07:68:01:00:5f:09
 fc1/3            2001  0xc70004  50:05:07:68:01:10:5d:af 50:05:07:68:01:00:5d:af
 fc1/4            4001  0xe80019  50:05:07:68:01:10:5e:2a 50:05:07:68:01:00:5e:2a
 fc1/5            2001  0xc7000f  50:05:07:68:01:10:5b:25 50:05:07:68:01:00:5b:25
 fc1/6            4001  0xe8001a  50:05:07:68:01:10:5f:3f 50:05:07:68:01:00:5f:3f
 fc1/7            2001  0xc70008  50:05:07:68:01:10:5e:02 50:05:07:68:01:00:5e:02
 fc1/8            4001  0xe8001b  50:05:07:68:01:10:5f:0e 50:05:07:68:01:00:5f:0e
  1. show fcns database
VSAN 1:

FCID TYPE PWWN (VENDOR) FC4-TYPE:FEATURE

0xb70037 N 21:00:00:24:ff:39:fe:a2 scsi-fcp:target
0xb70038 N 21:00:00:24:ff:39:f6:a0 scsi-fcp:target
0xb70039 N 21:00:00:24:ff:39:f5:c2 scsi-fcp:target
Total number of entries = 3
 VSAN 1001:
 --------------------------------------------------------------------------
 FCID        TYPE  PWWN                    (VENDOR)        FC4-TYPE:FEATURE 

0xce0000 N 50:0a:09:81:8d:55:7f:20 (NetApp) scsi-fcp
0xce0001 N 50:0a:09:83:9d:55:7f:20 (NetApp) scsi-fcp
0xce0002 N 50:0a:09:82:8d:55:7f:20 (NetApp) scsi-fcp
0xce0003 N 50:0a:09:84:9d:55:7f:20 (NetApp) scsi-fcp
0xce0004 N 50:0a:09:85:8d:55:7f:20 (NetApp) scsi-fcp
0xce0005 N 50:0a:09:86:9d:55:7f:20 (NetApp) scsi-fcp
0xce0006 N 10:00:00:00:c9:a1:24:86 (Emulex) scsi-fcp:init
0xce0007 N 10:00:00:00:c9:a1:24:78 (Emulex) scsi-fcp:init
0xce0008 N 10:00:00:00:c9:b5:02:b5 (Emulex) scsi-fcp:init
0xce0009 N 10:00:00:00:c9:b2:7d:2f (Emulex) scsi-fcp:init
0xce000a N 10:00:00:00:c9:a1:7a:7a (Emulex) scsi-fcp:init
0xce000d N 10:00:00:00:c9:a8:98:bf (Emulex) scsi-fcp:init
0xce000e N 10:00:00:00:c9:f1:ab:b1 (Emulex) scsi-fcp:init
Displaying Switch Configuration:
 switch# show interface fc1/1
 fc1/1 is Down (Administratively down)
                        Hardware is Fibre Channel, SFP is long wave laser
                        Port WWN is 20:00:00:0d:ec:19:cb:0e
                        Admin port mode is auto
                        Receive data field Size is 2112
                        Beacon is turned off
                        5 minutes input rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
                        5 minutes output rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
                          0 frames input, 0 bytes
                            0 discards, 0 errors
                            0 CRC
                            0 too long, 0 too short
                          0 frames output, 0 bytes
                            0 errors
                          0 input OLS, 0 LRR, 0 loop inits
                          5 output OLS, 0 LRR, 1 loop init
Diplaying Version:
 switch# show version
 Cisco MDS 9000 FabricWare
 Copyright (C) 2002-2005, by Cisco Systems, Inc.
 and its suppliers. All rights reserved.
 Copyrights to certain works contained herein are owned by
 third parties, and used and distributed under license.
 Portions of this software are governed by the GNU Public License, which is available at http://www.gnu.org/licenses/gpl.html.
 Software
   system:   2.1(2)
   system compile time:   Thu Apr 21 12:48:49 2005
 Hardware
   switch uptime is 0 days 11 hours 34 minute(s) 3 second(s)
   Last reset at 41643 usecs after Mon Apr 25 11:01:12 2005
     Reason: PowerUp
Display Running Config
 switch# show running
 ip default-gateway 10.20.83.1 logging level fcdomain 2 logging level fspf 2
 logging level fcns 2
 logging level fcs 2
 logging level port 2
 logging level zone 2
 .....
 .....
Displays the Difference Between the Running and Startup Configuration
 switch# show running diff switchname rtp-9020-top
 +
 ip default-gateway 172.18.172.1
 ssh server enable
 logging level fcdomain 2
 logging level fspf 2
 logging level fcns 2
 logging level fcs 2
 logging level port 2
 logging level zone 2
 logging level auth 2
 .....
 .....
 .....
Saving Configuration
 switch# copy running-config startup-config

User Management

To create a user or change the password of user
 switch# config t 
 switch(config)# user <user>  password <password>
 switch# copy running-config startup-config
 [########################################] 100%