Friday, July 31, 2009

Enable veritas DMP path for single LUN

#usr/sbin/vxdmpadm enable path=C#t#d#s2

Example:

The below command is for enabling path for "c2t50060482D52DAF4Cd145s2" Lun

#/usr/sbin/vxdmpadm enable path=c2t50060482D52DAF4Cd145s2
Command terminated successfully

Monday, April 13, 2009

Disable SSH login for individual users

1.)Edit the /etc/ssh/sshd_config file

Add the user names after “DenyUsers” string which you want disable .

Example :


DenyUsers ftpuser fdpuser2

2.) Restart the ssh service

For Solaris 10
--------------
svcadm refresh svc:/network/ssh:default

For Solaris 7,8 & 9
------------------
/etc/init.d/sshd restart


Friday, February 20, 2009

Adding a disk to VxVM

Use the vxdisksetup program to initialize the target disk:

# /usr/lib/vxvm/bin/vxdisksetup -i c#t#d# privoffset=0 \ privlen=XXXX publen=YYYY


#/etc/vx/bin/vxdisksetup –if (New Disk)

Example :

#/etc/vx/bin/vxdisksetup –if EMC0_42


#/etc/vx/bin/vxdisksetup –if c4t2d0




where XXXX is the size of the source disk’s private region, and YYYY is the
size of its public region.

Note: If your system is configured to use enclosure-based naming instead of OS-based naming, replace the c#t#d#name with the enclosure-based name for the disk.

Placing disks under VxVM control

When you add a disk to a system that is running VxVM, you need to put the disk under VxVM control so that VxVM can control the space allocation on the disk.


you can change the naming scheme from the command line. The
following commands select enclosure-based and operating system-based
naming respectively:

# vxddladm set namingscheme=ebn [persistence={yes|no}]

# vxddladm set namingscheme=osn [persistence={yes|no}]

The change is immediate whichever method you use. The optional persistence
argument allows you to select whether the names of disk devices that are
displayed by VxVM remain unchanged after disk hardware has been
reconfigured and the system rebooted. By default, both enclosure-based naming
and operating system-based naming are persistent.

To find the relationship between a disk and its paths, run one of the following
commands:

# vxdmpadm getsubpaths dmpnodename=disk_access_name

# vxdisk list disk_access_name

To update the disk names so that they correspond to the new path names
1 Remove the file that contains the existing persistent device name database:

# rm /etc/vx/disk.info

2 Restart the VxVM configuration demon:

# vxconfigd -k

This regenerates the persistent name database.

Discovering the association between enclosure-based disk names
and OS-based disk names
If you enable enclosure-based naming, and use the vxprint command to display
the structure of a volume, it shows enclosure-based disk device names (disk
access names) rather than c#t#d#s# names. To discover the c#t#d#s# names
that are associated with a given enclosure-based disk name, use either of the
following commands:

# vxdisk -e list enclosure-based_name

# vxdmpadm getsubpaths dmpnodename=enclosure-based_name

For example, to find the physical device that is associated with disk ENC0_21,
the appropriate commands would be:

# vxdisk -e list ENC0_21

# vxdmpadm getsubpaths dmpnodename=ENC0_21

To obtain the full pathname for the block and character disk device from these
commands, append the displayed device name to /dev/vx/dmp or /dev/vx/rdmp

Simple or nopriv disks in the boot disk group
If the boot disk group (usually aliased as bootdg) is comprised of only simple and/or nopriv disks, the vxconfigd daemon goes into the disabled state after the naming scheme change.
To remove the error state for simple or nopriv disks in the boot disk group
1 Use vxdiskadm to change back to c#t#d#s# naming.
2 Enter the following command to restart the VxVM configuration daemon:

# vxconfigd -kr reset

3 If you want to use enclosure-based naming, use vxdiskadm to add a sliced disk to the bootdg disk group, change back to the enclosure-based naming scheme, and then run the following command:

# /etc/vx/bin/vxdarestore

Discovering and configuring newly added disk Devices in Veritas

You can also use the vxdiskscandisks command to scan devices in the operating system device tree, and to initiate dynamic reconfiguration of multipathed disks.
If you want VxVM to scan only for new devices that have been added to the
system, and for devices that have been enabled or disabled, specify the -f option
to either of the commands, as shown here:

# vxdctl -f enable# vxdisk -f scandisks

However, a complete scan is initiated if the system configuration has been
modified by changes to:
■ Installed array support libraries.
■ The devices that are listed as being excluded from use by VxVM.
■ DISKS (JBOD), SCSI3, or foreign device definitions.

The next example discovers fabric devices (that is, devices with the characteristic DDI_NT_FABRIC property set on them):

# vxdisk scandisks fabric

The following command scans for the devices c1t1d0 and c2t2d0: # vxdisk scandisks device=c1t1d0,c2t2d0
Alternatively, you can specify a ! prefix character to indicate that you want to scan for all devices except those that are listed:

# vxdisk scandisks !device=c1t1d0,c2t2d0

You can also scan for devices that are connected (or not connected) to a list of logical or physical controllers. For example, this command discovers and configures all devices except those that are connected to the specified logical controllers:

# vxdisk scandisks !ctlr=c1,c2

The next command discovers devices that are connected to the specified physical controller:

# vxdisk scandisks pctlr=/pci@1f,4000/scsi@3/

Friday, February 13, 2009

Solaris QuickSheet - Packages

Packages

1.) Install the gcc package

pkgadd -d gcc-3.4.6-sol10-sparc-local

2.) Check to see if gcc is installed on system

pkginfo SMCgcc /or/ pkginfo | grep gcc

3.) Remove the gcc package

pkgrm SMCgcc

4.) Check the installation of the gcc (SMCgcc) package

pkgchk SMCgcc

5.) Show revisions of packages on system

showrev -p

6.) Get expected file info and source package for a file

pkgchk -l -p /usr/sfw/bin/gcc

7.) Verify all packages (and les) on the system

pkgchk

8.)Display information about a package

pkgchk -l SMCgcc

9.) Display version information about an installed package

pkginfo -x SMCgcc

10.) List all patches on the system

showrev -p /or/ patchadd -p

11.) List patches applied to the SUNWckr package

pkgparam SUNWckr PATCHLIST


smpatch and updatemanager can be used to manage system patches.

Solaris QuickSheet - OBP


OBP

Compatibility note: This document is based upon Sparc Solaris 10

 All the following commands are to be run from the OBP and not the OS. They are only valid on Sparc hardware that uses the openboot rmware. The eeprom command can be used from the OS to view or set openboot rmware variables.



1.) Show the value of the auto-boot? variable


printenv auto-boot?


2.) Set the system to not auto boot


setenv auto-boot? false


3.)Restore the system default for auto boot


set-default auto-boot?


4.)Show the default boot device

printenv boot-device


5.)List the actual device path for the disk device alias


devalias disk


6.)List all openboot variables, current, and default values

printenv


7.)Show devices seen by openboot

show-devs


8.)Show help on all OBP commands

help


9.)Boot the system into single user mode from the CD ROM

boot cdrom -s


10.)Boot the system into single user mode using the default device

boot -s


11.)Reset the system

reset-all