15
Veritas Volume Manager is the method of converting a physical disk to a logical disk for more effective backup and restoration of data. The basic physical storage device that ultimately stores your data is the hard disk. When you install Solaris, hard disks are formatted as part of the installation program. A disk must be initialized through vxinstall before it can be managed by Volume Manager. A Physical Disk is made up of a VTOC and partitions. A volume table of contents (VTOC) stores information about the disk structure and organization. 200k. You locate and access the data on a physical disk by using a device name that specifies the controller, target ID, and disk number. A typical device name uses the format: c#t#d# and s# Benefits of using Volume Manager for virtual storage management include: Spanning disks Volume Manager enables you to span data over multiple physical disks. Creating complex multidisk configurations Volume Manager virtual objects also enable you to create complex disk configurations in multidisk systems that enhance performance and reliability. Multidisk configurations enable: Mirroring of data Performance improvements High availability Online administration Volume manager also uses virtual objects to perform administrative tasks on disks without interrupting service to applications and users. Volume Manager rewrites the VTOC and creates two partitions on the physical disk. One partition contains the private region, and the other contains the public region. Tag 14 is always used for the public region of the disk. Tag 15 is always used for the private region of the disk. Volume Manager virtual objects include: Disk groups Volume Manager disks Subdisks Plexes

VMStudy Guide

Embed Size (px)

DESCRIPTION

vm study guide

Citation preview

Veritas Volume Manager is the method of converting a physical disk to a logical disk for more effective backup and restoration of data. The basic physical storage device that ultimately stores your data is the hard disk. When you install Solaris, hard disks are formatted as part of the installation program.

A disk must be initialized through vxinstall before it can be managed by Volume Manager.

A Physical Disk is made up of a VTOC and partitions.

A volume table of contents (VTOC) stores information about the disk structure and organization. 200k.

You locate and access the data on a physical disk by using a device name that specifies the controller, target ID, and disk number. A typical device name uses the format: c#t#d# and s#

Benefits of using Volume Manager for virtual storage management include:

Spanning disks

Volume Manager enables you to span data over multiple physical disks.

Creating complex multidisk configurations

Volume Manager virtual objects also enable you to create complex disk configurations in multidisk systems that enhance performance and reliability. Multidisk configurations enable:

Mirroring of data Performance improvements High availability

Online administration

Volume manager also uses virtual objects to perform administrative tasks on disks without interrupting service to applications and users.

Volume Manager rewrites the VTOC and creates two partitions on the physical disk. One partition contains the private region, and the other contains the public region.

Tag 14 is always used for the public region of the disk. Tag 15 is always used for the private region of the disk.

Volume Manager virtual objects include:

Disk groups Volume Manager disks Subdisks Plexes

Volumes Not LUN

A disk group is a collection of VxVM disks. You group disks into disk groups for management purposes. Disk groups enable high availability, because a disk group and its components can be moved as a unit from one host machine to another. Disk drives can be shared by two or more hosts, but accessed by only one host at a time. If one host crashes, the other host can take over the failed host's disk drives, as well as its disk groups.

A Volume Manager (VxVM) disk is created from the public region of a physical disk that is under Volume Manager control. Each VxVM disk corresponds to at least one physical disk. Each VxVM Disk has a unique virtual disk name called a disk media 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 physical address of c#t#d# becomes known as the disk access record.

The rootdg disk group is a special disk group that follows a different set of naming conventions. For disks in the rootdg disk group, the default VxVM disk names are disk01, disk02, and so on.

A VxVM disk can be divided into one or more subdisks. A subdisk is a set of contiguous disk blocks that represent a specific portion of a VxVM disk, which is mapped to a specific region of a physical disk. A subdisk is a subsection of a disk's public region. A subdisk is the smallest unit of storage in Volume Manager. The default name for a subdisk takes the form DMname-##.

Volume Manager uses subdisks to build virtual objects called plexes. A plex is a structured or ordered collection of subdisks that represents one copy of the data in a volume. The default naming convention for plexes in a volume is volumename-##.

A volume is a virtual storage device that is used by applications in a manner similar to a physical disk. Due to its virtual nature, a volume is not restricted by the physical size constraints that apply to a physical disk.A volume can span across multiple disks. Volume Manager uses the default naming convention vol## for volumes.

A volume must have at least one complete plex. A volume can have up to 32 plexes

A volume's layout refers to the organization of plexes in a volume.

The virtual objects contained in volumes are: VxVM disks, disk groups, subdisks, and plexes

Common volume layouts include:

Concatenated Striped Mirrored RAID-5

In a concatenated volume, subdisks are arranged both sequentially and contiguously within a plex.

In a striped volume, data is spread evenly across multiple disks.

A RAID-5 volume uses striping to spread data and parity evenly across multiple disks in an array.

A mirrored volume uses multiple plexes to duplicate the information contained in a volume.

When you run the installation program, you will answer these questions:

Which disks do you want to place under Volume Manager control? o It is recommended that rootdg only be used for the root file system

and its mirrors. Therefore, the only disks that you should place under Volume Manager control during installation are the root disk and disks that you plan to use to mirror the root disk.

Do you want to exclude disks from Volume Manager control? o To exclude specific disks from Volume Manager control, create the file

/etc/vx/disks.exclude o To exclude all disks on an entire controller from Volume Manager

control, create the file /etc/vx/cntrls.exclude When you place disks under Volume Manager control, do you want to

preserve or eliminate data in existing file systems and partitions? o Saving the data on a disk brought under Volume Manager control is

called disk encapsulation. o Eliminating all of the data on a physical disk brought under Volume

Manager control is called disk initialization Do you want to place the system root disk under Volume Manager control?

o If you plan to mirror the root disk, then you must place the root disk under Volume Manager control

Do you want to set up each disk on a controller differently, or do you want to set up all disks on a controller in the same way?

To issue a new license key, VERITAS Customer Support requires the following information: Host ID and Host machine type

The VERITAS Volume Manager product consists of the following software packages:

VRTSvxvm This package contains the VERITAS Volume Manager software, including drivers, daemons, and utilities. This is only mandatory install.

VRTSvmdoc This package contains online copies of VERITAS Volume Manager documentation and guides.

VRTSvmman This package contains the VxVM manual pages.

VRTSvmdev This package contains the optional VxVM developer's package and consists of the library and header files.

VRTSvmsa This package contains the VERITAS Volume Manager Storage Administrator (VMSA) server and client software.

To install the VxVM software packages, you use the pkgadd command. Install License, then Volume Manager and then other packages.

To view currently installed licenses:

1. At the command line, type vxlicense -p

To install only the VxVM software, you type:

# pkgadd -d /cdrom/CD_name/OS_version/pkgs VRTSvxvm

# pkginfo | grep VRTS

# pkginfo -l VRTSvxvm The sole purpose of running vxinstall is to create the rootdg disk group. Ver 3.1 > Volume Manager supports three user interfaces

Volume Manager Storage Administrator (VMSA) is a graphical user interface to Volume Manager

The command line interface (CLI) consists of UNIX utilities that you invoke from the command line.

The Volume Manager Support Operations interface, commonly called vxdiskadm, is a menu-driven, text-based interface that you can use for disk and volume administration functions.

VMSA is a Java-based interface that consists of a server and a client. The VMSA server runs on a UNIX machine that is running the VERITAS Volume Manager. The VMSA client runs on any machine that supports the Java Runtime Environment, which can be Solaris, HP-UX, or Windows.

Some features of VMSA include:

Security VMSA can only be run by users with appropriate privileges, and access can be restricted to a specific set of users.

Read-Only Mode You can run VMSA in read-only mode for monitoring, training, or browsing purposes.

Multiple Host Support The VMSA client can provide simultaneous access to multiple host machines. You can use a single VMSA client session to connect to multiple hosts, view the objects on each host, and perform administrative tasks on each host.

Multiple Views of Objects VMSA provides multiple views of Volume Manager objects. You can view

objects in a hierarchical tree layout, in a list format, and in a variety of graphical views.

You can also view objects and their details in other ways:

The Object View provides a graphical view of objects in a disk group. The Volume Layout Details window provides a graphical view of a volume. The Volume to Disk Mapping window provides a tabular view of the

relationship between volumes and disks. The Object Properties window provides information about a selected object.

VMSA logs all task requests. You can view a history of VMSA tasks, including tasks in progress, in two ways:

Displaying the Task Request Monitor window Viewing the Command Log file

Some high-level CLI commands include:

vxassist This command creates and manages volumes in a single step.

vxprint This command lists information from the VxVM configuration records.

vxdg This command operates on disk groups; vxdg creates new disk groups, and administers existing disk groups.

vxdisk This command administers disks under VxVM control. vxdisk defines special disk devices, initializes information stored on disks, and performs additional special operations.

Most commands can be found in: /opt/VRTSvxvm/man/man1m. CLI commands can be found in /etc/vx/bin.

To set up a list of users who have permission to use VMSA, add a group named vrtsadm to the group file /etc/group.

To specify a list of users with permission to run VMSA in read-only mode, add a group named vrtsro to the /etc/group file.

To start vxdiskadm, you type vxdiskadm at the command line to display the main menu.

VERITAS Volume Manager version 3.1.x supports VMSA version 3.1.x only.

1. Start the VMSA server:

# ./vmsa_server &

1. To start the VMSA client for administering a local UNIX machine, you type:

# vmsa

To confirm that the VMSA server is running, type:

# vmsa_server -q

To display the VMSA version number, type:

# vmsa_server -V

To start the client in read-only mode from the command line, you type:

# vmsa -r

Before a disk can be placed under Volume Manager control, the disk media must be formatted outside of VxVM using the standard UNIX format command. SCSI disks are usually preformatted.

An initialized disk is placed into the VxVM free disk pool.

When you add a disk to a disk group, it becomes a Volume Manager disk.

For example, to configure the disk c1t0d0, you type:

# vxdisksetup -i c1t0d0

For example, to add the disk c2t0d0 to the disk group newdg, and assign a disk media name of newdg02, you type:

# vxdg -g newdg adddisk newdg02=c2t0d0

You use the vxdisk list command to display basic information about all disks attached to the system.

To display detailed information about a disk, you use the vxdisk list command with the name of the disk:

# vxdisk list datadg01

To view a summary of information for all disks, you use the -s option with the vxdisk list command.

# vxdisk -s list

To evacuate a disk from the command line, use the vxevac command:

# vxevac -g datadg datadg02 datadg03

For example, to remove the disk newdg02 from the disk group newdg, you type:

# vxdg -g newdg rmdisk newdg02

Once the disk has been removed from its disk group, you can remove it from Volume Manager control completely by using the vxdiskunsetup command.

For example, to rename datadg01 to datadg03, you type:

# vxedit -g datadg rename datadg01 datadg03

For example, to move the physical disk c0t3d0, that has a disk media name of datadg04, from disk group datadg to disk group mktdg, you type:

# vxdg -g datadg rmdisk datadg04

# vxdg -g mktdg adddisk mktdg02=c0t3d0

You can never have an "empty" disk group, because you cannot remove all disks from a disk group without destroying the disk group.

Disk groups assist disk management in several ways:

Disk groups enable the grouping of disks into logical collections for a particular set of users or applications.

Disk groups enable a set of disks to be easily moved from one host machine to another.

Disk groups enable high availability. Disk drives can be shared by two or more hosts, but accessed by only one host at a time. If one host crashes, the other host can take over its disk groups and therefore its disks.

VxVM requires that the rootdg disk group exist and that it contain at least one disk.

Default disk media names. When you add a disk to the rootdg disk group, the default disk media names are disk01, disk02, disk03, and so on. For all other disk groups, the default disk media names are diskgroup01, diskgroup02, diskgroup03, and so on. For example, if you add two disks to the disk group datadg, the default disk media names are datadg01 and datadg02.

The rootdg disk group cannot be destroyed and must exist on every system, because it is an essential part of the VxVM boot process.

To create a disk group named newdg on device c1t1d0s2, and specify a disk media name of newdg01, you type:

# vxdg init newdg newdg01=c1t1d0s2

To deport the disk group newdg and rename it as newerdg:

# vxdg -n newerdg deport newdg

To deport the disk group newdg and specify a new host of server1:

# vxdg -h server1 deport newdg

To import the disk group newdg and rename it as newerdg, you type:

# vxdg -n newerdg import newdg

To clear import locks on a disk group, you add the -C option to the vxdg import command.

# vxdg -tC -n tempdg import newdg

For example, to destroy the disk group newdg, you type:

# vxdg destroy newdg

Use vxdisk -s list to display information including disk group names and disk group IDs for each disk.

# vxdisk -s list

Use vxdg list to display disk group names, states, and IDs for all imported disk groups in the system.

# vxdisk list

Use vxdisk -o alldgs list to display all disk groups, including deported disk groups.

# vxdisk –o alldgs list

Use vxdg free to display free space sections on each disk. This command displays free space on all disks in the disk group.

# vxdisk free

To upgrade the disk group datadg from version 40 to the latest version, 80, you type:

# vxdg upgrade datadg

To upgrade the disk group datadg from version 20 to version 40, you type:

# vxdg -T 40 upgrade datadg

A volume can provide greater capacity and better availability and performance than a single physical disk. A volume can be extended across multiple disks to increase

capacity, mirrored on another disk to provide data redundancy, or striped across multiple disks to improve I/O performance.

Disk spanning is the combining of disk space from multiple physical disks to form one logical drive. Disk spanning has two forms:

Concatenation: Concatenation is the mapping of data in a linear manner across two or more disks.

Striping: Striping is the mapping of data in equal-sized chunks alternating across multiple disks. Striping is also called interleaving.

To protect data against disk failure, the volume layout must provide some form of data redundancy. Redundancy is achieved in two ways:

Mirroring: Mirroring is maintaining two or more copies of volume data. Parity: Parity is a calculated value used to reconstruct data after a failure by

doing an exclusive OR (XOR) procedure on the data. Parity information can be stored on a disk. If part of a volume fails, the data on that portion of the failed volume can be recreated from the remaining data and parity information.

RAID Level Description

RAID-0 RAID-0 refers to simple concatenation or striping. Disk space is combined sequentially from two or more disks or striped across two or more disks. RAID-0 does not provide data redundancy.

RAID-1 RAID-1 refers to mirroring. Data from one disk is duplicated on another disk to provide redundancy and enable fast recovery.

RAID-5 RAID-5 is a striped layout that also includes the calculation of parity information, and the striping of that parity information across the disks. If a disk fails, the parity is used to reconstruct the missing data.

RAID 0+1 Adding a mirror to a concatenated or striped layout results in RAID 0+1, a combination of concatenation or striping (RAID-0) with mirroring (RAID-1). Striping plus mirroring is called the mirror-stripe layout. Concatenation plus mirroring is called the mirror-concat layout. In these layouts, the mirroring occurs above the concatenation or striping.

RAID 1+0 RAID 1+0 combines mirroring (RAID-1) with striping or concatenation (RAID-0) in a different way. The mirroring occurs below the striping or concatenation in order to mirror each column of the stripe or each chunk of the concatenation. Most resilient. This type of layout is called a layered volume.

Concatenation: Advantages: Data is read and written sequentially which is the fastest method and is much easier to administer, while utilizing free space well.

Concatenation: Disadvantages: Once you perform any editing data becomes fragmented, reads are longer to index and there is no protection against disk failure.

The default stripe unit size is 128 sectors (64K) for Stripped.

Striping: Advantages: Uses parallel data transfer to multiple disks for faster reads on fragmented information. The data load is balanced.

Striping: Disadvantages: No redundancy. One disk crash can effect multiple volumes, because data is spread across more disks.

Although a volume can have a single plex, at least two plexes are required to provide redundancy of data.

Mirroring: Advantages: Increases reliability by duplicating data.

Mirroring: Disadvantages: Requires twice as much space. Slows down write performance because copying is done in parallel.

The default stripe unit size for a RAID-5 volume is 32 sectors (16K).

RAID-5: Advantages: Data is recreated from parity, less space. This also improves the read because less data is fragmented.

RAID-5: Disadvantages: The write time is increased because parity has to be re-written and recomputed.

Before you create a volume, you should ensure that you have enough disks to support the layout type.

A striped volume requires at least two disks. A mirrored volume requires at least one disk for each plex. A mirror cannot be

on the same disk that other plexes are using. A RAID-5 volume requires at least three disks. Enabling logging requires at least one additional disk to contain the log.

To create a concatenated volume called datavol with a length of 10 megabytes, in the disk group datadg, using any available disks, you type:

# vxassist -g datadg make datavol 10m

To create a 20-megabyte striped volume called payvol in acctdg, that has three columns, uses the default stripe unit size, and any available disks except for acctdg04, you type:

# vxassist -g acctdg make payvol 20m layout=stripe ncols=3 !acctdg04

To create a 20-megabyte striped volume called expvol in acctdg that has three columns, a stripe unit, size of 64K, and is striped across the disks acctdg01, acctdg02, and acctdg03, you type: Default stripe unit = 64k, columns = 2.

# vxassist -g acctdg make expvol 20m layout=stripe ncols=3 stripeunit=64K acctdg01 acctdg02 acctdg03

To create a 20-megabyte RAID-5 volume called expvol, in the disk group acctdg, that has three columns, a stripe unit size of 32 sectors, and is striped across any available disks, you type:

# vxassist -g acctdg make expvol 20m layout=raid5

To create the same volume, but specify a stripe unit size of 32K, and assign the volume to four specific disks, you type:

# vxassist -g acctdg make expvol 20m layout=raid5 stripeunit=32K acctdg01 acctdg02 acctdg03 acctdg04

To create a 5-megabyte, concatenated, mirrored volume called datavol in the disk group datadg, you type:

# vxassist -g datadg make datavol 5m layout=mirror

To create a striped volume that is mirrored, you type:

# vxassist -g datadg make datavol 5m layout=stripe,mirror

To specify more than two mirrors, you add the nmirror attribute:

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

To run the process in the background, you add the -b option:

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

For example, to create a concatenated volume that is mirrored and logged:

# vxassist -g datadg make datavol 5m layout=mirror,log

To create a striped and mirrored layout that is logged:

# vxassist -g datadg make datavol 5m layout=stripe,mirror,log

Only concatenated or striped volumes can be mirrored. You cannot mirror a RAID-5 volume.

For example, to mirror the volume datavol, in the disk group datadg, you type:

# vxassist -g datadg mirror datavol

By enabling logging, VxVM tracks changed regions of a volume. Log information can then be used to reduce plex synchronization times and speed the recovery of volumes after a system failure. Logging is an optional feature, but is highly recommended, especially for large volumes.

VxVM supports two types of logging:

Dirty region logging (for mirrored volumes) RAID-5 logging (for RAID-5 volumes)

DRL keeps track of the regions that have changed due to I/O writes to a mirrored volume.

RAID-5 logs speed up the resynchronization time for RAID-5 volumes after a system failure.

For example, to add a log to the volume datavol in the disk group datadg, you type:

# vxassist -g datadg addlog datavol

For example, to remove the dirty region log from the volume datavol , you type:

# vxassist -g datadg remove log datavol

The read policy for a volume determines the order in which volume plexes are accessed during I/O operations.

VxVM has three read policies:

Round robin VxVM reads each plex in turn in "round-robin" manner for each nonsequential I/O detected. Sequential access causes only one plex to be accessed in order to take advantage of drive or controller read-ahead caching policies. If a read is within 256K of the previous read, then the read is sent to the same plex.

Preferred plex Volume Manager reads first from a plex that has been named as the preferred plex. Read requests are satisfied from one specific plex, presumably the plex with the highest performance. If the preferred plex fails, another plex is accessed.

Selected plex This is the default read policy. Under the selected plex policy, Volume

Manager chooses an appropriate read policy based on the plex configuration, to achieve the greatest I/O throughput. If the volume has an enabled striped plex, the read policy defaults to that plex; otherwise, it defaults to a round robin read policy.

For example, to set the read policy for the volume datavol to round-robin, you type:

# vxvol -g datadg rdpol round datavol

To set the policy for datavol to read preferentially from the plex datavol-02, you type:

# vxvol -g datadg rdpol prefer datavol datavol-02

To set the read policy for datavol to dynamically select an appropriate read policy based on the mirrors, you type:

# vxvol -g datadg rdpol select datavol

To create the file system use the mkfs (VxFS) or newfs (UFS) commands with the appropriate options to create the file system on the volume where the volume subdisks are stored. For example:

# mkfs -F vxfs /dev/vx/rdsk/datadg/datavol

Create a directory to use as a mount point for the file system:

# mkdir /data

Use the mount command with appropriate options to link the volume to the mount point:

# mount -F vxfs /dev/vx/dsk/datadg/datavol /data

When a file system has been mounted on a volume, the data is accessed through the mount point directory.

When data is written to files, it is actually written to the block device file: /dev/vx/dsk/datadg/datavol

When fsck is run on the file system, the raw device file is checked: /dev/vx/rdsk/datadg/datavol

The Object View window displays a graphical view of all VxVM objects.

The Volume Layout Details window displays a close-up graphical view of the layout, components, and properties of a single volume.

The Volume to Disk Mapping window displays a tabular view of volumes and their relationships to underlying disks.

The Volume Properties window displays properties on a set of tabbed pages.

vxprint -g diskgroup [options]

The vxprint command can display information about disk groups, disk media, volumes, plexes, and subdisks.

Common Options

Option Description -vpsd Select only volumes (v), plexes (p), subdisks (s), or disks

(d). Options can be used individually or in combination. -h List hierarchies below selected records. -r Display related records of a volume containing

subvolumes. Grouping is done under the highest-level volume.

-t Print single-line output records that depend upon the configuration record type. For disk groups, the output consists of the record type, the disk group name, and the disk group ID.

-l Display all information from each selected record. Most records that have a default value will not be displayed. This information is in a free format that is not intended for use by scripts.

-a Display all information about each selected record, one record per line, with a one-space character between each field; the list of associated records is displayed.

-A Select from all active disk groups. -e pattern Show records that match an editor pattern.

Additional Options

Option Description -F[type:] format_spec

Enable the user to define which fields to display.

-D - Read a configuration from the standard input. The standard input is expected to be in standard vxmake input format.

-m Display all information about each selected record in a format that is useful as input to the vxmake utility.

-n Display only the names of selected records. -G Display only disk group records. -Q Suppress the disk group header that separates each disk

group. A single blank line will separates each disk group. -q Suppress headers that would otherwise be printed for the

default and the -t and -f output formats.

To display the volume, plex, and subdisk record information for all volumes in the system, you use the command:

vxprint -ht

For example, to remove the volume datavol from the disk group datadg :

# vxassist -g datadg remove volume datavol

You can use the vxassist remove command with VxVM release 3.0 and later. For earlier versions of VxVM, use the vxedit command:

vxedit [-g diskgroup] -rf rm volume_name

In the syntax:

Use the -r and -f options in conjunction to remove a started volume. If the -r option is not used, the removal will fail if the volume has an

associated plex. The -f option stops the volume so that it can be removed.