Vous êtes sur la page 1sur 102

Sun Solaris 10 Operating System

VERITAS VOLUME MANAGER STORAGE FOUNDATION SPECIALIST FOR UNIX 250-250 (Offered by Symantec) Sun Microsystems offers Certification as Sun Certified Veritas Volume Administrator

Comparison of Solaris Volume Manager Software & Veritas Volume Manager

Sun Microsystems, discourage the use of Veritas on the system disk (root disk/boot disk. Veritas do not, by default, correspond to partitions. In the situation, irrespective of the cause, where the system no longer boots, the sysem administrator must be able to gain access to the file system on the system disk without the drives of the volume management software. This is guaranteed to be possible when each volume corresponds to a partition in the volume tableof contents (VTOC) of the system disk. Solaris Volume Manager volumes can be accessed even when booted from CD-ROM. This inturn eliminates the need of breaking off a mirrror dring upgrades, thus reducing downtime and complexity of such an operation. SVM software reservers the correspomdence between the volumes defined in its state database, and the disk partitions defined in the disk lable (VTOC), at all times; disaster recovery is always possible by s standard method, without extra complecations. Its easy to grow /var using the VxVM graphical tool. This can be done by anyone at any time, to solve a disk space problem. However, this breaks the volume-partition relation as the /var volume in now a concatenation of two (not necessarily contiguous) sub-disk. When a disk breaks, the replacement disk is initialized. Slices 3 and 4 become the VxVM private and public region, subdisks are allocated to be mirrored with the surviving disk. Partitions may be created by VxVM software for these subdisks. There are 2 drawbacks to using SVM software in combinations with VxVM software: 1. Cost 2. SVM software requires that a majority of the state databases be found at boot time (the quorum rule). When all data disks are under VxVM software, only two disks may be left under SVM software. If one of these disks breaks, there is no state database quorum and the system will not boot without manual intervention. NOTE: The intervention consists of removing the inaccessible state database copies (using the metadb d command) and rebooting. In the 2-disk configuration, the quorum rule in /etc/system can disable. The system will then will boot unattended, even with one disk. Is storage management software used to manage volumes, to manage data.

How data are stored? Hard disks are formatted and information are stored using 2 methods. 1. Physical storage layout 1. Logical storage layout VxVM uses both the physical objects and virtual objects to handle the storage management.

PHYSICAL DISK / PHYSICAL OBJECT: are hardware with block and raw OS device interfaces that are used to store the data.

VIRTUAL OBJECTS: 1. When one or more physical disks are brought under the control of veritas, it creates virtual objects called VOLUME, on those physical disks. 2. Volumes and their physical components are called virtual objects or VxVM objects. NOTE: VxVM control is accomplished only of VxVM takes control of the physical disk and the disk is not under the control of another storage manager such as SVM. Before the disk can be brought under VxVM control, the disk must be accessible through the operating system device interface. VxVM is layered on top of the OS interface services and is dependent upon how the OS access physical disks. VxVM is dependent upon the OS for the following functionality: 1. 2. OS disk devices Device handles

Virtual Data Storage: Volume Manager creates a virtual layer of data storage. 1. 2. 3. 4. 5. Virtual storage object that is visible to users and application is called a VOLUME. A volume is a virtual object, created by VxVM that stores the data. Made up of space from one or more physical disks on which the data is physically stored. Volume manager volume appears to applications to be physical disk partitions. All users and applications access volumes as contiguous address space using special device files in a manner similar to accessing a disk partition. Volumes have block & character device nodes in the /dev tree. For eg: /dev/vx/( r ) dsk/..

6.

VOLUME MANAGER CONTROL: When we place a disk under VxVM control, a CDS disk layout is used, which ensures that the disk is accessible on different platforms, regardless of platforms on which disk was initialized.

Comparing CDS & Sliced disks CDS 1. Private region (meta data) and public region (user data) are created on a single partition. 2. Suitable for moving between different operating system. 3. Not suitable for boot partitions. SLICED DISKS 1. Private region & public region are created on separate partitions. For eg at 3 and 4 2. Not suitable for moving between the different operating system. 3. Suitable for boot partitions.

Note: 1. CDS (Common Disk Layout) disks have specific disk layout requirement that enable a comman disk layout across different platforms, and these requirements are not compatible with the particular platform specific requirement of boot devices. ( CDS requires a Vertias Storage Foundation License) 2. And therefore, when placing a boot disk under volume. manager control, we must use a SLICED DISK layout Private Region: 1. Is similar to metadb or replica in Solaris Volume Manager Software. 2. Will be created at the time of initialization of disk to VxVM control. 3. Adding the disk to disk group, the media name, disk access name, the disk name and the disk configurations all are written to the private region. LOGICAL OBJECTS: 1. vmdisk 2. disk group 3. sub dis 4. plex 5. volume PHYSICAL OBJECTS: 1. Controllers 2. Disks VMDISK: 1. When a disk is brought under the control of VxVM that disk is called VMDISK. 2. Can bring the disk under VxVM by 2 methods. a. Initialization: 1. Initialize the disk as vmdisk 2. The entire data on the disk will be overwritten, i.e., the data in the disk will be destroyed.

b.

Encapsulation: 1. When a disk is brought under the control of VxVM with encapsulation, all the data (partition) in the disk will be preserved.

3.

Upto 31 characters.

DISK GROUP: 1. Is a collectionn of voulme manager disks that have been put together into a logical grouping. 2. Grouping of disk is for management purpose, such as to hold the data for a spefic application or set of applications. 3. Voulme managerobjects CANNOT span disk groups. For eg: volumes SUB-DISKS, PLEXES and disk must be derived from the same disk group. Can create additional disk group as necessary. 4. Disk group ease the use of devices in a high availability environment, because a disk group and its components can be moved as a unit from the host machine to another. SUB-DISKS: 1. Volume manager disk can be divided into one or more sub-disks. 2. Is a collection of contiguous blocks that represent a specific portion of a volume manager disk, which is mapped to a specific regions of physical disk. 3. Is a subsection of a disk's public region. 4. Is the smallest unit of storage in volume manager. 5. Conceptually, a sub-disk is similar to a partition. 6. Max size of a sub-disk is the size of the vxdisk. 7. Can create 4096 sub-disks/vmdisk. 8. Sub-disk cannot be shared among two plexes.

PLEX: 1. Voulume manager uses sub-disks to build virtual objects called PLEXES. 2. Is a structured or ordered collection on sub-disks from one or more vmdisk. 3. Cannot be shared by 2 volumes. 4. Maximum number of plexes per volumes is 32 5. Between 2 plexes of same volume mirroring occurs by default. 6. Can have minimum one sub-disk and maximum of 4096 sub-disks 7. 3 types of plexes a. Complete plex: holds a complete copy of a volume b. Log plex: dedicated to logging c. Sparse plex: 1. which is not a compelete copy of the 2. Sparse plexes are not used in newer versions fo voulme manager. 8. Can organixe data on sub-disks to form a plex by using the following a. Concatenation b. Striping c. Mirroring d. Striping with parity

volume

VOLUME: 1. Is a collection of plexes 2. Is a virtual storage device that is used by applications in a manner smimilar to physical disk. Due to its virtua in nature a volume is not restricted by the physical disk size constraints that apply to physical disk. 3. Volume can be as large as the total sum of avialable unreesrved free physical disk space 4. Minimum of plex in a volume is 1. Maximum of plexes in a volume is 32. 5. Size of the volume is the size of the least plex. 6. Maximum size of a volume is a size of the disk group.

DAEMONS: 1. vxconfigd - main configuration daemon of VxVM responsible for maintaining the vmdisk & disk group information 2. vxreload - responsible for hot relocation 3. vxsus - requires open VEA (Veritas Enterprise Adminstrator) 4. vxnotify - responsible for notifying device object failure 5. vxoid - provides I/O operations

PACKAGE NAME: 1. 2. 3. 4. 5. 6. 7. 8. 9. VRTSvlic - licensing utilities VRTSVxVM - VxVM binaries VRTSob - VEA service VRTSfspro - File system service provider VRTSfsman VRTSvxman - manual pages VRTSobgui - VEA graphical user interface VRTSVmpro - Diks management service provider VRTSvxfs - VXFS software and manual pages.

TO SET THE ENVIRONMENT VARIABLES (Ater installation of the VxVM) Edit the file /etc/profile PATH=$PATH:/opt/VRTS/bin:/etc/vx/bin MANPATH=$MANPATH:/opt/VRTS/man export PATH MANPATH :wq!

Outputs:

bash-3.00# . profile bash-3.00# echo $PATH /usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:/opt/VRTS/bin:/etc/vx/b in bash-3.00# echo $MANPATH /usr/dt/man:/usr/man:/usr/openwin/share/man:/opt/VRTS/man NOTE: Most commands are located in 1. /etc/vx/bin 2. /usr/sbin 3. /usr/lib/VxVM/bin

INSTALLING THE VERITAS PRODUCTS: 1. Can install by running the script from the cdrom 2. Can install the required package manually by # pkgadd command. NOTE: While adding the package manually please ensure the following; 1. Ensure the packages are installed in the correct order 2. Always install VRTSvlic first 3. Always install the VRTSVxVM package before other VxVM packages. 4. Documentation and manual pages are optional 5. After installing the package, using OS specific commands, run vxinstall to configure VxVM for the first time. # vxinstall -> to install license key. Verifying package installation: # pkginfo -l VRTSVxVM vxinstall: 1. Is an interactive program that guides through the initial VxVM configuration 2. The main steps in vxinstall process are a. entering the license key b. select the naming method 1. Enclosure based naming 2. Traditional naming 3. If desired, set up a system-wide default disk group

Output:
bash-3.00# 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: 832d10ed Host type: SUNW,Sun-Fire-280R SPARCstorage Array or Sun Enterprise Network Array: No arrays found Some licenses are already installed. [y,n,q,?] (default: y) y Do you wish to review them

Symantec License Manager vxlicrep utility version 3.02.16.0 Copyright (C) 1996-2006 Symantec Corporation. All rights reserved. Creating a report on all VERITAS products installed on this system -----------------***********************----------------License Key Product Name Serial Number License Type OEM ID Editions Product (output truncated...) bash-3.00# vxlicrep | more Symantec License Manager vxlicrep utility version 3.02.16.0 Copyright (C) 1996-2006 Symantec Corporation. All rights reserved. Creating a report on all VERITAS products installed on this system -----------------***********************----------------License Key Product Name Serial Number License Type OEM ID Editions Product (output truncated...) bash-3.00# 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: 832d10ed Host type: SUNW,Sun-Fire-280R SPARCstorage Array or Sun Enterprise Network Array: No arrays found Some licenses are already installed. [y,n,q,?] (default: y) n Do you wish to review them = = = = = = iezu-wdp9-dw6w-yzo4-w2z7-pp8o-ppz VERITAS Storage Foundation Standard HA 2447 PERMANENT 2006 YES = = = = = = iezu-wdp9-dw6w-yzo4-w2z7-pp8o-ppz VERITAS Storage Foundation Standard HA 2447 PERMANENT 2006 YES

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) y Starting the relocation daemon, vxrelocd. Starting the cache deamon, vxcached. Starting the diskgroup config backup daemon, vxconfigbackupd. Starting the dg monitoring daemon for rlinks with STORAGE protocol, vxvvrsecdgd.

Do you want to setup a system wide default disk group? [y,n,q,?] (default: y) y Which disk group [<group>,list,q,?] list NAME STATE ID

Which disk group [<group>,list,q,?] newdg The installation is successfully completed. bash-3.00# vxlicrep -s Symantec License Manager vxlicrep utility version 3.02.16.0 Copyright (C) 1996-2006 Symantec Corporation. All rights reserved. Creating a report on all VERITAS products installed on this system License Key Product Name License Type License Key Product Name License Type License Key Product Name License Type License Key PPP Product Name License Type License Key Z Product Name License Type License Key Product Name License Type = iezu-wdp9-dw6w-yzo4-w2z7-pp8o-ppz = VERITAS Storage Foundation Standard HA = PERMANENT = = VERITAS Volume Manager = PERMANENT = = VERITAS File System = PERMANENT = BZZE-9NR3-OPRV-ROEO-4A8P-DPPW-XCPP= VERITAS Volume Manager = PERMANENT = 3EZU-3YK6-92TM-XJ6P-PZCN-PRDP= VERITAS File System = PERMANENT = PZZH-PCWG-CTFZ-I2YC-NPZK-P6 = VERITAS Cluster Server = PERMANENT

Enclosure based naming: a. os independent b. Is based on the enclosure c. can be customized to make names meaningful Traditional based naming: a. operating system dependent b. based on physical connectivity information Solaris: /dev/(r)dsk/c0t0d0s2 SELECTING & NAMING SHCEME: We can select the naming scheme 1. When we run VxVM installation scripts 2. Anytime by using the # vxdiskadm option - " change the disk naming scheme " Note: This operation requires the VxVM configuration daemon, 'vxconfigd' to be stopped and restarted

If we choose enclosure based naming 1. Disks are displayed in 3 categories 2. Enclosure: a. Supported by RAID disk arrays are displayed in enclosurename_# -> format b. Disks: Supported JBOD (Just Bunch Of Disks) disk arrays are displayed with the prefix Disk_ c. Others: Disks that do not return a path independent identifier to VxVM displayed in the traditional os based format

Output: To Change the naming scheme:


Select disk devices to add: [<pattern-list>,all,list,q,?] list DEVICE Disk_0 Disk_1 Disk_2 Disk_3 Disk_4 Disk_5 DISK GROUP STATUS online invalid online invalid online online online invalid online

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

After choosing the option 20: Change the disk naming scheme Select disk devices to add: [<pattern-list>,all,list,q,?] list

DEVICE c1t2d0 c1t9d0 c1t10d0 c1t11d0 c1t12d0 c2t0d0

DISK -

GROUP STATUS online online online online invalid online invalid online invalid to add: [<pattern-

Select disk devices list>,all,list,q,?]

VXVM user interfaces: 1. Supports 3 user interfaces a. VEA A GUI based, that provides access through, icons, menus, wizards and dialog boxes. b. CLI - UNIX utilities that invoked from the command line c. vxdiskadm - a menu driven, text based interface also invoked from the command line Output: # vxdiskadm Volume Manager Support Operations Menu: VolumeManager/Disk 1 2 3 4 Add or initialize one or more disks Encapsulate one or more disks Remove a disk Remove a disk for replacement

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 list ? ?? q

Replace a failed or removed disk Mirror volumes on a disk Move volumes from a disk Enable access to (import) a disk group Remove access to (deport) a disk group Enable (online) a disk device Disable (offline) a disk device Mark a disk as a spare for a disk group Turn off the spare flag on a disk Unrelocate subdisks back to a disk Exclude a disk from hot-relocation use Make a disk available for hot-relocation use Prevent multipathing/Suppress devices from VxVM's view Allow multipathing/Unsuppress devices from VxVM's view List currently suppressed/non-multipathed devices Change the disk naming scheme Get the newly connected/zoned disks in VxVM view Change/Display the default disk layouts Mark a disk as allocator-reserved for a disk group Turn off the allocator-reserved flag on a disk List disk information Display help about menu Display help about the menuing system Exit from menus

Select an operation to perform: NOTE: vxdiskadm only provides access to certain disk and disk group management functions.

COMMANDS: 1. # vxdiskadm - used to add or initialize one or more disks, encapsulate one or more disks, remove disk, remove a disk for replacement, replace a failed or removed disk, more volumes from a disk, enable access (import) to a disk group, remoce access (deport) to a disk group, enable (online) a disk device, disable (offline) a disk device, mark a disk as a spare for a disk group, turnoff the spare flag on a diks , list disk informations. 2. # vxassist - Utility used to create volume, add mirrors & logs to existing volumes, exten & shrink the existing volumes, provides the migration of data from a specified set of disks & provides facilities for the online backup of existing volumes.

SYNTAX: # vxassist <option> <keyword> <volume_name> [attributes] OPTIONS: -g => to specify the disk group -b -> background option -d => file containing defaults for vxassist if not specified, /etc/default/vxassist is used.

KEYWORD: make, mirror, growto, growby, shirkby, shrinkto, snapshot, snapstart, snapwait ATTRIBUTES: Specifies volume layout, sik controller to include, excluede etc., 3. # vxdisk - to see the parameters of disks 4. # vxdg - to perform disk group operation 5. # vxdisksetup - ti intialize the setup 6. # vxdiskunsetup - to un-intialialize the setup 7. # vxsd - to perform sub-disk operation 8. # vxplex -> to perform plex operation 9. # vxvol -> to perform volume operation 10. # vxprint -> displays the detailed information on existing VxVM objects NOTE: VEA is automatically installed when we run the VxVM installation scripts; we can also install VEA by manually adding the packages.

VOLUME PATH: Block device : /dev/vx/dsk/<dg_name>/<volume_name> Raw device : /dev/vx/rdsk/<dg_name>/<volume_name> VEA : Viewing commands: 1. Located in /var/adm/vx/veacmdlog 2. Displays a history of taks performed in the current session and in previous sessions. 3. This file is created after the first execution of a task in VEA. MANAGING VEA: 1. The VEA server program is in /opt/VRTSos/bin/vxsvc 2. To confirm that VEA server is running # vxsvc -m 3. To stop and restart the VEA server # /etc/init.d/isisd restart 4. To kill the VEA server process # vxsvc -k 5. To display the VEA version number # vxsvc -v

Output: bash-3.00# vxsvc -m Current state of server : NOT RUNNING bash-3.00# /etc/init.d/isisd restart Stopping Veritas Enterprise Administrator Service (vxsvc) VEA Server was shutdown successfully The server is not configured. Unable to start the server. Please configure before running. bash-3.00# vxsvc -v 3.3.721.0 Disk configuration stages: 1. Has 3 stages a. Intialize the disk b. Assing the disk to the disk group c. assign disk space to the volumes 2. Intialize the disk: Stage-1: a. This occur after the disk is detected by the OS b. When the disk is initalized, the public & private regions are created, and the volume manager disk header information is written to the private region. c. An initalized disk is placed under VxVM free disk pool. i. The VxVM free disk pool contains disk that have been initialized but have not yet assigned to a ddisk group. 3. Assign disk to the disk group: Stage-2: a. VxVM assigns the disk name to the diks and maps this name to the disk access name. i. a disk name/ disk media name is the logical name assigned to the device by VxVM. ii. VxVM uses this name to identify the disk for volume operations, such as volume creation & mirroring. iii. a disk access record maps the physical location to the logical name and represents the link between the disk media and the disk access name. b. When a disk is added to the diks group, the media name, diks access name, the host name and the disk configuration are all written to the private region of the disk.

4. To create a volume: Stage-3: a. when we create a volume, space in the public region of a disk is assigned ot the volumes.

CREATING A DISK GROUP: 1. To create a disk group, first wer have to add a disk to a disk group 2. can add a single or multiple disk 3. cannot add a disk to more that one disk group 4. default disk mediia names vary with the interface used to add to a disk group, but are conventionally in the format diskgroup##

such as datadg00, datadg01, datadg02 and os on... 5. disk media names must be unique within a disk group. 6. adding disks to a disk group provides additional storage capacity for creating volumes. adding a disk to a disk group makes the disk space avialble for use in creating VxVM volume. System wide reserved disk groups: 1. Reserved names a. bootdg b. defaultdg c. nodg a. bootdg: 1. if the boot disk is brought under VxVM control, volume manager assigns bootdg as an alias for the name of the disk group that contains the volume that are used to boot the system. 2. # vxdg bootdg # vxdg defaultdg to display what is set as bootdg or defaultdg 3. # vxdctl defaultdg <disk-group> to set the default disk group after VxVM installation Only to check whether its possible to create the above reserved disk group: Output:
bash-3.00# vxdg init bootdg bootdg01=c1t2d0 VxVM vxdg ERROR V-5-1-585 Disk group nodg: cannot create: Name is not allowed as a disk group bash-3.00# vxdg init nodg nodg01=c1t2d0 VxVM vxdg ERROR V-5-1-585 Disk group nodg: cannot create: Name is not allowed as a disk group bash-3.00# vxdg init defaultdg defaultdg01=c1t2d0 VxVM vxdg ERROR V-5-1-585 Disk group nodg: cannot create: Name is not allowed as a disk group

DISK GROUP: 1. To create a disk group or add disks using vxdiskadm " Add or initialize one or more disks " 2. To initialize: Syn: # vxdisksetup -i >device_tag> [attribute] eg: # vxdisksetup -i Disk_1 { enclosure based naming } # vxdisksetup -i c2t0d0 { traditional based naming } 3. To initilaize the disk group by adding atleast one disk: Syn: # vxdg init <disk_group> <disk_name>=<device_tag> eg: # vxdg init newdg newdg01=Disk1 4. Add more disks to the disk group: Syn: # vxdg -g <disk_group> adddisk <disk_name>=<device_tag> eg: # vxdg -g newdg adddisk newdg02=Disk2

Output: Creating the disk group at the time of initializing the disk: U Select disk devices to add: [<pattern-list>,all,list,q,?] c1t12d0 Here is the disk selected. Output format: [Device_Name] c1t12d0 Continue operation? [y,n,q,?] (default: 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: none) newdg Create a new group named newdg? [y,n,q,?] (default: y) Create the disk group as a CDS disk group? [y,n,q,?] (default: y) Use a default disk name for the disk? [y,n,q,?] (default: y) Add disk as a spare disk for newdg? [y,n,q,?] (default: n) Exclude disk from hot-relocation use? [y,n,q,?] (default: n) Add site tag to disk? [y,n,q,?] (default: n) A new disk group will be created named newdg and the selected disks will be added to the disk group with default disk names. c1t12d0 Continue with operation? [y,n,q,?] (default: 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] c1t12d0 Encapsulate this device? [y,n,q,?] (default: y) n c1t12d0 Instead of encapsulating, initialize? [y,n,q,?] (default: n) y Initializing device c1t12d0. Enter desired private region length [<privlen>,q,?] (default: 65536) VxVM NOTICE V-5-2-120 Creating a new disk group named newdg containing the disk device c1t12d0 with the name newdg01. Add or initialize other disks? [y,n,q,?] (default: n) n

Output: To bring the disk under VxVM control without creating a disk group: bash-3.00# vxdisksetup -i c1t11d0 bash-3.00# vxdisk list DEVICE TYPE DISK c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk auto:cdsdisk c1t10d0s2 c1t11d0s2 auto:cdsdisk c1t12d0s2 auto:cdsdisk newdg01 auto:none c2t0d0s2 -

GROUP online newdg -

STATUS online online online online online invalid

Output: To create the disk group using a command: bash-3.00# vxdg init oradg oradg01=c1t11d0 bash-3.00# vxdisk list DEVICE TYPE DISK GROUP c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk c1t10d0s2 auto:cdsdisk c1t11d0s2 auto:cdsdisk oradg01 oradg online c1t12d0s2 auto:cdsdisk newdg01 newdg c2t0d0s2 auto:none Output: Adding a disk to the existing disk group: Adding a disk to a disk group bash-3.00# vxdisk list DISK GROUP DEVICE TYPE c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk c1t10d0s2 auto:cdsdisk c1t11d0s2 auto:cdsdisk oradg01 oradg c1t12d0s2 auto:cdsdisk newdg01 newdg c2t0d0s2 auto:none bash-3.00# vxdg -g oradg adddisk oradg02=c1t10d0 bash-3.00# vxdisk list DEVICE TYPE DISK GROUP c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk c1t10d0s2 auto:cdsdisk oradg02 oradg online c1t11d0s2 auto:cdsdisk oradg01 oradg c1t12d0s2 auto:cdsdisk newdg01 newdg c2t0d0s2 auto:none VIEWING DISK INFORMATION: 1.To display basic information about all the disks: # vxdisk -o alldgs list NOTE: In a shared access environment, when displaying disks, we should frequenlty run # vxdctl enable to rescan for the disk changes

STATUS online online online online online invalid

STATUS online online online online online online invalid STATUS online online online online online invalid

2. To display detailed information for a disk Syn: # vxdisk -g <disk_group> list <disk_name> eg: # vxdisk -g datadg list datadg01

3. To display a summary for all disks # vxdisk -s list 4. To display imported disk groups only: # vxdg list displays the name, sate & id 5. To display all disk groups, including deported disk groups: # vxdisk -o alldgs list 6. To display free space in the disk group # vxdg free for all disk groups that the host can detect # vxdg -g <disk_group> free for specific disk group Output: bash-3.00# vxdg list NAME STATE newdg enabled,cds

ID 1256796117.15.fire1

bash-3.00# vxdisk -o alldgs list DEVICE TYPE DISK c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk c1t10d0s2 auto:cdsdisk c1t11d0s2 auto:none c1t12d0s2 auto:cdsdisk newdg01 c2t0d0s2 auto:none bash-3.00# vxdisk list TYPE DEVICE auto:cdsdisk c1t2d0s2 auto:cdsdisk c1t9d0s2 c1t10d0s2 auto:cdsdisk c1t11d0s2 auto:none c1t12d0s2 auto:cdsdisk c2t0d0s2 auto:none

GROUP (newdg) (appachedg) newdg -

STATUS online online online online invalid online online invalid

DISK newdg01 -

GROUP newdg -

STATUS online online online online invalid online online invalid

bash-3.00# vxdg free DISK GROUP newdg newdg01 oradg oradg01

DEVICE c1t12d0s2 c1t11d0s2

TAG c1t12d0 c1t11d0

OFFSET 0 0

LENGTH 8315008 35302480

FLAGS -

bash-3.00# vxdg -g oradg free DISK DEVICE TAG oradg01 c1t11d0s2 c1t11d0

OFFSET 0

LENGTH 35302480

FLAGS -

CREATING A NON-CDS DISK & DISK GROUP: 1. If we are working with sliced disks & non-CDS disk groups, we can initalize a disk as a sliced disk & create a non-CDS disk group. 2. To initialize a disk as a sliced disk Syn: # vxdisksetup -i <device_tag> format=sliced 3. To intialize a non-cds disk group syn: # vxdg init <diskgroup> <disk_name>=<device_tag> cd =off

EVACUVATING A DISK: Before renaming the disk, we need to evacuvate data from the disk to another disk in the disk group. 1. # vxdiskadm " Move volumes from a disk " 2. Syn: eg: # vxevac -g diskgroup from_disk [to_disk] # vxevac -g datadg datadg02 datadg03

3. To evacuvate to any disk except for datadg03 # vxevac -g datadg datadg02 !datadg03

REMOVING A DISK FROM VXVM: 1. # vxdiskadm " Remove a disk " 2. Syn: # vxdg -g <disk_group> rmdisk <disk_name> Syn: # vxdiskunsetup [-C] <device_tag> eg: # vxdg -g newdg rmdisk newdg02 # vxdiskunsetup -C Disk-02 NOTE: Remove the disk from the disk group & then uninitialize it.

Output: Removing a disk from the disk group: bash-3.00# vxdisk list DEVICE TYPE c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk c1t10d0s2 auto:cdsdisk c1t11d0s2 auto:cdsdisk c1t12d0s2 auto:cdsdisk c2t0d0s2 auto:none

DISK oradg03 oradg02 oradg01 newdg01 -

GROUP oradg oradg oradg newdg -

STATUS online online online online online online invalid

bash-3.00# vxdg -g oradg rmdisk oradg03 bash-3.00# vxdisk list TYPE DEVICE auto:cdsdisk c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk c1t10d0s2 auto:cdsdisk c1t11d0s2 c1t12d0s2 auto:cdsdisk c2t0d0s2 auto:none

DISK oradg02 oradg01 newdg01 -

GROUP oradg oradg newdg -

STATUS online online online online online online invalid

Output: Removing the disk from the VxVM control: To remove the disk from the veritas control bash-3.00# vxdisk list DISK GROUP DEVICE TYPE c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:cdsdisk c1t10d0s2 auto:cdsdisk oradg02 oradg c1t11d0s2 auto:cdsdisk oradg01 oradg c1t12d0s2 auto:cdsdisk newdg01 newdg c2t0d0s2 auto:none bash-3.00# vxdiskunsetup -C c1t9d0 bash-3.00# vxdisk list DEVICE TYPE c1t2d0s2 auto:cdsdisk c1t9d0s2 auto:none c1t10d0s2 auto:cdsdisk c1t11d0s2 auto:cdsdisk c1t12d0s2 auto:cdsdisk c2t0d0s2 auto:none

STATUS online online online online online online invalid

DISK oradg02 oradg01 newdg01 -

GROUP oradg oradg newdg -

STATUS online online invalid online online online online invalid

RENAMING A DISK: Syn: # vxedit -g <disk_group> rename <old_name> <new_name> eg: # vxedit -g datadg rename datadg01 datadg03

NOTE: 1. New disk name must be unique within the disk group. 2. Renaming a disk does not auomatically rename sub-disks on that disk.

DEPORITNG A DISK GROUP: 1. What is a deported disk group/ a. the disk group and its volumeas are unavailable b. the disks cannot be removed c. the disk group cannot be accessed until it is imported 2. Before deporting a disk group a. unmount the file system b. stop volumes

3. When we deport a disk group, we can specify a. a new host b. a new disk group name 4. # vxdiskadm " Remove access to (deport) a disk group " 5. Syn: eg: # vxdg deport <disk_group> # vxdg deport newdg

6. To deport & rename a disk group syn: # vxdg -n <new_name> deport <old_name> eg: # vxdg -n newdg deport olddg 7. To deport a disk group & specify a new host syn: # vxdg -h <host-name> deport <disk-group> eg: # vxdg -h fire1 deport newdg IMPORITNG A DISK GROUP: 1. Importing a disk group re-enables access to the disk group When we import a disk group, we can a. specify a new disk group name b. clear host locks c. import as temportary d. force on import 2. # vxdiskadm " Enable access to (import) a disk group " 3. Syn: # vxdg import <disk-group> eg: # vxdg import newdg 4. After importing the disk group, start all volumes # vxvol -g newdg startall 5. To import & rename a disk group syn: # vxdg -n <new-name> import <old-name> eg: # vxdg -n newerdg import newdg 6. To import & rename temporarily syn: # vxdg -t -n <new-name> import <old-name> eg: # vxdg -t -n newerdg import newdg 7. To clear import lock, # vxdg -tC -n newerdg import newdg

DESTROY A DISK GROUP: 1. 2. 3. 4. Means that the disk group nolinger exists Retuns all disks to the free disk pool Is the only method for freeing the last disk in the disk group Syn: # vxdg destroy <disk-group> eg: # vsdg destroy olddg

Output: bash-3.00# vxdg destroy newdg bash-3.00# vxdg list STATE ID NAME oradg enabled,cds

1256796536.19.fire1

DISK GROUP VERSIONING: 1. All disk groups have a version number based on the VxVM release 2. Each disk group version supports a set of features. we must upgrade old disk group versions in order to use new features NOTE: We cannot upgrade to a specific version using VEA. We can only upgrade to the current version. To upgrade to specific version, we have to use 3. To display the disk group version, # vxdg list newdg 4. To upgrade the disk group version syn: # vxdg [-T version] upgrade <disk-group> eg: # vxdg -T 40 upgrade datadg 5. To create a version 50 disk group # vxdg -T 50 init newdg newdg01=disk01

TO CREATE A VXFS: # mkfs -F vxfs /dev/vx/rdsk/datadg/shivavol NOTE: If we edit the file /etc/default/fs

Output: bash-3.00# cat /etc/default/fs LOCAL=vxfs Then there is no need to specify the file system while creating the file system. bash-3.00# mkfs -F vxfs /dev/vx/rdsk/newdg/newvol1 version 7 layout 2097152 sectors, 1048576 blocks of size 1024, log size 16384 blocks largefiles supported NOTE: It's recommended to create the file system to # mkfs command

To MOUNT: # mount -F vxfs /dev/vx/dsk/datadg/shivavol /check # fstyp /dev/vx/dsk/datadg/shivavol used to know the file system type Output: bash-3.00# mount -F vxfs /dev/vx/dsk/newdg/newvol1 /mnt/newdg/volume_1 bash-3.00# tail -1 /etc/mnttab /dev/vx/dsk/newdg/newvol1 /mnt/newdg/volume_1 vxfs rw,suid,delaylog,largefiles,ioerror=mwdisable,dev=4449858 # prtvtoc /dev/vx/dsk/datadg/shivavol Note: # prtvtoc -pv | grep bootpath shows the physical device path of the booted OS.

1256798149

ADMINISTERING SUBDISKS: 1. Creating the subdiks 2. Viewing the subdisk information 3. Associating the subdisk with the plex 4. Dissociating the subdisk from the plex 5. Deleting the subdisk

Creating subdisk: Output:


bash-3.00# vxmake -g datadg sd datadg01-01 datadg01,0,8000 bash-3.00# vxprint -g datadg -st PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE SD NAME SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE sd datadg01-01 datadg01 0 8000 c1t12d0 ENA

MODE MODE MODE

bash-3.00# vxprint -g datadg -st PLEX DISK SD NAME SV NAME PLEX VOLNAME SC NAME PLEX CACHE sd datadg01-01 -

DISKOFFS LENGTH NVOLLAYR LENGTH DISKOFFS LENGTH 8000

[COL/]OFF DEVICE [COL/]OFF AM/NM [COL/]OFF DEVICE c1t12d0

MODE MODE MODE ENA

datadg01 0

bash-3.00# vxmake -g oradg sd oradg02-05 oradg01,6291456,2g bash-3.00# vxprint -g oradg -st PLEX DISK SD NAME SV NAME PLEX VOLNAME SC NAME PLEX CACHE sd sd sd sd oradg02-01 oradg02-02 oradg02-04 oradg02-05

DISKOFFS LENGTH NVOLLAYR LENGTH DISKOFFS LENGTH

[COL/]OFF DEVICE [COL/]OFF AM/NM [COL/]OFF DEVICE 0 c1t11d0 c1t10d0 c1t11d0 c1t11d0 ENA

MODE MODE MODE ENA ENA ENA

vol1-01 oradg02 0 4194304 oradg01 0 2097152 oradg01 2097152 4194304 oradg01 6291456 4194304 -

Viewing the subdisk information: Output:


bash-3.00# vxprint -st Disk group: oradg SD NAME SV NAME SC NAME sd oradg02-01 PLEX PLEX PLEX vol1-01 DISK VOLNAME CACHE oradg02 0 DISKOFFS LENGTH NVOLLAYR LENGTH DISKOFFS LENGTH 4194304 0 [COL/]OFF DEVICE [COL/]OFF AM/NM [COL/]OFF DEVICE c1t10d0 ENA MODE MODE MODE

Disk group: newdg SD NAME SV NAME SC NAME sd newdg01-01 PLEX PLEX PLEX newvol1-01 DISK VOLNAME CACHE DISKOFFS LENGTH NVOLLAYR LENGTH DISKOFFS LENGTH 2097152 0 [COL/]OFF DEVICE [COL/]OFF AM/NM [COL/]OFF DEVICE c1t9d0 ENA MODE MODE MODE

newdg01 0

bash-3.00# vxprint -g newdg -s TY NAME ASSOC KSTATE LENGTH PLOFFS STATE sd newdg01-01 newvol1-01 ENABLED 2097152 0

TUTIL0 -

PUTIL0

bash-3.00# vxprint -g newdg -l newdg01-01 Subdisk: newdg01-01 info: disk=newdg01 offset=0 len=2097152 assoc: vol=newvol1 plex=newvol1-01 (offset=0) flags: enabled device: device=c1t9d0s2 path=/dev/vx/dmp/c1t9d0s2 diskdev=272/26

Associating the subdisk to the plex: Output: Case-1:


bash-3.00# vxmake -g oradg plex oradgvol01-01 sd=oradg02-02,oradg02-04 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE pl oradgvol01-01 pl vol1-01 vol1 DISABLED ENABLED ACTIVE 6291456 4194304 CONCAT CONCAT RW RW

Case-2:
bash-3.00# vxsd -g oradg assoc oradgvol01-01 oradg02-05 oradg02-06 bash-3.00# vxprint -g oradg -st PLEX DISK SD NAME SV NAME PLEX VOLNAME SC NAME PLEX CACHE sd sd sd sd sd oradg02-01 oradg02-02 oradg02-04 oradg02-05 oradg02-06

DISKOFFS LENGTH NVOLLAYR LENGTH DISKOFFS LENGTH

[COL/]OFF DEVICE [COL/]OFF AM/NM [COL/]OFF DEVICE

MODE MODE MODE

vol1-01 oradg02 0 4194304 0 c1t10d0 ENA oradgvol01-01 oradg01 0 2097152 0 c1t11d0 ENA oradgvol01-01 oradg01 2097152 4194304 2097152 c1t11d0 ENA oradgvol01-01 oradg01 6291456 4194304 6291456 c1t11d0 ENA oradgvol01-01 oradg02 10485760 2097152 10485760 c1t10d0 ENA

Deleting/the subdisk: Output:


bash-3.00# vxedit -g datadg rm datadg01-01 bash-3.00# vxsd -g oradg -o rm dis oradg0206 bash-3.00# vxprint -g oradg -st PLEX DISK SD NAME SV NAME PLEX VOLNAME SC NAME PLEX CACHE sd sd sd sd oradg02-01 oradg02-02 oradg02-04 oradg02-05 vol1-01 oradg02 oradgvol01-01 oradg01 oradgvol01-01 oradg01 oradgvol01-01 oradg01

DISKOFFS LENGTH NVOLLAYR LENGTH DISKOFFS LENGTH 0 0 2097152 6291456 4194304 2097152 4194304 4194304

[COL/]OFF DEVICE [COL/]OFF AM/NM [COL/]OFF DEVICE 0 0 2097152 6291456 c1t10d0 c1t11d0 c1t11d0 c1t11d0

MODE MODE MODE ENA ENA ENA ENA

bash-3.00# vxsd -g oradg dis oradg02-05 bash-3.00# vxprint -g oradg -st PLEX DISK DISKOFFS LENGTH SD NAME SV NAME PLEX VOLNAME NVOLLAYR LENGTH SC NAME PLEX CACHE DISKOFFS LENGTH sd sd sd sd oradg02-01 oradg02-02 oradg02-04 oradg02-05 vol1-01 oradg02 oradgvol01-01 oradg01 oradgvol01-01 oradg01 oradg01 0 0 2097152 6291456 4194304 2097152 4194304 4194304

[COL/]OFF DEVICE [COL/]OFF AM/NM [COL/]OFF DEVICE 0 0 2097152 c1t10d0 c1t11d0 c1t11d0 c1t11d0

MODE MODE MODE ENA ENA ENA EN

ADMINSTERING PLEX: 1. 2. 3. 4. 5. Creating the plex Viewing the plexormation Associating the plexh the volume Dissociating the plex from the volume Deleting the plex

Creating a plex: Output:


bash-3.00# vxmake -g oradg plex oradgvol1-01 sd=oradg02-04,oradg02-05 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE pl oradgvol1-01 pl oradgvol01-01 pl vol1-01 vol1

STATE

LENGTH

LAYOUT

NCOL/WID MODE

DISABLED 8388608 CONCAT RW DISABLED 2097152 CONCAT ENABLED ACTIVE 4194304 CONCAT

RW RW

Viewing plex information:


bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE RW RW RW

pl oradgvol1-01 DISABLED 8388608 CONCAT pl oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT pl vol1-01 vol1 ENABLED ACTIVE 4194304 CONCAT bash-3.00# vxplex -g oradg att oradgvolume oradgvol1-01 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE STATE LENGTH LAYOUT pl oradgvol1-01 oradgvolume DISABLED EMPTY 8388608 CONCAT

NCOL/WID MODE RW

pl oradgvol01-01 oradgvolume DISABLED EMPTY pl vol1-01 vol1 ENABLED ACTIVE bash-3.00# vxprint -g oradg -l oradgvol01-01 Plex: oradgvol01-01 info: len=2097152 type: layout=CONCAT state: state= kernel=DISABLED io=read-write assoc: vol=(dissoc) sd=oradg02-02 flags:

2097152 4194304

CONCAT CONCAT

RW RW

Associating plex to volume: Output:

Case-1:
bash-3.00# vxplex -g oradg att oradgvolume oradgvol1-01 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE

STATE

LENGTH

LAYOUT

NCOL/WID MODE RW RW RW

pl oradgvol1-01 oradgvolume DISABLED EMPTY 8388608 CONCAT pl oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT pl vol1-01 vol1 ENABLED ACTIVE 4194304 CONCAT -

Case-2:
bash-3.00# vxmake -g oradg -U fsgen vol oradgvolume plex=oradgvol01-01 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE pl oradgvol1-01 DISABLED pl oradgvol01-01 oradgvolume DISABLED EMPTY pl vol1-01 vol1 ENABLED ACTIVE 8388608 2097152 4194304 CONCAT CONCAT CONCAT RW RW RW

bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE

STATE

LENGTH

LAYOUT

NCOL/WID MODE RW RW RW

pl oradgvol1-01 oradgvolume DISABLED EMPTY 8388608 CONCAT pl oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT pl vol1-01 vol1 ENABLED ACTIVE 4194304 CONCAT -

Dissociating/Deleting the plex: Output: Case-1:


bash-3.00# vxplex -g oradg det oradgvol1-01 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE STATE pl oradgvol1-01 oradgvolume DETACHED EMPTY pl oradgvol01-01 oradgvolume DISABLED EMPTY pl vol1-01 vol1 ENABLED ACTIVE

LENGTH 8388608 2097152 4194304

LAYOUT CONCAT CONCAT CONCAT

NCOL/WID MODE RW RW RW

Case-2:
bash-3.00# vxplex -g oradg -o rm dis oradgvol1-01 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE STATE LENGTH pl oradgvol01-01 oradgvolume DISABLED EMPTY pl vol1-01 vol1 ENABLED ACTIVE 2097152 4194304

LAYOUT CONCAT CONCAT

NCOL/WID MODE RW RW

TO DISPLAY VM OBJECTS STATUS: 1. # vxprint 2. # vxtask list displays the % progress, task id 3. # vxtask monitor <id> continuously displays the % of the progress

Note: 1. As for VxVM commands the default size unit is "s" - representing the sector 2. Add suffix such as a. k - kilo byte b. m - mega byte c. g - giga byte 19. # vxprint [-g disk-group] -l subdisk displays all information for sub-disks in the disk group specified eg: # vxprint -g nmydg -l mydg02-01

20. # vxprint -hvt to display the volume, plex & sub-disk record information for all volumes in the system

ADMINSTERING THE VOLUME: INITIALIZING & STARTING A VOLUME: 1. # vxvol [-g diskgroup] start volume to initialize & start a volume 2. # vxvol [-g diksgroup] init enable volume can be used to enable the volume without initializing 3. # vxvol [-g diskgroup] init active volume to restore data on the volume from a backup before using the command to make the volume fully active 4. If we want to zero out the contents of the entire volume # vxvol [-g diskgroup] init zero volume

CREATING A VOLUME: Before creating a volume, initialize disk & assign them to disk groups 1. Striped volume requires minimum 2 disks

2. Mirrored volume requires minimum one hard disk for each plex. A mirror cannot be on the same disk that the other plexes are using. 3. Raid-5: Minimum 3 disks are required

To create a volume: # vxassist g <disk-group> make volume-name length [attributes] 2. To display volume attributes

# vxassist g <disk-group> help showattrs CONCATENATED VOLUME: 1. To create a concatenated volume

#vxassist g datadg make datavol 10g datadg - disk group name datavol volume name 10g volume size

2.

If an /etc/default/vxassist file exists with a different layout

# vxassist g datadg make datavol 10g layout=nostripe

3.

To create a concatenated volume on specific disks

# vxassist g datadg make datavol 10g datadg02 datadg03 datadg02, datadg03 disk media name

Output: Concatenated volume:


bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE v v v oradgvolume oradgvolume-01 vol1 STATE LENGTH 2097152 4194304 4194304 READPOL ROUND SELECT SELECT PREFPLEX UTYPE fsgen fsgen fsgen

DISABLED EMPTY ENABLED ACTIVE ENABLED ACTIVE

bash-3.00# vxassist -g oradg make oradgvolme-02 1g oradg03 bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE v oradgvolme-02 v oradgvolume v oradgvolume-01 v vol1 -

STATE

LENGTH

READPOL

PREFPLEX UTYPE fsgen -

ENABLED ACTIVE 2097152 SELECT DISABLED EMPTY 2097152 ROUND ENABLED ACTIVE 4194304 SELECT ENABLED ACTIVE 4194304 SELECT

fsgen fsgen fsgen

bash-3.00# vxprint -g oradg -l oradgvolme-02 oradgvolme-02 Volume: len=2097152 info: type: usetype=fsgen state: state=ACTIVE kernel=ENABLED cdsrecovery=0/0 (clean) plexes=oradgvolme-02-01 assoc: exports=(none) policies: read=SELECT (round-robin) exceptions=GEN_DET_SPARSE flags: closed writeback siteconsistent 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=25003 bdev=273/25003 cdev=273/25003 path=/dev/vx/dsk/oradg/oradgvolme02 perms: user=root group=root mode=0600 guid: {19294dba-1dd2-11b2-be03-0003ba2d10ed}

bash-3.00# vxprint -g oradg -hvt RVG/VSET/CO KSTATE V NAME PL NAME VOLUME KSTATE SD NAME PLEX DISK SV NAME PLEX VOLNAME SC NAME PLEX CACHE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO EX NAME ASSOC VC

STATE STATE DISKOFFS NVOLLAYR DISKOFFS

LENGTH LENGTH LENGTH LENGTH LENGTH

READPOL LAYOUT [COL/]OFF [COL/]OFF [COL/]OFF PERMS

PREFPLEX NCOL/WID DEVICE AM/NM DEVICE

UTYPE MODE MODE MODE MODE

MODE

STATE fsgen RW ENA fsgen RW ENA fsgen RW ENA fsgen RW ENA

v oradgvolme-02 ENABLED ACTIVE 2097152 SELECT pl oradgvolme-02-01 oradgvolme-02 ENABLED ACTIVE 2097152 CONCAT sd oradg03-02 oradgvolme-02-01 oradg03 4194304 2097152 0 v oradgvolume DISABLED EMPTY pl oradgvol01-01 oradgvolume DISABLED EMPTY sd oradg02-02 oradgvol01-01 oradg01 0 2097152 2097152 2097152 ROUND CONCAT 0

c1t12d0 c1t11d0

v oradgvolume-01 ENABLED ACTIVE 4194304 SELECT pl oradgvolume-01-01 oradgvolume-01 ENABLED ACTIVE 4194304 CONCAT 4194304 0 c1t12d0 sd oradg03-01 oradgvolume-01-01 oradg03 0 v vol1 pl vol1-01 sd oradg02-01 vol1 vol1-01 ENABLED ENABLED oradg02 ACTIVE ACTIVE 0 4194304 4194304 4194304 SELECT CONCAT 0 c1t10d0

STRIPED VOLUME: 1. To create a striped volume

# vxassist g <disk-group> make <volume-name> length layout=stripe ncol=n stripeunit=size [disks]

Example: # vxassist g acctdg make payvol 26 layout=stripe ncol=3 !acctdg04 # vxassist g acctdg make export 2g layout=stripe ncol=3 stripeunit=64k acctg01 acctdg02 acctg03 Output: Striped volume:
bash-3.00# vxassist -g oradg make oradgvolume-03 1g layout=stripe bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE v v v v v oradgvolme-02 oradgvolume oradgvolume-01 oradgvolume-03 vol1 ENABLED DISABLED ENABLED ENABLED ENABLED ACTIVE EMPTY ACTIVE ACTIVE ACTIVE 2097152 2097152 4194304 2097152 4194304 SELECT ROUND SELECT SELECT SELECT fsgen fsgen fsgen oradgvolume-03-01 fsgen fsgen

bash-3.00# vxassist -g oradg make oradgvolume-04 1g oradg01 oradg02 layout=stripe bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE v v v v v v oradgvolme-02 oradgvolume oradgvolume-01 oradgvolume-03 oradgvolume-04 vol1 ENABLED DISABLED ENABLED ENABLED ENABLED ENABLED

STATE ACTIVE EMPTY ACTIVE ACTIVE ACTIVE ACTIVE

LENGTH 2097152 2097152 4194304 2097152 2097152 4194304

READPOL SELECT ROUND SELECT SELECT SELECT SELECT

PREFPLEX UTYPE fsgen fsgen fsgen oradgvolume-03-01 fsgen oradgvolume-04-01 fsgen fsgen

bash-3.00# vxassist -g oradg make oradgvolume-01 1g layout=stripe ncol=3 \!oradg03

RAID-5: 1. To create a Raid-5 volume

# vxassist g <disk-group> make <volume-name> length layout=raid5 ncol=n stripeunit=size [disks] a. b. default ncol=3 default stripe unit =16k

c. log is created by default. Therefore, we need atleast one or more disk than the number of coloumns.

Example: # vxassist g acctdg make payvol 10g layout=raid5

Output: Raid -5:


bash-3.00# vxassist -g oradg make oradgvolume-03 1g layout=raid5 bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE v oradgvolume v oradgvolume-01 v oradgvolume-02 v oradgvolume-03 -

STATE

LENGTH

READPOL

PREFPLEX UTYPE fsgen oradgvolume-01-01 fsgen oradgvolume-02-01 fsgen raid5

DISABLED EMPTY 2097152 ROUND ENABLED ACTIVE 2097152 SELECT ENABLED ACTIVE 1024000 SELECT ENABLED ACTIVE 2097216 RAID -

bash-3.00# vxprint -g oradg -hvt V NAME RVG/VSET/CO KSTATE PL NAME VOLUME KSTATE SD NAME PLEX DISK SV NAME PLEX VOLNAME SC NAME PLEX CACHE PARENTVOL LOGVOL DC NAME SP NAME SNAPVOL DCO EX NAME ASSOC VC

STATE STATE DISKOFFS NVOLLAYR DISKOFFS

LENGTH LENGTH LENGTH LENGTH LENGTH

READPOL LAYOUT [COL/]OFF [COL/]OFF [COL/]OFF PERMS

PREFPLEX NCOL/WID DEVICE AM/NM DEVICE

UTYPE MODE MODE MODE MODE

MODE

STATE fsgen RW ENA

v oradgvolume DISABLED EMPTY pl oradgvol01-01 oradgvolume DISABLED EMPTY sd oradg02-02 oradgvol01-01 oradg01 0 v pl sd sd sd v pl sd sd sd v pl sd sd sd sd pl sd

2097152 2097152 2097152

ROUND CONCAT 0

c1t11d0

oradgvolume-01 ENABLED ACTIVE 2097152 SELECT oradgvolume-01-01 fsgen oradgvolume-01-01 oradgvolume-01 ENABLED ACTIVE 2097408 STRIPE 3/128 RW oradg03-01 oradgvolume-01-01 oradg03 0 699136 0/0 c1t12d0 ENA oradg01-01 oradgvolume-01-01 oradg01 2097152 699136 1/0 c1t11d0 ENA oradg02-01 oradgvolume-01-01 oradg02 15704064 699136 2/0 c1t10d0 ENA oradgvolume-02 ENABLED ACTIVE 1024000 SELECT oradgvolume-02-01 fsgen oradgvolume-02-01 oradgvolume-02 ENABLED ACTIVE 1024512 STRIPE 3/256 RW oradgvolume-02-01 oradg03 699136 341504 0/0 c1t12d0 ENA oradg03-02 oradg01-02 oradgvolume-02-01 oradg01 2796288 341504 1/0 c1t11d0 ENA oradg02-03 oradgvolume-02-01 oradg02 16403200 341504 2/0 c1t10d0 ENA oradgvolume-03 ENABLED ACTIVE 2097216 RAID oradgvolume-03-01 oradgvolume-03 ENABLED ACTIVE 2097216 RAID oradgvolume-03-01 oradg05 0 699072 0/0 oradg05-01 1/0 oradg04-01 oradgvolume-03-01 oradg04 0 699072 oradgvolume-03-01 oradg03 1040640 699072 2/0 oradg03-03 oradg01-03 oradgvolume-03-01 oradg01 3137792 699072 3/0 oradgvolume-03-02 oradgvolume-03 ENABLED LOG 3840 CONCAT oradg02-04 oradgvolume-03-02 oradg02 16744704 3840 0 4/32 c1t2d0 c1t9d0 c1t12d0 c1t11d0 c1t10d0 raid5 RW ENA ENA ENA ENA RW ENA

MIRRORED VOLUME: To create a mirrored volume # vxassist g <disk-group> [-b] make <volume-name> length layout=mirror [mirror=number] Example: 1. # vxassist g datadg make datavol 5g layout=mirror

Concatenated mirror

2.

# vxassist g datadg make datavol 5g layout=stripe,mirror nmirror=3 specifying 3 mirrors

3.

# vxassist g datadg b make datavol 5g layout=stripe,mirror nmirror=3

Output: Mirror: bash-3.00# vxassist -g oradg make oradgvolume01 500m layout=mirror


bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE v oradgvolume DISABLED v oradgvolume01 ENABLED bash-3.00# vxprint -g oradg -hvt V NAME RVG/VSET/CO KSTATE PL NAME VOLUME KSTATE SD NAME PLEX DISK SV NAME PLEX VOLNAME SC NAME PLEX CACHE PARENTVOL LOGVOL DC NAME SP NAME SNAPVOL DCO EX NAME ASSOC VC STATE EMPTY ACTIVE STATE STATE DISKOFFS NVOLLAYR DISKOFFS LENGTH 2097152 1024000 LENGTH LENGTH LENGTH LENGTH LENGTH READPOL ROUND SELECT READPOL LAYOUT [COL/]OFF [COL/]OFF [COL/]OFF PERMS 2097152 2097152 2097152 ROUND CONCAT 0 PREFPLEX UTYPE PREFPLEX NCOL/WID DEVICE AM/NM DEVICE fsgen fsgen UTYPE MODE MODE MODE MODE

MODE

STATE fsgen RW ENA fsgen RW ENA RW ENA

v oradgvolume DISABLED EMPTY pl oradgvol01-01 oradgvolume DISABLED EMPTY sd oradg02-02 oradgvol01-01 oradg01 0 v pl sd pl sd

c1t11d0 c1t2d0 c1t9d0

oradgvolume01 ENABLED ACTIVE 1024000 SELECT oradgvolume01-01 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT oradg05-01 oradgvolume01-01 oradg05 0 1024000 0 oradgvolume01-02 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT 1024000 0 oradg04-01 oradgvolume01-02 oradg04 0

bash-3.00# vxassist -g oradg make oradgvolume02 500m layout=mirror nmirror=3 bash-3.00# vxprint -g oradg -vt READPOL PREFPLEX UTYPE V NAME RVG/VSET/CO KSTATE STATE LENGTH v v v oradgvolume oradgvolume01 oradgvolume02 DISABLED EMPTY ENABLED ACTIVE ENABLED ACTIVE 2097152 1024000 1024000 ROUND SELECT SELECT fsgen fsgen fsgen

bash-3.00# vxprint -g oradg -hvt V NAME RVG/VSET/CO KSTATE PL NAME VOLUME KSTATE SD NAME PLEX DISK SV NAME PLEX VOLNAME SC NAME PLEX CACHE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO EX NAME ASSOC VC

STATE STATE DISKOFFS NVOLLAYR DISKOFFS

LENGTH LENGTH LENGTH LENGTH LENGTH

READPOL LAYOUT [COL/]OFF [COL/]OFF [COL/]OFF PERMS

PREFPLEX NCOL/WID DEVICE AM/NM DEVICE

UTYPE MODE MODE MODE MODE

MODE

STATE fsgen RW ENA fsgen RW ENA RW ENA

v oradgvolume DISABLED EMPTY pl oradgvol01-01 oradgvolume DISABLED EMPTY sd oradg02-02 oradgvol01-01 oradg01 0 v pl sd pl sd

2097152 2097152 2097152

ROUND CONCAT 0

c1t11d0 c1t2d0 c1t9d0

oradgvolume01 ENABLED ACTIVE 1024000 SELECT oradgvolume01-01 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT oradg05-01 oradgvolume01-01 oradg05 0 1024000 0 oradgvolume01-02 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT oradg04-01 oradgvolume01-02 oradg04 0 1024000 0

v pl sd pl sd pl sd

oradgvolume02 ENABLED ACTIVE 1024000 SELECT oradgvolume02-01 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT 1024000 0 oradg03-01 oradgvolume02-01 oradg03 0 oradgvolume02-02 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradg05-02 oradgvolume02-02 oradg05 1024000 1024000 0 oradgvolume02-03 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradg04-02 oradgvolume02-03 oradg04 1024000 1024000 0

c1t12d0 c1t2d0 c1t9d0

fsgen RW ENA RW ENA RW ENA

bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE

STATE

LENGTH

LAYOUT

NCOL/WID MODE RW RW RW RW RW RW

pl oradgvolume01-01 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume01-02 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume02-01 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume02-02 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume02-03 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT pl oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT -

bash-3.00# vxassist -g oradg make oradgvolume03 200m layout=stripe,mirror bash-3.00# vxprint -g oradg -vt RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE V NAME v oradgvolume DISABLED v oradgvolume01 ENABLED v oradgvolume02 ENABLED v oradgvolume03 ENABLED bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE pl pl pl pl pl pl pl pl EMPTY ACTIVE ACTIVE ACTIVE STATE 2097152 1024000 1024000 409600 LENGTH ROUND SELECT SELECT SELECT LAYOUT fsgen fsgen fsgen fsgen

NCOL/WID MODE 2/128 2/128 RW RW RW RW RW RW RW RW

oradgvolume01-01 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT oradgvolume01-02 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT oradgvolume02-01 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradgvolume02-02 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradgvolume02-03 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradgvolume03-01 oradgvolume03 ENABLED ACTIVE 409600 STRIPE oradgvolume03-02 oradgvolume03 ENABLED ACTIVE 409600 STRIPE oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT

bash-3.00# vxassist -g oradg make oradgvolume04 200m layout=mirror,stripe bash-3.00# vxprint -g oradg -vt RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE V NAME v oradgvolume DISABLED v oradgvolume01 ENABLED v oradgvolume02 ENABLED v oradgvolume03 ENABLED v oradgvolume04 ENABLED bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE pl pl pl pl pl pl pl pl pl pl EMPTY ACTIVE ACTIVE ACTIVE ACTIVE STATE 2097152 1024000 1024000 409600 409600 LENGTH ROUND SELECT SELECT SELECT SELECT LAYOUT fsgen fsgen fsgen fsgen fsgen

NCOL/WID MODE 2/128 2/128 2/128 2/128 RW RW RW RW RW RW RW RW RW RW

oradgvolume01-01 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT oradgvolume01-02 oradgvolume01 ENABLED ACTIVE 1024000 CONCAT oradgvolume02-01 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradgvolume02-02 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradgvolume02-03 oradgvolume02 ENABLED ACTIVE 1024000 CONCAT oradgvolume03-01 oradgvolume03 ENABLED ACTIVE 409600 STRIPE oradgvolume03-02 oradgvolume03 ENABLED ACTIVE 409600 STRIPE oradgvolume04-01 oradgvolume04 ENABLED ACTIVE 409600 STRIPE oradgvolume04-02 oradgvolume04 ENABLED ACTIVE 409600 STRIPE oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT

MIRRORED VOLUME WITH LOG: 1.To create a mirrored volume with log # vxassist g diskgroup [-b] make <volume-name> length layout=mirror logtype-drl [nlog=n]

a. b.

logtype = drl (Dirty Log Region) enables drl nlog = n creates nlogs & is used when we want more than one log plex to be created

2.

To create a concatenated volume that is mirrored & logged

# vxassist g datadg make datavol 5m layout=mirror logtype=drl

ESTIMATING THE VOLUME SIZE: To determine largest possible size for a volume # vxassist g <disk-group> maximize attributes

Ex: # vxassist g datadg maxsize layout=raid5 Maximum volume size:376832 (184 mb)

To determine how much a volume can expand # vxassist g <disk-group> maxgrow volume

Ex: # vxassist g datadg maxgrow datavol Volume datavol can be extended by 366592 to 1677312 (819mb)

DISPLAYING VOULME INFORMATION: # vxprint g <disk-group> [options]

# vxprint g datadg ht | more Options: -ht, -vpsd, -r, -l, -A, -a

REMOVING A VOLUME: 1. When a volume is removed, the space used by the volume is freed and can be used elsewhere (We should only remove a volume, if we are sure that we we do not need the data in the volume) NOTE: 1. 2. A volume must be closed before it can be removed Must manually edit the OS-specific file system table

(/etc/vfstab) in order to remove the entry for the file system and avoid errors at boot time. 2. Unmount the file system before removing the volume

Syn: # vxassist g <disk-group> remove volume volme-name Ex: # vxassist g datadg remove volume datavol

Syn: # vxedit g <disk-group> -rf rm volume-name Ex: # vxedit g datadg rf rm datavol

Output: Removing the volume:


bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE v v v v v v oradgvolme-02 oradgvolume oradgvolume-01 oradgvolume-03 oradgvolume-04 vol1 ENABLED DISABLED ENABLED ENABLED ENABLED ENABLED STATE ACTIVE EMPTY ACTIVE ACTIVE ACTIVE ACTIVE LENGTH 2097152 2097152 4194304 2097152 2097152 4194304 READPOL SELECT ROUND SELECT SELECT SELECT SELECT PREFPLEX UTYPE fsgen fsgen fsgen oradgvolume-03-01 fsgen oradgvolume-04-01 fsgen fsgen

bash-3.00# vxassist -g oradg remove volume vol1 bash-3.00# vxassist -g oradg remove volume oradgvolme-02 bash-3.00# vxassist -g oradg remove volume oradgvolume01 bash-3.00# vxassist -g oradg remove volume oradgvolume-03 bash-3.00# vxassist -g oradg remove volume oradgvolume-04

bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE v oradgvolume -

STATE

LENGTH 2097152

READPOL ROUND

PREFPLEX UTYPE fsgen

DISABLED EMPTY

bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE

STATE

LENGTH

READPOL

PREFPLEX UTYPE

v oradgvolume DISABLED EMPTY 2097152 ROUND fsgen bash-3.00# vxassist -g oradg make oradgvolume-01 1g layout=stripe ncol=3 bash-3.00# vxprint -g oradg -vt RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE V NAME v v oradgvolume oradgvolume-01 DISABLED EMPTY ENABLED ACTIVE 2097152 2097152 ROUND SELECT fsgen oradgvolume-01-01 fsgen

bash-3.00# vxprint -g oradg -hvt V NAME RVG/VSET/CO KSTATE PL NAME VOLUME KSTATE SD NAME PLEX DISK SV NAME PLEX VOLNAME SC NAME PLEX CACHE PARENTVOL LOGVOL DC NAME SP NAME SNAPVOL DCO EX NAME ASSOC VC

STATE STATE DISKOFFS NVOLLAYR DISKOFFS

LENGTH LENGTH LENGTH LENGTH LENGTH

READPOL LAYOUT [COL/]OFF [COL/]OFF [COL/]OFF PERMS

PREFPLEX NCOL/WID DEVICE AM/NM DEVICE

UTYPE MODE MODE MODE MODE

MODE

STATE fsgen RW ENA

v oradgvolume DISABLED EMPTY pl oradgvol01-01 oradgvolume DISABLED EMPTY sd oradg02-02 oradgvol01-01 oradg01 0 v pl sd sd sd

2097152 2097152 2097152

ROUND CONCAT 0

c1t11d0

oradgvolume-01 ENABLED ACTIVE 2097152 SELECT oradgvolume-01-01 fsgen oradgvolume-01-01 oradgvolume-01 ENABLED ACTIVE 2097408 STRIPE 3/128 RW oradg03-01 oradgvolume-01-01 oradg03 0 699136 0/0 c1t12d0 ENA oradg01-01 oradgvolume-01-01 oradg01 2097152 699136 1/0 c1t11d0 ENA oradg02-01 oradgvolume-01-01 oradg02 15704064 699136 2/0 c1t10d0 ENA

bash-3.00# vxprint -g oradg -vt RVG/VSET/CO KSTATE V NAME v v v v v oradgvolume oradgvolume01 oradgvolume02 oradgvolume03 oradgvolume04 DISABLED ENABLED ENABLED ENABLED ENABLED

STATE EMPTY ACTIVE ACTIVE ACTIVE ACTIVE

LENGTH 2097152 1024000 1024000 409600 409600

READPOL ROUND SELECT SELECT SELECT SELECT

PREFPLEX UTYPE fsgen fsgen fsgen fsgen fsgen

bash-3.00# vxedit -g oradg -rf rm oradgvolume01 bash-3.00# vxprint -g oradg -vt RVG/VSET/CO KSTATE V NAME v v v v oradgvolume oradgvolume02 oradgvolume03 oradgvolume04 DISABLED ENABLED ENABLED ENABLED

STATE EMPTY ACTIVE ACTIVE ACTIVE

LENGTH 2097152 1024000 409600 409600

READPOL ROUND SELECT SELECT SELECT

PREFPLEX UTYPE fsgen fsgen fsgen fsgen

bash-3.00# vxassist -g oradg make oradgvolume-02 500m layout=stripe ncol=3 stripeunit=128k bash-3.00# vxprint -g oradg -vt V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE v v v oradgvolume oradgvolume-01 oradgvolume-02 DISABLED EMPTY ENABLED ACTIVE ENABLED ACTIVE 2097152 2097152 1024000 ROUND SELECT SELECT fsgen oradgvolume-01-01 fsgen oradgvolume-02-01 fsgen

bash-3.00# vxprint -g oradg -hvt

V PL SD SV SC DC SP EX

NAME NAME NAME NAME NAME NAME NAME NAME

RVG/VSET/CO VOLUME PLEX PLEX PLEX PARENTVOL SNAPVOL ASSOC

KSTATE KSTATE DISK VOLNAME CACHE LOGVOL DCO VC

STATE STATE DISKOFFS NVOLLAYR DISKOFFS

LENGTH LENGTH LENGTH LENGTH LENGTH

READPOL LAYOUT [COL/]OFF [COL/]OFF [COL/]OFF PERMS

PREFPLEX NCOL/WID DEVICE AM/NM DEVICE

UTYPE MODE MODE MODE MODE

MODE

STATE fsgen RW ENA

v oradgvolume DISABLED EMPTY pl oradgvol01-01 oradgvolume DISABLED EMPTY sd oradg02-02 oradgvol01-01 oradg01 0 v pl sd sd sd v pl sd sd sd

2097152 2097152 2097152

ROUND CONCAT 0

c1t11d0

oradgvolume-01 ENABLED ACTIVE 2097152 SELECT oradgvolume-01-01 fsgen oradgvolume-01-01 oradgvolume-01 ENABLED ACTIVE 2097408 STRIPE 3/128 RW oradg03-01 oradgvolume-01-01 oradg03 0 699136 0/0 c1t12d0 ENA oradg01-01 oradgvolume-01-01 oradg01 2097152 699136 1/0 c1t11d0 ENA oradg02-01 oradgvolume-01-01 oradg02 15704064 699136 2/0 c1t10d0 ENA oradgvolume-02 ENABLED ACTIVE 1024000 SELECT oradgvolume-02-01 fsgen oradgvolume-02-01 oradgvolume-02 ENABLED ACTIVE 1024512 STRIPE 3/256 RW oradg03-02 oradgvolume-02-01 oradg03 699136 341504 0/0 c1t12d0 ENA oradg01-02 oradgvolume-02-01 oradg01 2796288 341504 1/0 c1t11d0 ENA oradg02-03 oradgvolume-02-01 oradg02 16403200 341504 2/0 c1t10d0

CONFIGURING THE VOLUMES: ADMINISTERING MIRRORS: Adding a mirror to a volume: 1. Can add a mirror to an existing concatenated/Striped volume.

Only concatenated/striped volumes can be mirrored. 2. 3. 4. By default, a mirror is created with the same plex layout as the original volume. A mirrored volume requires at least 2 disks in the same disk group. Synchronization of the new plex is required.

NOTE: 1. Cannot add a mirror to a disk that is already being used by the volume. Syn: # vxassist g <disk-group> mirror volume [layout=layout-type] [disk-name] Ex: # vxassist g datadg mirror datavol

REMOVING A MIRROR: Why to remove a mirror? a. b. Removing a mirror frees the space occupied by that mirror To reduce the number of mirrors in a volume in order to reduce I/O to the volume.

Syn: # vxassist g <disk-group> remove mirror volume [!]dm-name Ex: # vxassist g datadg remove mirror datavol ! datadg02 To remove the plex that contains a sub-disk from the disk datadg02. NOTE: To remove the plex that contains a sub-disk froma specific disk [!] is used. # vxassist g datadg remove mirror datavol datadg0 To remove the plex that uses any disk expect datadg02 We can also used the vxplex and vxedit commands in combination to remove the mirror. # vxplex g <disk-group> dis plex-name # vxedit g <disk-group> -rf plex-name

Dirtly Region Logging for mirrored volumes 1. 2. Logs keep track of changed regions If the system fails, only the changed regions of volume must be recovered

Output:

bash-3.00# vxassist -g oradg make oradgvolume-02 500m layout=mirror nmirror=4 bash-3.00# vxprint -g oradg -vt READPOL PREFPLEX UTYPE V NAME RVG/VSET/CO KSTATE STATE LENGTH v v v oradgvolume oradgvolume-01 oradgvolume-02 DISABLED EMPTY ENABLED ACTIVE ENABLED ACTIVE 2097152 2048000 1024000 ROUND SELECT SELECT fsgen fsgen fsgen

bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE

STATE

LENGTH

LAYOUT

NCOL/WID MODE RW RW RW RW RW RW

pl oradgvolume-01-01 oradgvolume-01 ENABLED ACTIVE 2048000 CONCAT pl oradgvolume-02-01 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume-02-02 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume-02-03 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume-02-04 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT pl oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT -

bash-3.00# vxassist -g oradg remove mirror oradgvolume02 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE

STATE

LENGTH

LAYOUT

NCOL/WID MODE RW RW RW RW RW MODE RW RW RW RW

pl oradgvolume-01-01 oradgvolume-01 ENABLED ACTIVE 2048000 CONCAT pl oradgvolume-02-01 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume-02-03 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT pl oradgvolume-02-04 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT pl oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT bash-3.00# vxassist -g oradg remove mirror oradgvolume-02 bash-3.00# vxprint -g oradg -pt PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID pl pl pl pl oradgvolume-01-01 oradgvolume-01 ENABLED ACTIVE 2048000 CONCAT oradgvolume-02-01 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT oradgvolume-02-04 oradgvolume-02 ENABLED ACTIVE 1024000 CONCAT oradgvol01-01 oradgvolume DISABLED EMPTY 2097152 CONCAT vxassist -g oradg remove mirror oradgvolume-02

bash-3.00# \!oradg03

ADDING / REMOVING THE LOG: Syn: # vxassist g <disk-group> addlog volume [logtype=drl] [nlog=n] [attributes]

1.

To add a dirty regions log to an existing mirrored volume.

# vxassist g datadg addlog datavol logtype=drl

2.

To add a Raid-5 log to a Raid-5 volume, no log type is needed

# vxassist g acctdg addlog payvol

3.

To remove a log from a volume

# vxassist g diskgroup remove log [nlog=n] volume

RECONFIGURING VOLUME ONLINE: REMOVING A VOLUME: To resize a volume, a. b. specify a desired new volume size add to or subtract form the current volume size

Expanding a volume provides more space to users: 1. 2. Disk space must be available VXVM assign disk space, or can specify disks

Shrinking a volume enable to use space elsewhere. VXVM returns space to the free space pool.

If volume is resized, its file system must also be resized, a. b. c. vxfs can be expanded or reduced while mounted ufs can be expanded but not reduced ensure that the data manager application supports resizing.sss

RESIZING A VOLUME: 1. Can expand and shrink a mounted veritas files system but unmounted veritas file system cannot be changed. 2. A mounted or unmounted ufs can only be expanded. syn:# vxresize [-b] fstype -g <disk-group> volume [+/-] new-length for ex: Original volume size : 10 mb 1. # 2. # 3. # 4. # vxresize vxresize vxresize vxresize -g -g -g -g mydg mydg mydg mydg myvol myvol myvol myvol 50m +10m 40m -10m

Output: Resizing: bash-3.00# vxresize -g oradg oradgvolume04 +100m bash-3.00# df -F vxfs -h Filesystem size used avail capacity /dev/vx/dsk/oradg/oradgvolume04 300M 2.2M 279M 1% bash-3.00# vxresize -g oradg oradgvolume04 +300m bash-3.00# df -F vxfs -h Filesystem size used avail capacity /dev/vx/dsk/oradg/oradgvolume04 600M 2.2M 560M 1%

Mounted on /mnt/volume04

Mounted on /mnt/volume04

bash-3.00# vxresize -g oradg oradgvolume04 -300m bash-3.00# df -F vxfs -h Filesystem size used avail capacity /dev/vx/dsk/oradg/oradgvolume04 300M 2.2M 279M 1% bash-3.00# vxresize -g oradg oradgvolume04 700m bash-3.00# df -F vxfs -h Filesystem size used avail capacity /dev/vx/dsk/oradg/oradgvolume04 700M 2.3M 654M 1% bash-3.00# vxresize -g oradg oradgvolume04 500m bash-3.00# df -F vxfs -h Filesystem size used avail capacity /dev/vx/dsk/oradg/oradgvolume04 500M 2.2M 467M 1%

Mounted on /mnt/volume04

Mounted on /mnt/volume04

Mounted on /mnt/volume04

Resizing a volume using vxassist: syn: # vxassist -g <disk-group> [growto|growby|shrinkby| shrinkto] volume-size For example: Original volume size: 20mb 1. # 2. # 3. # 4. # vxassist vxassist vxassist vxassist -g -g -g -g datadg datadg datadg datadg growto datavol 40m growby datavol 10m shrinkto datavol 30m shrinkby datavol 10m

Resizing a file system using fsadm: syn: # fsadm [fs-type] [-b new-size] [-r raw-dev] mount-point examle: Expand the file system/datavol from 512000 sectors to 1024000 sectors 1. verify the free space on the underlying device: # vxdg -g datadg free 2. Expand the volume using vxassist # vxassist -g datadg growto myvol 1024000 3. Expand the file system using fsadm #fsadm -F vxfs -b 1024000 -r /dev/vx/rdsk/datadg/datavol /datavol 4. Verify that the file system was resized by using dg: # df -k /datavol

Resizing a dyanmic LUN: 1. If we resize a LUN in the hardware, we should resizse the VxVM disk corresponding to that LUN. 2. Disk headers and other VxVM structures are updated to reflect the new size. 3. Intended for devices that are part of an imported disk group syn: # vxassist [-f] -g <disk-group> resize {access-name|media-name} length=attribute eg: vxassist -g datadg resize datadg01 length=8GB

What is encapsulation? 1. A process that converts existing partions on a specified disk to volumes. If any partitions cntain file systems, /etc/vfstab entires are modified so that the file system are mounted on volumes instead. (or) 2. Encapsulation is the process of converting partitions into volumes to bring those partitions under VxVM control. 3. Encapsulation converts existing partitions into volumes, which provides continued access to the data on the disk after a reboot. After a disk has been encapsulated, the disk is handl;ed in the same way as an initialized disk. NOTE: 1. Encapsulation - preseves the data on the disk 2. Initialization - Destroys the data on the disk Requirements: 1. One free partition for private & public region 2. S2 slice that represents the full disk 3. 2048 sectors free at beginning or end of disk for private region.

What is rootability? 1. Rootability is the process of encapsulating the root file system, swap device and other file system on the boot disk under VxVM contol. 2. Volume manager converts existing partitions of the boot disk into volume manager volumes. 3. The system can then mount the standard boot disk file system from volumes instead of disk partitions. 4. When encapsulating the boot disk, the private regions can be created form the swap area, which reduces swap area by the size of the private region. The private region is created at the begining of the swap area, and the swap partition begins one cylinder from its original location. 5, requirements are the same as for the data disk encapsulation, but the private regions is created at the swap space. Why encapsulate the boot disk? Shuld encapsulate the boot disk only if we plan to mirror the boot disk.

Benefits of mirroring the boot disk: 1. Enables high availability 2. Fixes bad blocks automatically. If the boot disk has bad blocks, thn volumemanager reads the blocks from the other disk and copes it back to the bad block to fix it. 3. Improves performance Limitations of boot disk encapsulation: 1. Encapsulating the boot disk adds steps to OS upgrades. 2. A system cannot boot from a boot disk that spans multiple devices. 3. We should never grow or change the layout of the boot disk volumes. These volumes map to physical underlying partition on disk and must be contiguous. File system requirements: For root, usr, var and opt volumes: 1. use ufs file systems (VXFS is not avialable until later in the boot process) 2. use contiguous disk space. (Volumes cannot use striped, raid-5 concatenated mirrored or striped mirrored layouts) 3. Do not use drl (dirty log region) on system volumes. For swap, 1. The first swap volume must be contiguous and therefore cannot use striped or layerd layouts. 2. Other swap voulumes can be non-contiguous and can use any layout. However there is an implied 2gb limit of usable swap space per device for 32 bit operating system.

Before encapsulating the boot disk: 1. When we place the boot disk under volume manager control, volume manager sets bootdg to the appropriate disk group. 2. Set the eeprom variable # eeprom use-nvramrc? true This enable volume manager to take advantage of boot disk aliases to identify the mirror of the boot disk if a replacemebt is required. If this variable is assigned as false, we must determine which disks are bootable. With VXVM 4.0 # vxdiskadm "Encapsulate one or more disks" Note: Sliced disk format. The boot disk cannot be a CDS disk # /etc/vx/bin/vxencap -g diskgroup access-name After boot disk encapsulation; View OS specific files to better understand the encapsulation process. /etc/system /etc/vfstab VTOC NOTE: VTOC tag no 14 - used for private region tag no 15 - used of public region Creating an alternate boot disk

Alternated boot disk : Requirements: 1. An alternated boot disk is a mirror of the entire boot disk. An alternate boot disk presevers the boot blocka in the case the intitial boot disk fails. 2. Creatng an alternated boot disk requires, a. the boot disk be encapsulated by VXVM b. Another diks be available with enough disk space to contian all of the boot disk partitions c. Can use only the disks in the boot disk group. 3. The root mirror places the private region at the beinning of the disk, The remaining partitions are placed after the private region. 1. To mirror the root volume only: # vxrootmir alternate-disk 2. To mirror all other un-mirrored, concatenated volumes on the boot disk to the alternate disk: # vxmirror boot-disk alternate-disk 3. To mirror other volumes to the boot disk or other disks: # vxassist mirror homevol alternate-disk 4. To setup system boot information on a VxVM disk # vxbootsetup

Boot from an alternate mirror: To boot the system using an alternate boot disk after failure of the primary boot disk, 1. Set the eeprom variabl OK setenv use-nvramrc? true OK reset This above variable must be set to true to enable the use of alternate boot disks. 2. Check for available boot-disk aliases OK devalias {output displays the name of the boot disk and available mirrors} vx-rootdisk Vx-diskname 3. Boot from an available boot disk alias OK boot vx-diskname

Unencapuslating a boot disk: 1. To unencapsulate a boot disk, use vxunroot Requirements: Remove all but one plex of rootvol, swapvol, usr, var, opt and home. 2. Use vxunroot when we need to a. Boot from physical system partitions b.Chnge the size or location of private region on the boot disk c. upgrade both the os and VxVM Note: Do not use vxunroot if we aer only upgrading VxVM packages, including the VEA package. 1. Ensure that the boot disk volumes, volumes only have one plex each.

# vxprint -hvt rootvol swapvol usr var 2. If boot disk volumes have more than one plex each, remove the unnecessary plexes. # vxplex -o rm dis plex-name 3. Run the untility # vxunroot VXVM ROOT MIRRORING: 1. When root mirroring is implemented, make sure that encapsulation is selected. choose option: 2 # cp /etc/system /system.orig # cp /etc/vfstab /vfstab.orig # vxdiskadm Select option : 2 " Add one or mode disk for encapsulation Select the system disk: c0t0d0

2. Then restart the system Note: a. 2 times reboot will happen. now veritas will take the control of root file system b. new slice name changed in /etc/vfstab as rootvol, swapvol c. no need to install boot block # vxdiskadm # vxprint # vxassist mirror rootvol # vxassist mirror swapvol # vxprint # vxassist mirror usr # vxprint # vxassist mirror var # vxprint not, targer 0 is removed # vxprint # init 6 OK boot disk1 Now, insert the new disk in the target 0 # vxdiskadm

Select the option:5 (if not detected) Select the option:2, then again option5

BREAKING THE MIRROR: Only mirrored volume has to be removed # vxplex -o rm dis rootvol-02 dis-disassociate # vxplex -o rm dis swapvol-02

how to revert the /etc/system & /etc/vfstab # /etc/vx/bin/vxunroot

HOT RELOCATON The system automatically reacts to i/o failures on redundant VxVM objects and restores redundancy to those objects relocating affected sub-diks. NOTE: Sub-diks are relocated to disks designated as spare disks or to free space in the disk group. 1. vxrelocd detects the disks failure 2. root (admin) is notified 3. sub-diks are relocated to a spare 4.volume recovery is attempted.

Note: Trouble shooting: bash-3.00# vxconfigd -k bash-3.00# vxiod set 10 bash-3.00# vxconfigd -m disable VxVM vxconfigd ERROR V-5-1-7840 cannot open /dev/vx/config: Device is already open bash-3.00# vxdctl init bash-3.00# vxdctl enable bash-3.00# vxdctl mode mode: enabled

MOUNT FILE SYSTEM AT BOOT: To mount the file system automatically at boot time, edit the OS-specific file system table file to add any entry for the file system. Specific information such as

1. 2. 3. 4. 5. 6. 7.

Device to mount - /dev/vx/dsk/datadg/datavol Device to fsck - /dev/vx/rdsk/datadg/datavol Mount point - /data File system type vxfs fsck pass 1 Mount at boor Yes Mount options - -

Reference on # vxassist Introduction : 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.

Using # vxassist we can perform the following: 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 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 12.Next Steps

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 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

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. Command syntax : 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. Command Syntax : 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. Command Syntax : 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, Command syntax vxassist growto volume_name length To extend vol3 upto 8000 sectors, type: #vxassist growto vol3 8000 2.2 Extending by a Given Length

Command Syntax vxassist growby volume_name length To extend volapp by 1000 sectors, type: #vxassist growby volapp 1000 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 Shrink a volume to a specific length as follows: 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 Shrink a volume by a specific length as follows: 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 : Command Syntax

vxvol stop volume_name To stop appvol1 #vxvol stop appvol1 Removing Volume Command Syntax vxedit -rf rm volume_name To remove the volume appvol1 #vxedit -rf rm appvol11 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 Command Syntax : 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 Command syntax 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 disk0102 volm-01 - 10240 0 - - - pl volm-02 volm ENABLED 10240 - ACTIVE - - sd disk02-03 volm02 - 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 disk0102 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. The following example creates 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. Dissociate the log from its volume as follows: #vxplex -o rm dis plex_name To identify the log plex, use the command: vxprint -ht raid5_volume_name 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 volrd01 - 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 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 . Command Syntax: vxassist snapstart volume_name

To create a snapshot mirror of a volume called vol8, type #vxassist snapstart vol8

Create a snapshot volume Command Syntax 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 DM NAME V NAME PL NAME SD NAME dg rootdg NCONFIG NLOG MINORS GROUP-ID DEVICE TYPE PRIVLEN PUBLEN STATE USETYPE KSTATE STATE LENGTH READPOL KSTATE STATE LENGTH LAYOUT VOLUME PLEX DISK DISKOFFS LENGTH [COL/]OFF 759096729.1025.tweety

PREFPLEX NCOL/WID MODE DEVICE MODE

dm disk10 dm disk20

c1t0d0s2 sliced c2t0d0s2 sliced

559 559

1044400 1044400 2288 2288 2288 20480 20480 20480

SELECT CONCAT 0 c0t0d0 SELECT CONCAT 0 c0t1d0

v pubs fsgen ENABLED ACTIVE pl pubs-01 pubs ENABLED ACTIVE sd disk10-01 pubs-01 disk10 0 v vol8 fsgen ENABLED ACTIVE pl vol8-01 vol8 ENABLED ACTIVE sd disk10-02 vol8-0 disk10 2288

RW ENA

RW 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 vol8

TCP WRAPPERS Is a package developed by Wietse Vernema, who also wrote the SATAN security package. Is an IP packet filtering and network access logging facility for inetd. TCP_wrappers is usually configured to wrap itself around TCP based services defined in inetd.conf. Is used to restrict access to TCP services based on the hostname, IP address, network address etc. TCP wrappers was integrated into Solaris starting in Solaris-9, where both Solaris Secured Shell and inet based services were wrapped. What TCP wrappers does? 1. Provides system administrators a high degree of control over incoming TCP connections. The system is invoked after a remote host connects to our server/machine. It is involved either through a sub-routine library that is linked into the stand alone program stacked up through inetd. 2. Once running, the TCP wrappers system performs the following steps; a. Open the /etc/hosts.allow file Note: 1. /etc/hosts.allow and /etc/hosts.deny file will not exist by default. 2. Both file contains access control rules and actions for each protocol. b. It scans through the files, line by line, until it finds a rule that matches the particular protocol and source host that has connected to the server. c. It executes the actions specified. If appropriate, control is then turned over to the network server. d. If no matching action is found, the file /etc/hosts.deny is opened and sequentially read line by line. If a matching line is found, access is denied and the corresponding action is performed. e. If no match is found in either the /etc/hosts.allow or /etc/hosts.deny file, the connection is allowed by default. To enable TCP wrappers support for inet based services: For eg: # inetadm M tcp_wrappers=true # svcadm refresh inetd # inetadm l telnet | grep tcp_wrapper Default tcp_wrappers=TRUE

Example entries to file /etc/hosts.allow or /etc/hosts.deny: Note: Remember its case sensitive. ALL : ALL ALL : <host_name1, host_name2> in.telnetd : ALL EXCEPT < host_name1, host_name2> ALL EXCEPT in.telnetd : < host_name1, host_name2> ALL : 192.168.10.0/255.255.255.0 Note: 1. Host names can also replaced with IP addresses. 2. /etc/hosts.deny should contain only a single rule ALL:ALL to deny all access by default. Keeping all the rules in a single file simplifies maintenance. Using /etc/hosts.allow, which has priority over /etc/hosts.deny, ensures that if someone else accidently modifies the wrong filem it wont override out rules.

IPF IP Filter 1. All packets coming in are not only filtered as they enter the firewall, also filtered as they exit. 2. Is an integral component of Solaris-10. 3. Configuration file: /etc/ipf/ipf.conf 4. There is one rule per line 5. White space is allowed, and is encouraged to keep the rules readable. 6. Ipf filters by : a. IP address b. Netmask 7. Ipf can be implemented to the machine which is acting as a gateway. 8. Basic Rule Processing: a. Rules are processed from top to bottom, each one appended after another. b. Many packet filters stop comparing packets to rule sets the moment the first match is made; IPF is not one of them. For example, block in all pass in all Here, the reads the first line first. I.e., block in all and then pass in all c. Ipf will go through the entire rule set, making its decision on whether or not to pass or drop the packet based on the last matching rule. There is no cumulative effect. The last matching rules always take place. Before configuring the firewall: 1. Behavior of firewall has to be learnt. 2. An action pass/block 3. A direction in/out (inbound/outbound) Direction keyword relates to the movement of the packet in relation to the system on which the Solaris-10 is running. 4. Criteria which are compared against the packet to determine whether the packet matches the rule. Characteristic or action performed by firewall: 1. Compare the packet against the direction & criteria in the rule. 2. If the packet matches, remember the action specified in the rule. 3. Discard any action remembered previously. 4. If the end of the rule is reached or the matched rule contains the quick keyword, stop matching and perform the action. 5. If no rule match, pass the packet.

Enabling packet filtering with Solaris IP filter: 1. pfile kernel module has to be loaded to the network interface to work with IPfilter utility. 2. pfil is loaded to the network interface when its plumbed. 3. /etc/ipf/pfil.ap Remove comment (#) character from the appropriate lines for the network interface for which filtering is to be configured. 4. Note: Any existing plumbed network interface to which we choose to apply filtering must be unplumbed and plumbed. # autopush f /etc/ipf/pfil.ap Read changes performed on the file.

IP filter services: svc: /network/pfil svc: /network/ipfilter Note: 1. /usr/share/ipfilter/examples Provides some example files on ipf. 2. Be familiar with the function of the ports. In some cases both the server & client uses the same port (for eg: routing protocol) and in other cases server & client uses different ports. For additional information ref: # man ipf.conf 3. # ipf f /etc/ipf/ipf.conf Takes the name of the file containing the new rules as an argument. 4. Options to the ipf command are executed in order in which they are specified on the command line. If a flush option is specified after an add rules option, the new rules will be added, then flushed along with the old rules. To clear the existing rules and load a new updated set, the flush option must be specified first. 5. # ipfstat will not display the rules in order. It displays the OUT rules order first then IN rules in order. 6. # ipmon /var/tmp/test_ipf_log Logging the information to a file 7. # ipmon D /var/tmp/test_ipf_log To make ipmon to run as a daemon. To configure the ipmon command to run as a daemon and to send logging information by using syslogd daemon to /var/adm/iplog file (created by us). # vi /etc/syslog.conf Edit: local0.notice /var/adm/ipflog :wq! # touch /var/adm/iplog # pkill HUP syslogd # ipmod D s Message Level: 1. local0.error 2. local0.warning 3. local0.notice 4. local0.info

Packets that are logged and are short. Packets blocked by Solaris IP filter firewall Packets passed by Solaris IP filter firewall Packets matching a logged rule, but do not have the action associated With the rule applied. This information tells us that the packets Matches the rule, but has been matched by later rule in /etc/ipf/ipf.conf file subsequently.

# ipfstat 1. 2. 3. 4.

How our firewall is performing? How many packets have been passed/blocked? Are they logged or not? How many entries have been made?

# ipmon 1. Used to monitor

2. Tool, capable of watching the packet log 3. Can log to a file or to syslog. 4. Logged information is sent to /dev/ipl devices. # ipmon is used to read the logs from that device. IN Inbound - Inbound traffic is all traffic that enters the firewall on the interface. OUT Outbound - All traffic that leaves on any interface whether locally generated or simply passing through.

Example entries: 1. block pass 2. block block block pass in in in in in in quick from all quick from quick from quick from all 192.168.0.0/16 192.168.0.0./16 172.16.0.0/12 10.0.0.0/8 to to to to any any any any

So here all the private IPs are blocked. 3. Passing/allowing the packets on particular interface: block in quick on bge0 all pass in all Where, in = incoming packets on = on the specified interface This rule will block only the incoming packets coming through the specified interface bge0. Rest is allowed. 4. Using IP address and interface together: block in quick on bge0 from 192.168.0.0/16

to

any

5. Out going packets: pass out quick on block out quick on

bge0 bge0

from 10.0.0.8 from any to

to any

any

6. Logging the information: block in log quick on

bge0

from

10.0.0.0/8

to

any

7. Controlling specific protocols: ICMP Used by # ping command block in log quick on bge0 Note:

proto icmp

from

any

to

any

1. Port based filtering can be applied to the source address or the destination address. 2. Note that the spaces on either side of = (equal) sign are required (port = 23). 8. Filtering ICMP with icmp type: quick on bge0 proto icmp from any to 10.0.0.0/8 icmp_type 0 pass in pass in quick on bge0 proto icmp from any to 10.0.0.0/8 icmp_type 1

9. Passing/blocking through port: This can be done for both TCP & UDP. block in log quick on bge0 proto block in log quick on bge0 proto block in log quick on bge0 proto block in log quick on bge0 proto

tcp from tcp from tcp from tcp from

any any any any

to 10.0.0.0/8 to 10.0.0.0/8 to 10.0.0.0/8 to 10.0.0.0/8

port = 513 port = 514 port = 23 port = 21

Note: rlogin = 513 , rsh = 514, telnet = 23, rpc/nfs & port map = 111 10. To block both TCP/UDP: block in log quick on nbge0 proto tcp/udp from any to 10.0.0.0/8 port = 111

REMOTE SYSTEM CONSOLE

Overview of the Sun Remote System Console:

. 1. 2.

Sun RSC is a server management tool that allows us to monitor & control our server over modem lines and over a network. Provides remote system administration for geographically distributed or physically inaccessible systems.

RSC access: From workstation running on Solaris, win 9x or win NT. NOTE: The sever can boot and operate normally when the RSC software is not enabled, and Sun console features continue to be available on standard RS232 ports.

RSC features: 1. Remote system monitoring, error monitoring, including output from power-on self test and OBP diagnostics. 2. Remote server reboot, power on & power off on demand. 3. Ability to monitor the CPU temperature and fan sensors without being near the managed server, even when the server is in offline. 4. To run diagnostic tests from a remote console. 5. Remote event notification of server problems 6. Detailed log of RSC events 7. Remote console functions on both the serial & Ethernet ports

Monitoring tools: Complemented by RSC 1. Solstice SYMON a. Main & popular tools b. Main tool for observing system operation behavior and performance while the server operating system is up and running. 2. SUN VTS 3. Kadb kernel debugger 4. OBP 5. Open Boot Diagnostics OBDiag

RSC use: 1. After installing and configuring SUNRSC s/w on the server & client, we can use OBP commands & set OBP variables that redirect the console output to RSC 2. Part of RSC configuration defines & enables alert mechanisms. a. Alerts provide remote notification of system problems. b. It can be sent to pagers, mails, to any clients that are currently logged into RSC. 3. RSC generate alert messages whenever the following error occurs a. server system resets b. server temperature crosses the lower & higher fault c. sever redundant power supply fails

4. 5. 6. 7.

8.

d. power outage occurs at the server site, if an un-interruptible power supply is in use and it is configured to send an alert to RSC. e. Sever undergoes a h/w watch dog reset. f. Detects 5 un-successful RSC login attempts within 5 min Each alert message includes sever name & other important details RSC controls whether an alert is sent to mail/pager. It always sent alert to any client currently logged into RSC accounts for that server. If server is running & if tools available - SUN VTS - Solstice SyMON If not running tools may be available through X windows If server is not running & if no tools a. RSC feature to delay the server - Show environmental information - Put the server in debug mode - Control sever firmware behavior - Turn server power off & then on if the server is hung

View logs Displays detailed log of RSC errors, events & RSC command history Displays & reset server console logs

RSC configuration: Can control RSC configuration settings for - Alerts - Ethernet ports - Serial ports - RSC date & time - RSC password - RSC user account 1. supports upto 4 protected password user account for each managed server 2. each with customizable access rights User-permissions: -a administration permission, authorized to change the stat of RSC configuration variables -u user administration permissions, authorized to use commands that add & delete users, change user permissions & change the authorization level of other users. console permission; authorized to connect to the server console Reset/power permission, authorized to reset, power-on & power off the server & reboot RSC.

-c -r

User interface: - Graphical Runs using SUN java (RSC- SUNWrscj) Command line Using standard telnet to RSC ehternet port To the RSC serial port using PPP (Point-to-point protocol)

Can also be accessed by connectivity on ASCII character terminal directly to the RSC serial port. Note: RSC always sent alert messages to any users that are logged into RSC accounts rsradm utility / RSC interfaces to configure RSC after installation

Installation RSC s/w: SUN RAC s/w is installed as two separate components, 1. Server s/w installed on a SUN enterprise server to enable RSC h/w. 2. Client s/w installed on a Solaris/windows based client work station to provide the RSC graphical user interface Note: RSC java application is installed on a Solaris client machine, it resides in the directory /opt/rsc by default. To run RSC GUI Java application at client, it must have Java Development kit for Solaris version 1.1.6

Packages required: SUNWrsc - the RSC base package for installation on the host machine SUNWrscd - the RSC documentation package SUNWrscj - the RSC GUI package to be installed on any system wanting to display the RSC GUI These undermentioned models of the Sun Machines are supported by the current RSC version. Enterprise 250 Sun Fire 280R Sun Fire V880 Sun Fire V480 Sun Fire V890 Sun Fire V490

Running the server configuration script: # /usr/platform/uname i/rsc/rsc-config # /ust/platform/uname i/rsc/rscadm <command? For eg: # /usr/platform/uname i/rsc/rscadm usershow Note: # uname i Returns the model of the system

Redirecting the console to RSC: - After RSC s/w is installed & configured, the system console is still available as on any normal SUN machine. - At server perform the following OK diag-output-to rsc OK setenv input-device rsc

OK setent output-device rsc These commands takes effect after the next server reset

To remove RSC from default console: - OK diag-output-to ttya OK setenv input-device keyboard OK setenv output-device screen - these commands takes effect after the next server reset

Some RSC shell commands: environment displays current environmental information showenvironment - same as environment show network displays the currrent n/w configuration console connects to the server console break puts the server in debug mode version displays version number of RSC firmware & componets showsc same as version without the v option help displays a list of RSC shell commands & brief description of each 9. poweron power on the server 10. poweroff power off the server 11. log history displays the history of all events oggedi the RSC even buffer 12. reset resets the server immediately 13. userperm sets the authorization for a user 14. userpassword set or changes a users password 15. date displays/sets the current time & date 16. set set a configuration variable 17. show displays one/more configuration variable 18. useradd adds an RSC user account 19. userdel deletes an RSC user account 20. usershow show characteristics of an RSC user account 1. 2. 3. 4. 5. 6. 7. 8.

Output: Configuring the rsc software: bash-3.00# /usr/platform/`uname -i`/rsc/rsc-config Continue with RSC setup (y|n): y Set RSC date/time now (y|n|?) [y]: y Server Hostname [fire1]: fire1 Edit customer info field (y|n|?) [n]: n Enable RSC Ethernet Interface (y|n|s|?) [n]: y RSC IP Mode (config|dhcp|?) [dhcp]: config RSC IP Address []: 100.0.0.120 RSC IP Netmask [255.255.255.0]: 255.0.0.0 RSC IP Gateway []:

Enable RSC Alerts (y|n|s|?) [n]: y Enable Email Alerts (y|n) [n]: n Enable Pager Alerts (y|n) [n]: n Enable RSC Modem Interface (y|n|s|?) [n]: n Enable RSC Serial Port Interface (y|n|s|?) [n]: n Setup RSC User Account (y|n|?) [y]: y Username []: rscuser User Permissions (c,u,a,r|none|?) [cuar]:

-------------------Verifying Selections -------------------General Setup ------------Set RSC date now = y Server Hostname = fire1 Set Customer Info = n Is this correct (y|n):y Ethernet Setup -------------IP Mode IP Address IP Netmask IP Gateway

= config = 100.0.0.120 = 255.0.0.0 =

Is this correct (y|n): y

Alert Setup ----------Email Enabled Paging Enabled

= n = n

Is this correct (y|n):y Modem Setup ----------- Modem disabled, ppp disabled Is this correct (y|n): y

Serial Port Setup ----------------- Serial port disabled Is this correct (y|n): y

User Setup ---------User Name = rscuser User Permissions = cuar Is this correct (y|n): y This script will now update RSC, continue? (y|n):y Updating flash, this takes a few minutes ........................................ ........................................ ........................................ ........................................ ........................................ ........................................ ....................................... . ........................... Download completed successfully Download completed successfully Resetting RSC (takes about 90 seconds): DONE Setting up server to update RSC date on boot: DONE Setting up server hostname: DONE Setting up ethernet interface: DONE Disabling RSC alert engine: DONE Disabling modem interface: DONE Disabling serial port interface: DONE Adding user to RSC: A valid password is between 6 and 8 characters, has at least two alphabetic characters, and at least one numeric or special character. The password must differ from the user's login name and any reverse or circular shift of that login name. Setting User Password Now ... Password: Re-enter Password: rscadm: malformed password A valid password is between 6 and 8 characters, has at least two alphabetic characters, and at least one numeric or special character. The password must differ from the user's login name and any reverse or circular shift of that login name. Password: Re-enter Password: User has been added to RSC Resetting RSC (takes about 90 seconds): Are you sure you want to reboot RSC (y/n)?

DONE Setting up RSC date: DONE ******************************* RSC has been successfully setup *******************************

To obtian the help of rscadm command: bash-3.00# /usr/platform/`uname -i`/rsc/rscadm help

USAGE: rscadm <command> [options] For a list of commands, type "rscadm help" rscadm - COMMANDS SUPPORTED help, date, set, show, resetrsc, download, send_event, modem_setup, useradd, userdel, usershow, userpassword, userperm, shownetwork, loghistory, version rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm rscadm COMMAND DETAILS help => this message date [-s] | [[mmdd]HHMM | mmddHHMM[cc]yy][.SS] => print or set date set <variable> <value> => set variable to value show [variable] => show variable(s) resetrsc [-s] => reset RSC (-s soft reset) download [boot] <file> => program firmware or [boot] monitor send_event [-c] "message" => send message as event (-c CRITICAL) modem_setup => connect to modem port useradd <username> => add RSC user account userdel <username> => delete RSC user account usershow [username] => show user details userpassword <username> => set user password userperm <username> [cuar] => set user permissions shownetwork => show network configuration loghistory => show RSC event log version => show RSC version

bash-3.00# uname -i SUNW,Sun-Fire-280R

For eg: bash-3.00# /usr/platform/`uname -i`/rsc/rscadm version

RSC Version v2.2.3 RSC Bootmon Version: v2.0.0 RSC Firmware Version: v2.2.3 bash-3.00# /usr/platform/`uname -i`/rsc/rscadm usershow

username -------fire280 root shivan rsc

permissions ----------cu-cuar cuar cuar

password -------Assigned Assigned Assigned Assigned

What tools for what tasks? FOREWORD: The most common error in systems performance analysis is to study the entrails of a system without at the same time measuring how well the system is doing what it was meant to do. Generically, those measures are referred to as 'Business Metrics', and they are always stated in terms of response-time, throughput, variance, efficiency ($/metric or BTU/metric) -- or estimations of latent capacity to grow or improve such metrics. Amomg the more common names for these, you might see: Business Metrics and Indicators (BMIs), and Key Performance Indicators (KPIs)

It is important to remember that 'indicators' are not 'business metrics', and that one's goal in performance analysis should always be focused on business metrics. It's often good to be able to correlate indicators with business metrics, but generally bad to confuse the two. So - while drinking in the wealth of instrumentation available through Solaris instrumentation, the reader is admonished to keep foremost in their mind: "What problem are you trying to solve?" System Statistics acctcom process accounting busstat Bus hardware counters cpustat CPU hardware counters iostat IO & NFS statistics kstat display kernel statistics mpstat Processor statistics netstat Network statistics nicstat - Enhanced network statistics nfsstat NFS client and server stats sar kitchen sink utility vmstat virtual memory stats fsstat - File system statistics ::memstat - Memory Summary filestat - UFS Block Layout Statistics statit - System Statistics Utility

Process Statistics cputrack - per-processor hw counters pargs process arguments pflags process flags pcred process credentials pldd process's library dependencies psig process signal disposition pstack process stack dump pmap process memory map pfiles open files and names prstat process statistics ptree process tree ptime process microstate times
Manickam Kamalakkannan

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Sun Solaris 10 Operating System

Page 326

pwdx process working directory

Process Control pmap - Show process memory mappings pgrep grep for processes pkill kill processes list pstop stop processes prun start processes prctl view/set process resources pwait wait for process preap reap a zombie process plgrp - examine and modify process home lgroup and lgroup affinities pmadvise - apply madvise(3C) to address segments of a process

Process Tracing/Debugging abitrace trace ABI interfaces dtrace trace the world mdb debug/control processes truss trace functions and system calls snoop - debug and trace network traffic collect/analyzer - Sun Studio tools for binary code development and runtime analysis (not bundled with Solaris, but freely downloadable)

Kernel Tracing/Debugging dtrace trace and monitor kernel lockstat monitor locking statistics lockstat -k profile kernel mdb debug live and kernel cores Hotkernel - What is the kernel doing?

How to increase file system in root disk mirroring with out detach the mirror If root file system 100% full what you have to do? What are soft links and hard links, and differentiate them. How to recover boot-block, if it it corrupted. and what happens to the os if it gets corrupted How u can detach or remove the disk it is in Veritas (Vxvm) control that is the disk in the production server ? How can i stop the telnet service in solaris 8 and 9? I want to Know how many LUNs are in my Solaris10 server as well as NIC cards ? What is the purpose of autofs and automountd commands? What is the difference b/w /etc/system profile and user profile? What is the profile file for ordinary user, when those will execute? In solaris we have 2 directories for commands. what are they..? is there any difference b/w those? What is the 3rd field of /etc/inittab file..? what are the possible values of that field...? how to add a run control script..? What is the umask value to crate directory with only rw options to root..? Difference b/w crash dump and core dump files..?

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 327

Solaris Performance Monitoring & Tuning - iostat , vmstat & netstat Introduction to iostat , vmstat and netstat This document is primarily written with reference to solaris performance monitoring and tuning but these tools are available in other unix variants also with slight syntax difference. iostat , vmstat and netstat are three most commonly used tools for performance monitoring . These comes built in with the operating system and are easy to use .iostat stands for input output statistics and reports statistics for i/o devices such as disk drives . vmstat gives the statistics for virtual Memory and netstat gives the network statstics . Following paragraphs describes these tools and their usage for performance monitoring and if you need more information there are some very good solaris performance monitoring books available at www.besttechbooks.com.

Input Output statistics ( iostat ) iostat reports terminal and disk I/O activity and CPU utilization. The first line of output is for the time period since boot & each subsequent line is for the prior interval . Kernel maintains a number of counters to keep track of the values. iostat's activity class options default to tdc (terminal, disk, and CPU). If any other option/s are specified, this default is completely overridden i.e. iostat -d will report only statistics about the disks. syntax: Basic synctax is iostat <options> interval count

option - let you specify the device for which information is needed like disk , cpu or terminal. (-d , -c , -t or -tdc ) . x options gives the extended statistics . interval - is time period in seconds between two samples . iostat 4 will give data at each 4 seconds interval. count - is the number of times the data is needed . iostat 4 5 will give data at 4 seconds interval 5 times

Example $ iostat -xtc 5 2 disk sd0 sd1 sd2 sd3 extended disk statistics tty cpu r/s w/s Kr/s Kw/s wait actv svc_t % w %b tin tout us sy wt id 2.6 3.0 20.7 22.7 0.1 0.2 59.2 6 19 0 84 3 85 11 0 4.2 1.0 33.5 8.0 0.0 0.2 47.2 2 23 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 10.2 1.6 51.4 12.8 0.1 0.3 31.2 3 31
Manickam Kamalakkannan

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Sun Solaris 10 Operating System

Page 328

The fields have the following meanings: disk name of the disk r/s reads per second writes per second w/s Kr/s kilobytes read per second Kw/s kilobytes written per second wait average number of transactions waiting for service (Q length) actv average number of transactions actively being serviced (removed from the queue but not yet completed) %w percent of time there are transactions waiting for service (queue non-empty) %b percent of time the disk is busy (transactions in progress)

Results and Solutions: The values to look from the iostat output are: Reads/writes per second (r/s , w/s) Percentage busy (% b) Service time (svc_t)

If a disk shows consistently high reads/writes along with , the percentage busy (% b) of the disks is greater than 5 percent, and the average service time (svc_t) is greater than 30 milliseconds, then one of the following action needs to be taken 1.)Tune the application to use disk i/o more efficiently by modifying the disk queries and using available cache facilities of application servers . 2.) Spread the file system of the disk on to two or more disk using disk striping feature of volume manager /disksuite etc. 3.) Increase the system parameter values for inode cache , ufs_ninode , which is Number of inodes to be held in memory. Inodes are cached globally (for UFS), not on a per-file system basis 4.) Move the file system to another faster disk /controller or replace existing disk/controller to a faster one.

Virtual Memory Statistics ( vmstat ) vmstat - vmstat reports virtual memory statistics of process, virtual memory, disk, trap, and CPU activity. On multicpu systems , vmstat averages the number of CPUs into the output. For per-process
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 329

statistics .Without options, vmstat displays a one-line summary of the virtual memory activity since the system was booted. syntax: Basic synctax is vmstat <options> interval count

option - let you specify the type of information needed such as paging -p , cache -c ,.interrupt i etc. if no option is specified information about process , memory , paging , disk ,interrupts & cpu is displayed . interval - is time period in seconds between two samples . vmstat 4 will give data at each 4 seconds interval. count - is the number of times the data is needed . vmstat 4 5 will give data at 4 seconds interval 5 times. Example The following command displays a summary of what the system is doing every five seconds. example% vmstat 5 procs memory page disk faults cpu r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id 0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82 0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62 0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64 0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78 The fields of vmstat's display are procs r in run queue blocked for resources I/O, paging etc. b w swapped memory (in Kbytes) swap - amount of swap space currently available free - size of the free list page ( in units per second). re page reclaims - see -S option for how this field is modified. mf minor faults - see -S option for how this field is modified. pi kilobytes paged in po kilobytes paged out fr kilobytes freed de anticipated short-term memory shortfall (Kbytes) sr pages scanned by clock algorithm disk ( operations per second ) There are slots for up to four disks, labeled with a single letter and number. The letter indicates the type of disk (s = SCSI, i = IPI, etc) . The number is the logical unit number.
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 330

faults in sy cs

(non clock) device interrupts system calls CPU context switches

cpu - breakdown of percentage usage of CPU time. On multiprocessors this is an a verage across all processors. us user time sy system time id idle time

Results and Solutions: A. CPU issues: Following columns has to be watched to determine if there is any cpu issue 1. 2. 3. 4. Processes in the run queue (procs r) User time (cpu us) System time (cpu sy) Idle time (cpu id)

procs cpu r b w us sy id 0 0 0 4 14 82 0 0 1 3 35 62 0 0 1 3 33 64 0 0 1 1 21 78 Problem symptoms: 1.) If the number of processes in run queue (procs r) are consistently greater than the number of CPUs on the system it will slow down system as there are more processes then available CPUs . 2.) if this number is more than four times the number of available CPUs in the system then system is facing shortage of cpu power and will greatly slow down the processess on the system. 3.) If the idle time (cpu id) is consistently 0 and if the system time (cpu sy) is double the user time (cpu us) system is facing shortage of CPU resources. Resolution : Resolution to these kind of issues involves tuning of application procedures to make efficient use of cpu and as a last resort increasing the cpu power or adding more cpu to the system.

B. Memory Issues: Memory bottlenecks are determined by the scan rate (sr) . The scan rate is the pages scanned by the clock algorithm per second. If the scan rate (sr) is continuously over 200 pages per second then there is a memory shortage.

Resolution : 1. Tune the applications & servers to make efficient use of memory and cache. 2. Increase system memory . 3. Implement priority paging in s in pre solaris 8 versions by adding line "set priority paging=1" in /etc/system. Remove this line if upgrading from Solaris 7 to 8 & retaining old /etc/system file.
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 331

Network Statistics (netstat) netstat displays the contents of various network-related data structures in depending on the options selected. Syntax : netstat <option/s> multiple options can be given at one time. Options -a - displays the state of all sockets. -r - shows the system routing tables -i - gives statistics on a per-interface basis. -m - displays information from the network memory buffers. On Solaris, this shows statistics forSTREAMS -p [proto] - retrieves statistics for the specified protocol -s - shows per-protocol statistics. (some implementations allow -ss to remove fileds with a value of 0 (zero) from the display.) -D - display the status of DHCP configured interfaces. -n do not lookup hostnames, display only IP addresses. -d (with -i) displays dropped packets per interface. -I [interface] retrieve information about only the specified interface. -v be verbose interval - number for continuous display of statictics. Example : $netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------192.168.1.11 U 1 1444 le0 192.168.1.0 224.0.0.0 192.168.1.11 U 1 0 le0 default 192.168.1.1 UG 1 68276 127.0.0.1 127.0.0.1 UH 1 10497 lo0 This shows the output on a Solaris machine who's IP address is 192.168.1.11 with a default router at 192.168.1.1 Results and Solutions: A.) Network availability The command as above is mostly useful in troubleshooting network accessibility issues . When outside network is not accessible from a machine check the following 1. if the default router ip address is correct
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 332

2. you can ping it from your machine. 3. If router address is incorrect it can be changed with route add commnad . See man route for more info . route command examples: $route add default <hostname> $route add 192.0.2.32 <gateway_name> If the router address is correct but still you can't ping it there may be some network cable /hub/switch problem and you have to try and eliminate the faulty component .

B.) Network Response $ netstat -i Name Mtu Net/Dest Address Ipkts lo0 8232 loopback localhost 77814 hme0 1500 server1 server1 Ierrs Opkts 0 77814 Oerrs Collis 0 0 Queue 0

10658566 3

4832511 0

279257 0

This option is used to diagnose the network problems when the connectivity is there but it is slow in response . Values to look at: Collisions (Collis) Output packets (Opkts) Input errors (Ierrs) Input packets (Ipkts)

The above values will give information to workout i. Network collision rate as follows : Network collision rate = Output collision counts / Output packets Network-wide collision rate greater than 10 percent will indicate Overloaded network, Poorly configured network, Hardware problems.

ii. Input packet error rate as follows : Input Packet Error Rate = Ierrs / Ipkts.

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 333

If the input error rate is high (over 0.25 percent), the host is dropping packets. Hub/switch cables etc needs to be checked for potential problems. C. Network socket & TCP Cconnection state Netstat gives important information about network socket and tcp state . This is very useful in finding out the open , closed and waiting network tcp connection . Network states returned by netstat are following : ---- Closed. The socket is not being used. CLOSED ---- Listening for incoming connections. LISTEN SYN_SENT ---- Actively trying to establish connection. SYN_RECEIVED ---- Initial synchronization of the connection under way. ESTABLISHED ---- Connection has been established. ---- Remote shut down; waiting for the socket to close. CLOSE_WAIT FIN_WAIT_1 ---- Socket closed; shutting down connection. CLOSING ---- Closed, then remote shutdown; awaiting acknowledgement. LAST_ACK ---- Remote shut down, then closed ;awaiting acknowledgement. FIN_WAIT_2 ---- Socket closed; waiting for shutdown from remote. TIME_WAIT ---- Wait after close for remote shutdown retransmission.

Example: #netstat -a

Local Address *.* *.22 *.22 *.* *.32771 *.4045 *.25 *.5987 *.898 *.32772 *.32775 *.32776 *.* 192.168.1.184.22 192.168.1.184.22 192.168.1.184.22

Remote Address *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* 192.168.1.186.50457 192.168.1.186.56806 192.168.1.183.58672

Swind Send-Q 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 41992 0 38912 0 18048 0

Rwind Recv-Q State 24576 0 IDLE 24576 0 LISTEN 24576 0 LISTEN 24576 0 IDLE 24576 0 LISTEN 24576 0 LISTEN 24576 0 LISTEN 24576 0 LISTEN 24576 0 LISTEN 24576 0 LISTEN 24576 0 LISTEN 24576 0 LISTEN 24576 0 IDLE 24616 0 ESTABLISHED 24616 0 ESTABLISHED 24616 0 ESTABLISHED

if you see a lots of connections in FIN_WAIT state tcp/ip parameters have to be tuned because the connections are not being closed and they gets accumulating . After some time system may run out of resource . TCP parameter can be tuned to define a time out so that connections can be released and used by new connection.

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 334

What flags in /etc/system are related to security? Q: While the article on kernel and /etc/system parameters there are still several things missing. In Solaris 2.4 there was a fix in /etc/system set nfs:nfs_portmon=1 which made nfsd only accept connections from low numbered ports. This is the same as running rpc.mountd on sunos4.x with a -n flag. Unfortunately this same parameter does not exist on solaris 2.5. What I need is a list of parameters such as this one which have nothing to do with performance tuning but everything to do with securing my system. I'd like a reference source for these sorts of tuning parameters. They are not autoconfigured based on available resources. A: I concentrate on performance related parameters, I'm not a security expert. However you will find set nfssrv:nfs_portmon=1 works in Solaris 2.5. There were changes due to the integration of NFS3 into the system that seem to have rearranged the nfs modules slightly. I found that it still existed by running /usr/ccs/bin/nm on /dev/ksyms, then located the module it contains in /kernel. /usr/ccs/bin/nm /kernel/misc/nfssrv | grep portmon [29] | 1676| 4|OBJT |LOCL |0 |3 |nfs_portmon The manual page for nfsd(1m) also documents this change. If the NFS_PORTMON variable is set, then clients are required to use privileged ports (ports < IPPORT_RESERVED) in order to get NFS services. This variable is equal to zero by default. This variable has been moved from the "nfs" module to the "nfssrv" module. To set the variable, edit the /etc/system file and add this entry: set nfssrv:nfs_portmon = 1 WORKOUTS 1. Find out what are the packages are partially installed. 2. Find out how many packages are partially installed. 3. Find out how many packages are totally installed. 4. How to stop the nfs client side service? 5. How to disable telnet login for the root user? 6. What are the fields in the crontab file? List out in sequence 7. How can you know what are the schedules in queue? 8. Find out the property of the mounted slice /dev/dsk/c0t0d0s5 9. How will you find out the alternate backup blocks for the slice /dev/dsk/c0t0d0s7? 10. How will you install a grub to the corrupted system? 11. How to enable telnet service for the root user? 12. What is the format of the patch? 13. What is the difference between patch and packages? 14. What is the difference between /etc/dfs/sharetab and/etc/dfs/dfstab file 15. Change the user login name Hari to Shivan. And make sure that Shivan can store some of his newly created documents to the existing home directory. 16. Change the ownership and group for the folder along with its contents. 17. Create a SUID file 18. Find out last 10 reboots and save to the file /etc/reboot 19. How will you identify the default printer? 20. How will you find out for how many hour the system is in the running state? 21. Where will you define the password security policy?
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 335

22. What are the features of Sun Solaris 10? 23. How will you find out what are the recent files that are currently accessed? 24. What is meant by instance name? 25. How will you change the home directory of the user hari? 26. How will you identify the dump device? 27. How will you mount the /dev/fssnap/0 devices? 28. Where the logs of SULOG are stored? 29. How will you distinguish between the successful and failure sulog? 30. What is the purpose of loginlog file. Location of loginlog file 31. How will you kill a process? 32. What is the use of # fmthard command? 33. List out the ways to make the OS to recognize the newly connected hard disks. 34. What is the function of # eeprom command 35. List out the permitted tag names to the slice? 36. What is the default flag for the swap slice? 37. How remove only the contents of the file? 38. Difference between SUID, SGID, Sticky bit 39. If you can ping a server, but can't telnet or ssh to it, what could be the problem? 40. What is 'ps' command for? 41. How would you kill a process? 42. List out the process scheduled by a user Shivan 43. What does init 0 and init 5 does? 44. If you forgot the root password, how do you get back in? 45. How will you identify the Solaris Software Cluster installed to the system? 46. What will you do if the SMF repositry is corruted? 47. Where does the SMF repostiry configuration stored? 48. How will you disable all the network services? 49. Difference between # svcs and # svcs a 50. How will you make the slice as read only even after several reboots? 51. How will you created the public directory for the anonymous ftp user? 52. List out the process running a by a user che 53. How will you move VTOC of one machine to another? 54. What is the location of man pages on the local system? 55. How will you identify the physical path of the booting device? 56. Which command is used to create a software cluster in the format of data stream? 57. How will you deny root user login to the local system? 58. What is the difference between reject and disable? 59. How can we find RAM size in solaris server ? 60. If a user logs in to UNIX, it displays the desktop and then immediately logs you back out, what could be wrong? 61. How will you change the shell of the existing user? 62. What is the difference between runlevel 1 and System maintance mode? 63. How will you disable telnet service only for the current session? 64. Which file needs to be edited to allow root user to perform ftp login? 65. The command is used for adding devices to the system without requesting reboot. 66. Besides the root file system, what other file system is required to boot a usable system. 67. You can type # mount /opt on the command line and not get an error message if which of the condition exists? 68. Which mechanism that manages removable media, such as the CD-ROM and pen drives? 69. A large file is a regular file whose size is greater than or equal to 70. What are the default file systems created by the Solaris Installtion program? 71. When installing a patch using the patchadd command , which option does not create a backup of the files to be patched?
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 336

72. Which SMF command displays the services that must be running before the multi-user milestone is reached? 73. Which service status state indicated that the service is configured to run, but is not yet running or available to run? 74. After reading the /etc/inittab file, which daemon does the init process startup? 75. Which file controls the default policy on password aging? 76. Password aging and encryption are stored in which of the file? 77. Which signal kills a process unconditionally? 78. A user wants to execute a command later today, after leaving work. Ehich command will allow him to do this? 79. You need to perform a backup of the root file system without bringsing the system to single-user mode or unmounting the root file system. What is the best method of backing up an active mounted file system? 80. Syntax of tar and ufsdump command 81. List some of the performance monitoring tools 82. Fields in /etc/vfstab 83. What is the difference between nvalias and devalias 84. Which command would you use to view partitions and their sizes on Solaris? 85. Which OBP command would use to print/view OBP environment variables on a Sun sever? 86. Is du a command? If so, what is its use? 87. Is it possible to count number of characters, line in a file, if so how? 88. How will you terminate a running process? 89. Is it possible to create a new file system in Solaris, if so how? 90. Write a command to display a files contents in various formats? 91. What file is the controlling file for the volume manager? 92. How would you find out what version of Solaris is running? 93. How can we find RAM size in Sun SPARC server? 94. Is it possible to delete a link file, if so how? 95. How do you find out drive statistics?

Vertitas Volume Manager Interview questions 1) File do you modify to change the mail aliases (Provide the full path)? 2) What command do you run after modifying the aliases file make the changes active? 3) How do you enable logging on a UFS file system? What 4) What commands can you use to dynamically add scsi disks to a sun system? 5) How do you install package to a specific directory? e.g like to install wget in /home/vin/wget rather than the default one "/usr". ---This was not answered by me. 6) What command shows what modules are loaded into the Kernel? 7) What command increases the priority of a process and all sub processes on a solaris system? 8) What command in Solaris, do you use to setup aliases for devices? 9) How do you watch network traffic on interface qfe3? 10 ) What command shows TCP/IP parameter settings? 11) How do you set Network cards to 100 full interactively & permanently? 12) What tools in Solaris help you diagnose harware failures? 13) How do you determine by how much a Veritas Volume can be expanded? 14) How do you grow a Veritas VXVM volume? 15) Where is the dump from a system crash normally kept? Can we customize it?
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 337

16) How do you determine Volume Status in Veritas VxVM? 17) Why would you deport a diskgroup in VxVM? 18) How do you create additional state databases in solaris volume manager? -- This was the tough one..!! 19) Does Solaris Volume Manager have soft partitioning? 20) How do you clear volume information from a solaris volume manager disk? 21) How do you shutdown a Veritas Cluster Server, leaving the applications running from the command line? 22) How do you speed up processing of a process and All it's child processes? -- This was quite tricky..!! 1. Name the mandatory disk group in VxVM 3.5 ? How will configure VxVM in 3.5 ? 2. How will you create private and shared disk group using VxVM ? 3. Which are the different layouts for volumes in VxVM ? 4. What is the basic difference between private disk group and shared disk group ? 5. How will you add new disk to the existing disk group ? 6. How will grow/shrink the volume/file system ? What is the meaning of growby and growto options ? What is the meaning on shrinkto and shrinkby options ? 7. How will you setup and unsetup disks explicitly using VxVM ? 8. How will list the disks, which are in different disk groups ? 9. What is private region in VxVM ? 10. If, vxdisk list command gives you disks status as "error", what steps you will follow to make the respective disks online ?

Name the mandatory disk group in VxVM 3.5 ? How will configure VxVM in 3.5 ? How will you create private and shared disk group using VxVM ? Which are the different layouts for volumes in VxVM ? What is the basic difference between private disk group and shared disk group ? How will you add new disk to the existing disk group ? How will grow/shrink the volume/file system ? What is the meaning of growby and growto options ? What is the meaning on shrinkto and shrinkby options ? 7. How will you setup and unsetup disks explicitly using VxVM ? 8. How will list the disks, which are in different disk groups ? 9. What is private region in VxVM ? 10. If, vxdisk list command gives you disks status as "error", what steps you will follow to make the respective disks online ? These are some questions which I feel every storage professional should know. Please let me know if these are useful, answers will be posted in coming posts.

1. 2. 3. 4. 5. 6.

1.List the files in current directory sorted by size ? - ls -l | grep ^- | sort nr 2. List the hidden files in current directory ? - ls -a1 | grep ^\. 3. Delete blank lines in a file ? - cat sample.txt | grep -v ^$ > new_sample.txt

4. Search for a sample string in particular files ? - grep .Debug. *.confHere grep uses the string .Debug. to search in all files with extension..conf. under current directory.

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 338

5. Display the last newly appending lines of a file during appendingdata to the same file by some processes ? - tail .f Debug.logHere tail shows the newly appended data into Debug.log by some processes/user.

6. Display the Disk Usage of file sizes under each directory in currentDirectory ? - du -k * | sort .nr (or) du .k . | sort nr 10. Display the processes, which are running under yourusername ? - ps .aef | grep MaheshvjHere, Maheshvj is the username.

12. Display the files in the directory by file size ? - ls .ltr | sort .nr .k 5 13. How to save man pages to a file ? - man | col .b > Example : man top | col .b > top_help.txt or # man rcs | col -bx > rcs.txt 14. How to know the date & time for . when script is executed ? - Add the following script line in shell script.eval echo Script is executed at `date` >> timeinfo.infHere, .timeinfo.inf. contains date & time details ie., when script is executed and history related to execution. 15. How do you find out drive statistics ? - iostat E 16. Display disk usage in Kilobytes ? - du k 17. Display top ten largest files/directories ? - du -sk * | sort -nr | head 18. How much space is used for users in kilobytes ? - quot af 19. How to create null file ? - cat /dev/null > filename1 20. Access common commands quicker ? - ps -ef | grep -i $@ 21. Display the page size of memory ? - pagesize a 22. Display Ethernet Address arp table ? - arp a

23. Display the no.of active established connections to localhost ? - netstat -a | grep EST 24. Display the state of interfaces used for TCP/IP traffice ? - netstat i 25. Display the parent/child tree of a process ? - ptree Example: ptree 1267 26. Show the working directory of a process ? - pwdx Example: pwdx 1267 27. Display the processes current open files ? - pfiles Example: pfiles 1267 28. Display the inter-process communication facility status ? ipcs
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 339

29. Display the top most process utilizing most CPU ? - top .b 1 30. Alternative for top command ? - prstat -a 3) Describe about Logical Domains and its functions? LDOMS system administrator center provides resources and links to developers who are trying to install Ldoms technology. It gives you flexibility to group system resources and discrete systems within a computer system physically. It allows you to group system resources physically within its own operating system, identity and resources. 4) Explain about RBAC? RBAC is introduced into Solaris for managing specific tasks. These specific tasks are based and defined in the administrator profile. It is based on the standard developed by NIST. RBAC is a very important tool for performing multiple tasks. It also separates tasks which require high technical knowledge from low ones. 5) Explain about Roles? RBAC implementation depends upon the role specified in the administrator profiles. Roles are implemented according to the profile. Also access to certain files and configuration can be assigned by the user profile. It also allows RBAC to differentiate high technical knowledge roles from low ones. 6) What are the three different system management roles? There are three different roles specified by Solaris they are 1) Primary administrator who is responsible for security 2) System administrator is responsible for day to day roles 3) Operator is responsible for data back up and maintenance.

7) What are the different ways to execute profiles? Profiles can be executed in many different ways some of them are 1) Pfexec executes a single command in profile 2) With some restrictions pfsh and pfcsh can be executed. 3) By directly logging into the account using su.

8) Explain about sudo? Sudo maintains database of all the privileges assigned to a user name. These privileges can be indentified by different commands present in the database. This feature helps a user to format a disk but the root system cannot be changed.

9) Explain about the limitations present in sudo? There are some limitations for sudo which makes RBAC popular they are 1) It is not possible to assign a user to work on specific file or profile. 2) It is also not possible to assign a user to work on a specific command. 3) By using shell commands and certain functions it is possible to have some restrictions on a user but it would consume time for a larger setup.

16) Explain about the command prof_attr? This forms the RBAC profile database. It displays the relationship between among the profiles in the database. It also gives authorizations between navigation for those files. One of the samples is Solaris.admin.fsmgr.read.solaris.admin.serialmgr.read.
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 340

17) Explain about kadmin command? Local kerbeors services can be managed by administering policies, keytabs and principles by managing the kadmin command. Kadmin.local is used to master KDC and it does not require any authentication. On the server login information is passed through a secured server. It checks the principle name by the value of the user environment variable. 1. You can ping servers on the subnet your workstation is on, but not other subnets. What is wrong? 2. If you can ping a server, but can't telnet or ssh to it, what could be the problem? 3. If a user logs in to UNIX, it displays the desktop and then immediately logs you back out, what could be wrong? 4. If you mistype a password, how do you clear it out to retype the password again. 5. When would you want to reconfigure the kernel and how would you do it? 6. Which is your favorite editor, shell, programming shell and why? 7. Why should you never have '.' in root's path? 8. If fsck is running, what is the one thing you shouldn't do? 9. What are the 3 or 4 major flavors of UNIX and what are their SA tools? 10. What kind of PC - UNIX connectivity programs are you familiar with? 11. What are: UFS, NFS, SaMBa, LDAP, NIS, DNS, Veritas 12. If you send an e-mail to someone and it comes back "Message Undeliverable", what could be wrong. 13. How do you give a user access to an application or program that needs to run as root without giving them the root password? 14. When you "ping server" and "ping server.domainname", you get different results. Why? 15. Someone pings a server from another location and gets a different result than if you ping the same server onsite. What is going on? 16. You know the reason the server won't boot is because of ODS, but the root partition isn't on ODS. How do you go about fixing it? 17. How would you truncate a log file that is growing too large if you don't have space to compress it or to move it somewhere else? How would you do it "hot"? 18. When the key is in the lock position on a Sun Enterprise server, can you do a Stop-A? Explain. 19. What does "boot -a" do? 20. What is uadmin and what does it do? 21. What does "ypwhich servername" do? Why would you use it? 22. If you have multiple ethernet interfaces, how do you keep it from routing between them? 23. Can you add HDD's to a Sun server and not have to do a reconfiguration reboot? Explain 24. If you have forgotten the root password for a server, how do you get back in? 25. What makes NIS+ more secure than NIS? 26. What are the differences between Solaris 2.6 and lower and 7 and higher? 27. How can you search for commands at the boot prompt if you only know part of the command? 28. What are the two settings you can change to make a system boot faster? 29. What are the differences between Sun OS and Solaris? 30. What do soft partitions buy you with Solaris Volume Manager? 31. How can you set EEPROM settings from Solaris?

1 ) Difference between Solaris 8, Solaris 9 and Solaris 10 2) How to list disk in vertitas volume manager 3) What is initilization in veritas volume manager
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 341

4) What is encapsulation in veritas volume manager 5) How to secure direct remote login of root in solaris 6) What are different type of RAID , explain each in brief , which is better for performance 7) What are the key compontents in Veritas Cluster Server 8) Difference between veritas cluster server and Microsoft cluster server 9) How to check whether installed solaris is of 32 bit or 64 bit 10) Explain Solaris boot process and Redhat Linux boot process 11) How to secure solaris installed on a machine 12) What are different run levels in Solaris & in Linux 13) Explain the hardware configuration steps in Solaris 14) How will you configure a NAS in Solaris,Linux 15) How will you map a SAN lun onto a Solaris host

General UNIX 1. What does the route command do? 2. What are the read/write/execute bits on a directory mean? 3. What does iostat do? 4. what does vmstat do? 5. What does netstat do? 6. What is the most graceful way to bring a system into single user mode? 7. How do you determine disk usage? 8. What is AWK? 9. What is SED? 10. What is the difference between binaries in /bin, and /usr/bin? 11. What is a dynamically linked file? 12. What is a statically linked file?

What is the difference between Daemon & Server process.

Please give examples of both Daemon and Server processes. Thanks. Latest Answer: A Daemon is a software process that runs in the background (continuously) and provides the service to client upon request. For example named is a daemon. When requested it will provide DNS service. Other examples are: xinetd (it is a super-daemon, ...

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 342

1. How are devices represented in UNIX? All devices are represented by files called special files that are located in/dev directory. Thus, device files and other files are named and accessed in the same way. A 'regular file' is just an ordinary data file in the disk. A 'block special file' represents a device with characteristics similar to a disk (data transfer in terms of blocks). A 'character special file' represents a device with characteristics similar to a keyboard (data transfer is by stream of bits in sequential order). 10. How does the inode map to data block of a file? Inode has 13 block addresses. The first 10 are direct block addresses of the first 10 data blocks in the file. The 11th address points to a one-level index block. The 12th address points to a two-level (double in-direction) index block. The 13th address points to a three-level(triple in-direction)index block. This provides a very large maximum file size with efficient access to large files, but also small files are accessed directly in one disk read. 13. What are various IDs associated with a process? Unix identifies each process with a unique integer called ProcessID. The process that executes the request for creation of a process is called the 'parent process' whose PID is 'Parent Process ID'. Every process is associated with a particular user called the 'owner' who has privileges over the process. The identification for the user is 'UserID'. Owner is the user who executes the process. Process also has 'Effective User ID' which determines the access privileges for accessing resources like files. getpid() -process id getppid() -parent process id getuid() -user id geteuid() -effective user id

20. What is a zombie? When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it - for example, the parent may need to check the child's exit status. To be able to get this information, the parent calls `wait()'; In the interval between the child terminating and the parent calling `wait()', the child is said to be a `zombie' (If you do `ps', the child will have a `Z' in its status field to indicate this.) 21. What are the process states in Unix? As a process executes it changes state according to its circumstances. Unix processes have the following states: Running : The process is either running or it is ready to run . Waiting : The process is waiting for an event or for a resource. Stopped : The process has been stopped, usually by receiving a signal. Zombie : The process is dead but have not been removed from the process table.

What is the command in UNIX to see a list of opened files?

lsos

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 343

Latest Answer:

lsof - List open files on the system. Normally, it only lists files you (or processes you own) have open; if run as root, it lists all open files. ... boot frm 1st cd type1) chroot /mnt/sysimage2) grub-install

When Grub is crashed then how i start the linux os?


Latest Answer:

/dev/sda .
Unix/Linux administration interview questions

What is LILO? LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell the system which partition and hard drive to boot from.

What is the main advantage of creating links to a file instead of copies of the file? A: The main advantage is not really that it saves disk space (though it does that too) but, rather, that a change of permissions on the file is applied to all the link access points. The link will show permissions of lrwxrwxrwx but that is for the link itself and not the access to the file to which the link points. Thus if you want to change the permissions for a command, such as su, you only have to do it on the original. With copies you have to find all of the copies and change permission on each of the copies. Write a command to find all of the files which have been accessed within the last 30 days. find / -type f -atime -30 > December.files This command will find all the files under root, which is /, with file type is file. -atime 30 will give all the files accessed less than 30 days ago. And the output will put into a file call December.files.

What is the most graceful way to get to run level single user mode? A: The most graceful way is to use the command init s. If you want to shut everything down before going to single user mode then do init 0 first and from the ok prompt do a boot -s. What does the following command line produce? Explain each aspect of this line. $ (date ; ps -ef | awk {print $1} | sort | uniq | wc -l ) >> Activity.log A: First lets dissect the line: The date gives the date and time as the first command of the line, this is followed by the a list of all running processes in long form with UIDs listed first, this is the ps -ef. These are fed into the awk which filters out all but the UIDs; these UIDs are piped into sort for no discernible reason and then onto uniq (now we see the reason for the sort - uniq only works on sorted data - if the list is A, B, A, then A, B, A will be the output of uniq, but if its A, A, B then A, B is the output) which produces only one copy of each UID.
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 344

These UIDs are fed into wc -l which counts the lines - in this case the number of distinct UIDs running processes on the system. Finally the results of these two commands, the date and the wc -l, are appended to the file "Activity.log". Now to answer the question as to what this command line produces. This writes the date and time into the file Activity.log together with the number of distinct users who have processes running on the system at that time. If the file already exists, then these items are appended to the file, otherwise the file is created.

Unix admin questions How do you list the files in an UNIX directory while also showing hidden files? How do you execute a UNIX command in the background? What UNIX command will control the default file permissions when files are created? Explain the read, write, and execute permissions on a UNIX directory. What is the difference between a soft link and a hard link? Give the command to display space usage on the UNIX file system. Explain iostat, vmstat and netstat. How would you change all occurrences of a value using VI? Give two UNIX kernel parameters that effect an Oracle install Briefly, how do you install Oracle software on UNIX.

IMPORTANT FAQ IN SOLARIS 1)How to do see the processor information in solaris 8/9/10. # psrinfo # psrinfo v :- To see which processors are online and offline. If you have multiple processors. 2) How to change processor operation status in solaris. # psradm a n :- To set all processor available on the system to online # psradm f 2 3 :- To make processor 2 and 3 offline, if you have multiple processors 3)How to make processor 4 number offline when you have more then 4 processors. # psrinfo V :- To check the status and then # psradm f 4 offline - To make processor number 4 offline 4)How to make processor 3 online when you have more then 4 processor and processor 3 is offline? # psrinfo v:- To see the status of all processors # psrinfo a 3 online :- To make processor 3 online 5)How to see which kernel version and artitecture used by the syste. # isainfo -v :- To see kernal version and 32 bit or 64 bit system and artictect. 7)How do you set a deafault device from the boot prom # setenv boot-device disk Boot-device=disk
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 345

# reset - To make the changes.

11)How to check the check the clock devices from OBP Ok>netwatch-clock 12)How to set environment variable in NVRAM # nvalias /pci---/rarp to set scsi for booting of client # nvalias net dhcp to boot from dhcp # nvunalias net remove the alias 13)How to configure newly attached hardware like hardsik network card. # devfsadm Or #drvconfig

SOLARIS TROUBLE SHOOTING Q&A 1)What can I do if Solaris won't boot? You need to boot from your install CD. Insert the Solaris Software CD in your CDROM drive. If your CDROM drive/BIOS isn't bootable, first insert the "Device Configuration Assistant" (DCA) diskette. At the "Boot Solaris" menu, choose "CD." At the "Type of Installation: Interactive or JumpStart" menu, type "b -s" Or, after the video configuration, network, time and date you'll notice one of the menu's has a button: [Exit] Select Exit and, when it asks you again "do you want to exit?," just say yes. Once you're at the UNIX root prompt #, you can mount the boot drive with "mount /dev/dsk/c0t0d0s0 /mnt"" and view anything wrong with the boot drive (omit the "t0" for ATAPI). 2)How do I restore the Solaris boot block without reinstalling? This may happen when installing a boot manager that comes with another operating system (such as LILO from Linux) or an after-market multi-OS boot manager. These sometimes trample's active partition, which in our case is Solaris. Also, moving the Solaris partition with a partition manager program such as Partition Magic requires reinstalling the Solaris boot block. Before taking these steps, first verify the Solaris partition is active. If it isn't, just make the Solaris partition active and reboot. Otherwise follow the steps below. 1. Boot from CD-ROM and get the root prompt, #, as described in the previous question, 7.1. 2. Determine the controller, disk number, and partition. The boot disk is /dev/rdsk/c?t?d?p? where ? is the controller #, target ID, and disk #, and partition #. Omit "t?" for ATAPI E.g., /dev/rdsk/c0d0p0 3. Verify it's the correct device correct with prtvtoc for the drive: This is VERY important; if it's wrong, you you may hose another partition: prtvtoc /dev/rdsk/c0t0d0p0 (omit "t0" for ATAPI, always use p0, which means the "entire drive"). The prtvtoc prints out the map for the Solaris partition on the hard drive, if found. The partitions shown on the output are actually "slices" within the Solaris partition.
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 346

5. Finally, remove your CDROM and diskette media and type "/sbin/shutdown -i6" to reboot. The Solaris Multiple Device Boot Menu should appear after rebooting. If not, you can always to an upgrade (re-)install. Note: This procedure does NOT make your Solaris partition active again (sometimes needed after installing another operating system, such as Windows, on the same disk), it just writes to your bootblock IN your Solaris partition. To learn more about the Solaris boot process, read the boot(1M) man page.

What file do you modify to change the mail aliases (Provide the full path) ? 2) What command do you run after modifying the aliases file make the changes active? 3) How do you enable logging on a UFS file system? 4) What commands can you use to dynamically add scsi disks to a sun system? 5) How do you install package to a specific directory? e.g like to install wget in /home/vin/wget rather than the default one "/usr". ---This was not answered by me. 6) What command shows what modules are loaded into the Kernel? 7) What command increases the priority of a process and all sub processes on a solaris system? 8) What command in Solaris, do you use to setup aliases for devices? 9) How do you watch network traffic on interface qfe3? 10 ) What command shows TCP/IP parameter settings? 11) How do you set Network cards to 100 full interactively & permanently? 12) What tools in Solaris help you diagnose harware failures? 13) How do you determine by how much a Veritas Volume can be expanded? 14) How do you grow a Veritas VXVM volume? 15) Where is the dump from a system crash normally kept? Can we customize it? 16) How do you determine Volume Status in Veritas VxVM? 17) Why would you deport a diskgroup in VxVM? 18) How do you create additional state databases in solaris volume manager? -- This was the tough one..!! 19) Does Solaris Volume Manager have soft partitioning? 20) How do you clear volume information from a solaris volume manager disk? 21) How do you shutdown a Veritas Cluster Server, leaving the applications running from the command line? 22) How do you speed up processing of a process and All it's child processes? -- This was quite tricky..!! These questions are asked in Dell,Invensys and collected from other interview experiences of blog readers. 1 ) Difference between Solaris 8, Solaris 9 and Solaris 10 2) How to list disk in vertitas volume manager 3) What is initilization in veritas volume manager 4) What is encapsulation in veritas volume manager
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 347

5) How to secure direct remote login of root in solaris 6) What are different type of RAID , explain each in brief , which is better for performance 7) What are the key compontents in Veritas Cluster Server 8) Difference between veritas cluster server and Microsoft cluster server 9) How to check whether installed solaris is of 32 bit or 64 bit 10) Explain Solaris boot process and Redhat Linux boot process 11) How to secure solaris installed on a machine 12) What are different run levels in Solaris & in Linux 13) Explain the hardware configuration steps in Solaris 14) How will you configure a NAS in Solaris,Linux 15) How will you map a SAN lun onto a Solaris host These are some of the L3 level unix interview questions 1. How do you replace a failed boot disk under meta in solaris? Step by step explanation? 2. How do you remove meta only for the root slice? remaining slices should run under meta? 3. what you would do if you want to replace a slice using metareplace option? 4. what is the significance of 51% state database replicas in SVM? 5. what are the common errors you find in Solaris Volume manager? 6. You have a boot disk under svm, the machine fails to boot and remains in ok prompt? what could be the possible reason? 7. metastat -p shows a metavolume needs replacement. Metavolume is a single way mirror only. Actually you find disk and metavolumes are ok and I/O is happening to the filesystems how will you remove the metareplace message that comes out of metastat. 8. How to create a shared disk group in VxVM? 9. What is the difference between private and public regions in Veritas Volume manager? 10. what would you do if the private region of a particular disk group is full? What are the design considerations for the size of private region in Vxvm disk group? 11. How to replace a corrupt private region? in vxvm 3.5 and greater versions 12. How would you convert a volume from gen to fsgen? why should you do that?
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 348

13. How can you unencapsulate a boot disk in VxVM? 14. How to identify multiple paths for a disk. 15. What is the difference between Vxdmp and EMC powerpath? 16. vxdisk -o alldgs list o/p shows some disk groups in braces What does that signify? 17. what are the various layouts that are available in VxVM? 18.What is a layered volume? how to create it using vxmake? 19.How to quickly mirror a volume, if the volume is empty? 20. How to grow a volume? 21. What is the difference between failing and failed disks? 22. How to replace a failed disk in Veritas? 23. Plex is in a disabled state. How will you recover? what are the steps to follow? 24.what is the difference between detached and disassociate state of plexes? 25. Whats the boot process of VxVM? 26. Whats the difference between SVM and VxVM? What would you recommend to your clients? why? 27.What are the various clusters you have worked on? 28. Which cluster is better VCS or Sun cluster? 29. Compare and contrast VCS and Sun Cluster. 30.how will you start VCS service? What are the configuration files in VCS? There are 6 files. #vi /etc/hosts #vi /etc/nodename #vi /etc/hostname.hme #vi /etc/net/ticlts/hosts #vi /etc/net/ticosts/hosts #vi /etc/net/ticotsord/hosts How to find the network card speed # ndd get /dev/hme link_speed 1 = 100mbps 0 = 10mbps How to modify network card speed # ndd set /dev/hme instance 0
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 349

# ndd get /dev/hme link_status # ndd get /dev/hme link_mode To modify # ndd set /dev/eri instance 0 # ndd set /dev/eri adv_100T4_cap0 # ndd set /dev/eri adv_100fdx_cap1 # ndd set /dev/eri adv_100hdx_cap0 # ndd set /dev/eri adv_10fdx_cap0 # ndd set /dev/eri adv_10hdx_cap0 # ndd set /dev/eri adv_autoneg_cap0

Procedure for Firmware upgrade Shutdown root cron on csslu377 servers #./etc/init.d/cron stop Reset the system controller from the console. # resetsc -y Upgrade the firmware on the system controller > cd /114527-04 > lom -G ./sgrtos.flash > lom -G ./sgsc.flash Escape to lom> and reset the SC: lom> resetsc -y Upgrade the firmware on the system boards: > lom -G ./lw8cpu.flash > lom -G ./lw8pci.flash Shutdown the Operating System. #shutdown i0 g0 y

Explain /etc/system file It will control the kernel modules and it dived into 5 sector Moddir : default loadable kernel modules Root.devices & root files configuration : Physical path name of the devices Exclude: Does not load the kernel during kernel initializing Forceload: Force the kernel module to load Set: set maxium user =40 Telnet = 23 ftp = 25 ssh = 22 nfs = 2049 nis = 749 How will you restart the inetd process? # Pkill HUP inetd

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 350

What is nice and renice command do To set the high priority for the process -20 high priorities +20 low priorities Eg: # nice 20 oracle How will you check the disk performance? # iostat xctd 4 5

How to find the kernel bit version or architecture # isainfo kv How to enable and disable the dtlogin # /usr/dt/bin/dtconfig e ( enable) # /usr/dt/bin/dtconfig d ( disable) What are the NFS daemon in server & client Server Daemons 1 mountd 2.nfsd 3.nfslogd 4.statd 5.lockd

Client Daemons statd lockd

What is difference between Hard and Soft mount? Hardmount: Normal file system mount used mainly for mounting local file systems. Once a file system is hard mounted, can use a normal filesystem untill its umount. Soft mount: It allows automatic unmounting if the filesystem is idle for a specified timeout period. It is mainly used for network filesystems like NFS It can be configured using Autofs and the network filesystem can be soft mounted.

How will you comment error line in /etc/system file # Vi /etc/system (To comment the error line in /etc/system files, we have to use *) How will you come to know wheather hme 0r eri or to configuring the network card. Base on Ethernet card How many will you find the process id and disk utilizations. # pr What is WWN on storage World wide number What is mean by paging & server average time.

Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster

Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 351

If a disk shows consistently high reads/writes along with , the percentage busy (% b) of the disks is greater than 5 percent, and the average service time (svc_t) is greater than 30 milliseconds, then one of the following action needs to be taken

How to find the demo? #Ps ef |grep vxvm How to find the versions? pkginfo -l VRTSvxvm What are the daemons in VERITAS? Vxconfigd Vxiod vxrelocd How will create a rootdg # vxdg -g rootdg adddisk newroot=c2t2d0 How to mirror a rootdg Initialize a new disk #devfsadm #format ( to label the disk) #vxdctl enable #vxdisksetup I diskname (c0t1d0s2) #vxdg g rootdg adddisk rootnew=c0t1d0s2 #vxprint list #vxrootmir rootnew How to remove the root mirror First disaccociate the plex #vxplex dis rootvol-02 Now, the slice information for disk newroot (c2t2d0) is: # prtvtoc -s /dev/rdsk/c2t2d0s2

Delete the rootalt volume from the new root disk. # cd / # umount /mnt # vxvol stop rootalt # vxplex dis rootvol-02 (Disassociate the plex from the volume and remove the volume.) # vxedit rm rootalt # vxsd dis newroot-01 (Disassociate the sub-disk from the plex and remove the plex.) # vxedit rm rootvol-02 7. Mirror all the other volumes from the current root disk to the new root disk.Do not mirror swap volumes. Swap slices will be created on the new disk manually. In this example, the volumes to mirror are var and opt.
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 352

# vxassist -g rootdg mirror var newroot # vxassist -g rootdg mirror opt newroot What are the steps to be follow to add a disk in veritas & before add the disk what are the steps to be follow Before adding the disk, take an output from the format command. take an output of vxdisk list after the disk is added, do the following: #devfsadm #format --> label the disk #vxdctl enable #vxdiskadm choose the option 1 and then it will ask you the diskgroup once it has been added it will ask for the encapsulation, say no then it will ask the device name, assign the name, that's it, #vxdisk list, this will tell the status of the newly added disk as online

How will you create a subdisk and plexus vxmake sd disk02-02 disk02,0,8000 this would create a subdisk called disk02-02 at the start of disk02 and would be 8000blocks (4000k) long. vxmake plex hazly-02 sd=disk03-01 creates a plex called hazly-02 using subdisk disk03-01 How will you remove the subdisk and plexus to dissociate a subdisk try vxsd dis disk##-## remove a subdisk by vxedit rm disk##-##

Explain shrinking the disk Shrinking the disk is nothing but reducing the allocated volume size

How will you grow a disk space whitout disturbs #vxresize What is an alternative to the top command on Solaris? # prstat a How to find the VERITAS License? After installing VERITAS, one should confirm with VERITAS license keys #vxlicense -p How to create a new volume Detect new disks #devfsadm #vxdiskadm - select option 1 to add new disks (Initialize new disks and add it to disk group appdg )
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 353

# vxassist g appdg make snetprd01 55g (create volume in appdg as snetprd01) #mkfs F vxfs o largefiles /dev/vx/rdsk/appdg/snetprd01 (creating file system for the volumes snetprd01) # cd / (creating directories for snetprd01 ) #mkdir snetprd01 #chown oracle /snetprd01 (change the ownership to oracle for snetprd01 directories ) #vi /etc/vfstab #mount /snetprd01 #df k #mount p #vxdisk list ##vxprint g appdg How to remove the volume Restore the previous /etc/vfstab #cp /etc/vfstab.0702 /etc/vfstab # umount /snetprd01 (Unmounting the files) #rmdir /snetprd01 (Remove the mount points) #vxvol g appdg stop snetprd01 (Stopping the volumes snetprd01 from appdg) #vxedit g appdg v rm snetprd01 (removing volumes from disk group) # df k #vxprint -g appdg How to find the plex, sub disk, Volume group, disk status, free spaces, disk controller, Volume controller? Displays info about plexes #vxprint -lp #vxprint -l plex_name Displays info about subdisks # vxprint -st #vxprint -l disk##-## show disk iops over 10 seconds... #ssaadm display -p c# Traces all i/o on a volume.. #vxtrace vol To report disk stats #vxstat -d Displays the free space on the disks #vxdg free Display the disk crontroller #vxprint list #vxprint -Aht Tells you how much you can grow a volume by #vxassist maxgrow vol How to remove the pluxs ,subdisk.

In VERITAS How to recover the mirror disk with data.


Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 354

How to bring the existing data disk into VERITAS volume manger control. Through Encapsulations method

How to change the mirror status from 0:1 to 0:5 and how? Through vxedit Were the veritas disk information store. #/kernel/drv/sd.cf How to increase the size of the file system? # df k ( dentify the VERITAS group and volume name of /myhr on EXU407 ) # vxassist g appdg maxsize (check for the free space available in the group appdg on EXU407 ) # vxprint thA g appdg (Check if /myhr is mirrored) # mount p (check the file system of /myhr ) # cp p /etc/vfstab/etc/vfstab.070223 ((take backup of /etc/vfstab file ) you can increase the size of teh file system by using solaris volume manager # vxresize F vxfs g rootdg myapps +5g (increase the size of /myapps by 5gb) How to increase the size of the file system? # vxresize F vxfs g rootdg myapps +5g (decrease the size of /myapps by 5gb) #df -k How to add a root dg? #vxdg -g <dg name> adddisk <media name>=c2t0d0 What is the difference between the VERITAS 3.0 and VERITAS 4.0? In VERITAS 3.0 , the root dg is present by default In VERITAS 4.0, the root dg has to be created manually In Vertias 4.0 cdsdisk has introduced which means, in any os it can be exported How to mirror a root dg? With eg #vxrootmir How to rename the old root disk. In this example, rootdisk is being renamed as rootold. # vxedit -g rootdg rename rootdisk rootold How to Encapsulate the new root disk (c2t2d0). # /etc/vx/bin/vxencap rootdisk=c2t2d0 How to mirror and unmirror a disk? #vxassist mirror hazly disk05 disk06 uses disks5 and 6 ro make a mirror on volume called hazly #vxassist make hazly 50m layout=mirror makes a 50Mb mirror using any 2 disks How to remove a disk group? #vxdg destroy <disk group> How to display the volume configuration information? #vxprint -l rootdg
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 355

What is the command to identify master node on vcs #vxdctl -c mode mode: enabled: cluster active - MASTER What is the nature of VCS? Active Active E Load Balancing and high availability Active passive E No load Balancing What is HA? It is a daemon of a cluster which is in the form of Active E Passive, i.e. No load balancing HA--> Highly Available means, two or more systems are connected with the same configuration, if one fails the other will take care the resources How far VCS supports? VCS supports more than 32 nodes. What are the protocols in VCS VRTSLLT ( low latency ) & VRTSGAB ( Global autom) How to Use the # DEVICE c1t1d0s2 c1t2d0s2 c1t3d0s2 # # clear the failing flag on a veritas volume manager disk: vxdisk list command to find out which disks are failing: vxdisk list TYPE DISK GROUP STATUS auto:sliced mydg01 mydg online failing auto:sliced mydg02 mydg online auto:sliced mydg03 mydg online vxedit set failing=off mydg02 vxdisk list

How to 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 . Command Syntax: vxassist snapstart volume_name To create a snapshot mirror of a volume called vol8, type #vxassist snapstart vol8

How to bring the Disk into diskgroup on veritas. Force a lip event on the hbas so they will re-login in Storage luxadm e forcelip /dev/cfg/c5 luxadm e forcelip /dev/cfg/c7 Enable the disk devices. vxdctl enable vxdisk o alldgs list initialize newdisk
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 356

vxdisksetup i <diskname> Add disk to disk group vxdg g oradg adddisk oradg05= <diskname> vxdg g oradg adddisk oradg06= <diskname> Verify free disk space vxassist g oradg maxsize How to Create a snapshot volume Command Syntax 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

What are the types of cluster configuration? 1. Horizontal configuration 2. Vertical configuration Command to find the VCS status #hastatus sum What are the minimum hardware requirements for cluster configuration? Storage boxes 1 Node Cluster 2 Minimum 2 nodes, 2 etherned address, shared disk and HA applications (ex) oracle What is the purpose of ha daemons in VCS servers? Ha daemons are used to start/stop services in VCS servers How to check the communication between 2 nodes? Heart beat checks the communication between 2 nodes. What is a heart-beat? It is a script that checks the communication between nodes. Heart-beat is a communication which can be set at the time of creating a system in a cluster, which can send and receive signal through that designed port. to check the heartbeat use the command gabconfig -a

What are the two types of service groups? 1. Parallel Service group
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 357

2.

Fail over service group.

How to unconfigure llt and gab #lltconfig U #gabconfig -U #hastop How to start llt and gab #lltconfig c #gabconfig c -x #hastart How to start one node cluster. Ok boot x How to stop one node cluster exclusively # hastop local force ( This will ring down the vcs only not application it will on alive) Were the vcs logs will be #/var/VRTSvcs/log/engine_A.log What are configuration files and to configure it in VCS configuration files: Notes :- Before configuring VCS make sure the local_mac_address =true. #eeprom local_mac_address?=true ( on both the nodes) # /etc/llthosts (specify the node names) (eg) 0 sun 1 1 sun 2 #/etc/llttab (specify the node names) Set-node 0 Link qfe0 /dev/qfe:0 _ ether _ _ Link qfe1 /dev/qfe:1 _ ether _ _ set_cluster 10 Start #/etc/gabtab (specify the node names) /sbin/config c n 2 Path to be set = /etc/profile #PATH=$PATH:/opt/VRTS/bin:/sbin:/opt/VRTSllt #export PATH #/etc/VRTSvcs/conf/config/main.cf #/etc/VRTSvcs/conf/config/sysname How to bring the resource to online and offline # /opt/VRTSvcs/bin/hagrp -online (service_group) -sys (system_name) hagrp # /opt/VRTSvcs/bin/hagrp -offline (service_group) -sys (system_name) hagrp How to Switch service group between nodes # /opt/VRTSvcs/bin/hagrp -switch (service_group) -to (system_name) hagrp How to Freeze svcgroup, (disable onl. & offl.) # /opt/VRTSvcs/bin/hagrp -freeze (service_group) [-persistent] hagrp
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Sun Solaris 10 Operating System

Page 358

How to unfreeze the svcgroup, (enable onl. & offl.) # /opt/VRTSvcs/bin/hagrp -unfreeze (service_group) [-persistent] What is the command to check the connectivity between 2 nodes Get the mac address from both the nodes #getmac /dev/qfe:0 Sv from server side Cv from client side #./dlpiping sv /dev/qfe:0 macaddresss #./dlpiping cv /dev/qfe:0 macaddresss How to stop the VCS #hastop local #hastop local evaculate 100% shutdown the system #hastop loca force without shutting down the application,only vcs can be down (hadaemon) What are the service group dependence? 4types Online local Online remote Online global Offline global SUN CLUSTER offline cluster resources on smslu131 verify resources are online on tgui1-svc - # scstat Take all resources offline - # scswitch F g smsweb-rg verify resources are offline on both tgui1 & tgui2 - # scstat verify resources are offline on tgui1-svc & tgui2-svc - # scstat

switch resources online on smslu131 - #scswitch Z g smsweb-rg verify resources are online on tgui1-svc - #scstat verify resources are online on tgui1-svc - # scstat switch resources from smslu131 to smslu132 -# scswitch z g smsweb-rg h tgui2-svc verify resources are online on tgui2-svc - # scstat switch resources from smslu131 to smslu132 -# scswitch z g smsweb-rg h tgui1-svc verify resources are online on tgui1-svc - # scstat

The contents of this material is not affiliated with Sun Microsystems affiliates. Any tips/information offered up here can be followed at your own risk. I will not be responsible for any loss of data, time, or any other damage occurred by following any information on this material. They seemed to work for me, but your mileage may vary. 2009 Manickam Kamalakkannan
Sun Solaris 10 OS/Storage-SVM,VxVM/Cluster Manickam Kamalakkannan

Vous aimerez peut-être aussi