Vxassist
General
CREANG 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
General
The 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.
Vxassist Command Syntax:
Vxassist
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 buy
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_nameraw 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
______________________________________
CREATING A VOLUME:
1.1 CREATING A Concatenated Volume
By Default, Vxassist Creates A Concatenated Volume Using the Space Available On A Diskgroup if The Volume Size Specified Is More THE One Available On A Single Disk.
Disks Can Be Specified from a DiskGroup for a Volume Group But if not exercioned 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
.
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 parystem 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 Suibility.
2.1 Extending a Volume Up to Certain Length,
Command Syntax
· Vxassist growthto volume_name longth
To Extend Vol3 Upto 8000 Sectors, Type:
#Vxassist growthto vol3 8000
2.2 Extending by a given length
Command Syntax
· Vxassist growby volume_name what 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 shir.
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 13003.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
Revound 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 the 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 can not be removed.Dissociate and remove the plex from its volume as follows:
· Vxplex -o rm disable_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 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:
#Vxplex -o rm dissuvm-02
The Output of vxprint -h for Volm Now Shows Volume Volm with Only One Plex ::
Disk group: rootdg typed 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 - - - -
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 area 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
.
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 The Removing The Log and Any Associated Subdisks Completely.
Dissociate The Log from Its Volume as Follows:
· #Vxplex -o rm disable_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 disaplrd-02
The Output of vxprint -h for Volrd Now Shows:
Disk group: rootdg type 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 backup mirror write-only, which is attached to and synchronized with the volume to be backed up and later Detached and name 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 whatver means you prefer. To avoid Wasting Space, you can the 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 Nconfig Nlog Minors Group-ID
DM Name Device Type Privlen Publen State
V Name USTYPE KSTATE State Length Readpol Prefplexpl Name Volume KState State Length Layout Ncol / Wid Mode
SD name Plex Disk diskoffs length [col /] Off Device Mode
DG rootdg 759096729.1025.tweety
DM Disk10 C1T0D0S2 SLICED 559 1044400 -
DM Disk20 C2T0D0S2 SLICED 559 1044400 -
v pubs fsgen enabled active 2288 select -
PL Pubs-01 Pubs Enabled Active 2288 Concat - RW
SD Disk10-01 Pubs-01 Disk10 0 2288 0 C0T0D0 ENA
V Vol8 Fsgen Enabled Active 20480 SELECT -
PL Vol8-01 Vol8 enabled Active 20480 Concat - RW
SD Disk10-02 Vol8-0 disk10 2288 20480 0 C0T1D0 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 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