| ||||||||||||||||||
|
_______________________________________ 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 :
To create the volume appvol of 100MB on disk03
A striped volume contains at least one plex that consists of two or more subdisks located on two or more physical disks. Command Syntax :
To create a striped volume appvol2 with the default stripe unit size on the default number of disks
To create a striped volume appvol2 100MB striped volume on three specific disks.
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 :
To create the RAID-5 volume appvol4 with the default stripe unit size on the default number of disks with RAID-5 log,
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
To extend vol3 upto 8000 sectors, type:
2.2 Extending by a Given Length Command Syntax
To extend volapp by 1000 sectors, type:
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:
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:
3.2 Shrinking by a Given Length Shrink a volume by a specific length as follows:
To shrink volcat by 8000 sectors, type:
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
To stop appvol1
Removing Volume Command Syntax
To remove the volume appvol1
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 :
To create the mirrored volume, appvol22 of 100mb
To create a volume with Dirty Region Logging enabled
5.2 Mirroring an Existing Volume Command syntax
Creating a mirror of volume vol44:
To mirror all existing volumes to available disk space
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:
vxprint -h shows the volume and associated plexes : Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volm fsgen ENABLED 10240 - ACTIVE - - pl volm-01 volm ENABLED 10240 - ACTIVE - - sd disk01-02 volm-01 - 10240 0 - - - pl volm-02 volm ENABLED 10240 - ACTIVE - - sd disk02-03 volm-02 - 10240 0 - - - To disassociate and remove volmir-02 from volmir, type:
The output of vxprint -h for volm now shows volume volm with only one plex:: Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volm fsgen ENABLED 10240 - ACTIVE - - pl volm-01 volmir ENABLED 10240 - ACTIVE - - sd disk01-02 volmir-01 - 10240 0 - - - 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_volDirty 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:
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. 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:
To identify the log plex, use the command:
To disassociate the log plex volrd-02 from volrd, type:
The output of vxprint -h for volrd now shows: Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volrd raid5 ENABLED 32 - ACTIVE - - pl volrd-01 volrd ENABLED 32 - ACTIVE - - sd disk01-02 volrd-01 - 32 0 - - - sd disk02-03 volrd-01 - 32 0 - - -
10. Preparing a Volume for Online Backup Volume manager provides an easy way to take backup of the online data by creating an offline snapshot mirror of the volume . The vxassist snapstart operation creates a write-only backup mirror, which is attached to and synchronized with the volume to be backed up and later detached and made offline by vxassist snapshot command . The snapshot volume can be used by backup utilities while the original volume continues to be available for applications and users.The volume backup method described here does not apply to RAID-5 volumes. Backing up a volume with vxassist involves the following procedure 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:
To create a snapshot mirror of a volume called vol8, type
Create a snapshot volume Command Syntax vxassist snapshot volume_name new_volume_name To create a snapshot volume of vol8, type:
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
#vxprint -t volume_name To display information about vol8, type: #vxprint -t vol8
This article covered a very powerful functionality in veritas volume manager . Veritas manual , lots of interaction with fellow system administrator and articles like this are the ways to fill in the the gaps for the lack of many books in this subject . However there are some very good books about the broader subject matter of storage mangment Following are some of the suggested books in this subject .These books are available for online buying from Amazon.com & provided good knowledge of backup , storage and high availability .
Copyright © 2000-2007 , Adminschoice.com . All Rights Reserved. Site Comment/Suggestions Privacy Post a Comment about this article :
|