Tuesday, July 12, 2011

Veritas Volume Manager Intro

      The Veritas Volume Manager, VVM or VxVM is a proprietary logical volume manager from Veritas (now part of Symantec). It is available for Windows, AIX, Solaris, Linux, and HP-UX. A modified version is bundled with HP-UX as its built-in volume manager. It offers volume management and Multipath I/O functionalities.


VERITAS Volume Manager software is an advance system-level disk and storage
array solution that alleviates downtime during system maintenance by enabling easy,
online disk administration and configuration.
By providing a logical volume management layer, VERITAS Volume Manager
overcomes the physical restriction imposed by hardware disk devices.
Spanning: The process of logically combining physical devices to enable data to be
stored across multiple devices is called spanning.
FEATURES OF VxVM
Support for: Simple, RAID0, RAID1, RAID0+1, RAID1+0, RAID5
Dynamic Multipathing (DMP):
  Load balancing and redundant I/O paths to disk arrays supporting multi-controller
attachment.  
Online Relay out:
  VERITAS allows you to change the layout of a VERITAS Volume while it is live and
mounted. Change a RAID0 to a RAID5 without a second of downtime!
Snapshot:
  Take a snapshot of your data, creating a "shadow" of it which you can use for online
backups.
Hot Relocation:  
  Designate "spares" which will take the place of failed disks on the-fly.
Dirty Region Logging (DRL):  
  Volume transaction logs which provide fast recoveries after system crashes.
More...... more than I can list!

Why Volume Manager?
Disk spanning: By using volumes and other virtual objects, Volume Manager enables you to span data
over multiple physical disks. The process of logically combining physical devices to
enable data to be stored across multiple devices is called spanning.

Load balancing: Data can be spread across several disks within an array to distribute or balance I/O
operations across the disks. Using parallel I/O across multiple disks improves I/O performance by
increasing data transfer speed and overall throughput for the array.

Complex multidisk configurations:Volume Manager virtual objects enable you to create complex disk configurations in multidisk systems
that enhance performance and reliability. Multidisk configurations, such as striping, mirroring, and
RAID configurations, can provide data redundancy, performance improvements, and high availability.

Online administration: Volume Manager uses virtual objects to perform administrative tasks on disks without interrupting
service to applications and users.

High availability: Volume Manager includes automatic failover and recovery features that ensure continuous access to
critical data. Volume Manager can automatically relocate data in case of disk failure ( hot relocation)
and automatically detect and use multipathed disk arrays ( dynamic multipathing, or DMP).


IMPORTANCE:
Before you install and set up VERITAS Volume Manager, you should be
familiar with the virtual objects that VxVM uses to manage physical disk
storage.
A conceptual understanding of virtual objects helps you to interpret
and manage the virtual objects represented in VxVM interfaces, tools, and
reports.
VxVM uses two types of objects to handle storage management:
Physical objects
Virtual objects.
Physical Objects:
Physical Object is nothing but a physical disk, which is basically a data storage device,
where ultimately data gets stored.
Data on the physical disk is being accessed by using a device name c#t#d#s#
c#  - Controller
t# - Target ID
d#  - Disk
s# - Slice or Partition.
Physical Disk - c0t1d4
VTOC  - An area which stores information about the disk structure
and its configuration.
Partitions - A physical disk can be divided into one or more partitions,
also known as slices. The partition number is added at the end of the device name, and
is denoted by s#. Note that partition s2 refers to an entire physical disk.



Virtual Objects under VVM,
Volume Manager Disks (VM Disks)
Disk Group
Subdisk
Plex
Volume

 The connection between physical objects and VxVM objects is made when you place
a physical disk under VxVM control.
VM Disk:
A disk, Initialized under the VERITAS Volume Manager is called VMDisks.
Each VM disk corresponds to at least one physical disk or disk partition.
A VM disk typically includes a public region (allocated storage) and a private region
where VxVM internal configuration information is stored.
Each VxVM Disk has a unique virtual disk name called a disk media name. The disk
media name is a logically used by Volume Manager for administrative purposes.
A VxVM disk is given a disk media name when it is added to a disk group.
You can supply the disk media name or allow Volume Manager to assign a default name.
Once a VxVM disk is assigned a disk media name, the disk is no longer referred to by its
physical address of c#t#d#.
The default name for a VM disk is disk##


Disk Group:
A disk group is a collection of VM disks that share a common configuration.
A disk group configuration is a set of records with detailed information about related
VxVM objects, their attributes, and their connections.

The default disk group is rootdg (or root disk group).
Note Even though rootdg is the default disk group, it does not contain the root disk unless
the root disk is encapsulated.

You can create additional disk groups as necessary.
The disk group name can be upto 31 characters.


Subdisk:
Subdisk is a contiguous disk blocks, A VXVM disk can be divided into one or more subdisks.
A subdisk is a set of contiguous disks blocks that represent a specific portion of a VXVM disk.
Any VM disk space that is not part of a subdisk is free space. We can use a free space to create new subdisks.
Default name syntax for the subdisk is disk##-##


Plex:
VxVM uses subdisks to build virtual objects called plexes.
The default naming convention for plexes in a volume is volumename-##. The default
plex name consists of the volume name, a hyphen, and a two-digit number.

You can organize data on subdisks to form a plex by using the following methods:
Concatenation
striping (RAID-0)
mirroring (RAID-1)
striping with parity (RAID-5)


Volume:
A volume is a virtual disk device that appears to applications, databases, and file systems
like a physical disk device, but does not have the physical limitations of a physical disk
device. A volume consists of one or more plexes, each holding a copy of the selected
data in the volume. Due to its virtual nature, a volume is not restricted to a particular disk
or a specific area of a disk.

The configuration of a volume can be changed by using VxVM user interfaces.
Configuration changes can be accomplished without causing disruption to applications or
file systems that are using the volume.

For example, a volume can be mirrored on separate disks.
A volume may be created under the following constraints:
Its name can contain up to 31 characters.
It can consist of up to 32 plexes, each of which contains one or more subdisks.
It must have at least one associated plex that has a complete copy of the data in the volume with at least one associated subdisk.
All subdisks within a volume must belong to the same disk group.



Volume Layouts:
Data in virtual objects is organized to create volumes by using the following layout
methods:

Concatenation and Spanning
Striping (RAID-0)
Mirroring (RAID-1)
RAID-5 (Striping with Parity)


Concatenation and Spanning:
Concatenation maps data in a linear manner onto one or more subdisks in a plex. To
access all of the data in a concatenated plex sequentially, data is first accessed in the
first subdisk from beginning to end. Data is then accessed in the remaining subdisks
sequentially from beginning to end, until the end of the last subdisk

Primary reason for employing this technique is to create a virtual disk that is larger than
one physical disk device. Concatenation also enables us to grow a virtual disk by
concatenating additional physical disk devices to it.

Concatenation: AdvantagesRemoves size restrictions: Concatenation removes the restriction on size of storage
devices imposed by physical disk size.
Better utilization of free space: Concatenation enables better utilization of free space
on disks by providing for the ordering of available discrete disk space on multiple disks
into a single addressable volume.
Simplified administration: Concatenation enables large file systems to be created and
reduces overall system administration complexity.

Concatenation: DisadvantagesNo protection against disk failure: Concatenation does not protect against disk failure. A
single disk failure may result in the failure of the entire volume.


 Striping:
Striping maps data so that the data is interleaved among two or more physical disks. A
striped plex contains two or more subdisks, spread out over two or more physical disks.
Data is allocated alternately and evenly to the subdisks of a striped plex.

Data is allocated in equal-sized units, called stripe units, that are interleaved between the
columns. Each stripe unit is a set of contiguous blocks on a disk. Primary reason for
employing this is to improve the I/O performance, as the performance increases comes
from accessing the data in parallel. The default stripe unit size is 128 sectors (64K),
IO stream is divided into segments called stripe units which are mapped across two or
more physical disks, forming one logical storage unit.

Striping: Disadvantages
No redundancy: Striping alone offers no redundancy or recovery features.
Disk failure: Striping a volume increases the chance that a disk failure will result in
failure of that volume. For example, if you have three volumes striped across two disks,
and one of the disks is used by two of the volumes, then if that one disk goes down, both
volumes will go down.

Striping: Advantages
Parallel data transfer: Striping is useful if you need large amounts of data written to or read from the physical disks quickly by using parallel data transfer to multiple disks.
Load balancing: Striping is also helpful in balancing the I/O load from multiuser applications across multiple disks.
Improved performance: Improved performance is obtained by increasing the effective bandwidth of the I/O path to the data. This may be achieved by a single volume I/O operation spanning across a number of disks or by multiple concurrent volume I/O operations to more than one disk at the same time.


 Mirroring (RAID - 1):
Mirroring uses multiple mirrors (plexes) to duplicate the information contained in a
volume. In the event of a physical disk failure, the plex on the failed disk becomes
unavailable, but the system continues to operate using the unaffected mirrors.
Note:Although a volume can have a single plex, at least two plexes are required to provide
redundancy of data. Each of these plexes must contain disk space from different disks to
achieve redundancy.

Mirroring: Advantages
Improved reliability and availability: With concatenation or striping, failure of any one
disk can make the entire plex unusable. With mirroring, data is protected against the
failure of any one disk. Mirroring improves the reliability and availability of a striped or
concatenated volume.
Improved read performance: Reads benefit from having multiple places from which to
read the data.

Mirroring: Disadvantages
Requires more disk space: Mirroring requires twice as much disk space, which can
be costly for large configurations. Each mirrored plex requires enough space for a
complete copy of the volume's data.
Slightly slower write performance: Writing to volumes is slightly slower, because
multiple copies have to be written in parallel. The overall time the write operation takes is
determined by the time needed to write to the slowest disk involved in the operation.


 RAID-5 (Striping with Parity):
A RAID-5 volume layout has the same attributes as a striped plex, but includes one
additional column of data that is used for parity. Parity provides redundancy. Parity is a
calculated value used to reconstruct data after a failure.

RAID-5 volumes keep a copy of the data and calculated parity in a plex that is striped
across multiple disks. Parity is spread equally across disks.
The default stripe unit size for a RAID-5 volume is 32 sectors (16K).

RAID-5 requires a minimum of three disks for data and parity. When implemented as
recommended, an additional disk is required for the log.

RAID-5 cannot be mirrored.
RAID-5: Advantages
Redundancy through parity: With a RAID-5 volume layout, data can be
re-created from remaining data and parity in case of disk failure.
Requires less space than mirroring: RAID-5 stores parity information, rather than a complete copy of the data.
Improved read performance: RAID-5 provides similar improvements in read
performance as in a normal striped layout.
Fast recovery through logging: RAID-5 logging minimizes recovery time in case of
disk failure.

RAID-5: Disadvantages
Slow write performance: The performance overhead for writes can be substantial,
because a write can involve much more than simply writing to a data block. A write can
involve reading the old data and parity, computing the new parity, and writing the new
data and parity.


 VMM Environment:


VMM System startup files (Solaris): /etc/system and /etc/rcX.d
Three daemons: vxconfigd, vxiod and vxrelocd


1. VXconfigd: Keeps on watching the configuration changes and update the same in the kernel.
2. VXiod: It shows the no of volume I/O daemons running on the system.
3. VXrelocd: Keep monitoring the disk failures (depends on vxnotify)


Important Info:
These daemons should automatically startup as part of the solaris boot process.
The VXiod daemon "DOES NOT SHOW UP" under the "ps" command.


Important Files for VMM:
/etc/vx - It contains all the VMM related files
/etc/vx/volboot - This files contains important VXVM boot time information
/etc/vx/reconfig.d - These directories contains the important encapsulation information
/etc/vx/reconfig.d/disk.d/cxtyd2 - This directory contains information about the disk encapsulated by VXVM.
/etc/vx/reconfig.d/state.d/install-db - If this file exist then VXVM will not start during bootup process.
/etc/vx/reconfig.d/state.d/root-done - This file is created by VXVM after the root disk encapsulation.
/etc/vfstab - This file controls which VERITAS Volume will be mounted on startup.
/etc/vfstab.prevm - This file is created by VXVM during the root disk encapsulation as a backup copy.
/var/vxvm - VXVM database
/sbin, /usr/sbin - VXVM executable files
/usr/lib/vxvm/bin - Additional Commands


No comments:

Post a Comment