- Veritas Disk Management
- Veritas Commands Cheat Sheet
- Veritas Volume Manager Cheat Sheet
- Veritas Volume Manager
Veritas Volume Manager Cheat Sheet:
The Setup:an Oracle database supporting an application called ABC, and given thefollowing:
Assuming that we need to create filesystems intended for Oracle and:
Veritas Volume Manager (VxVM) is a popular and powerful, enterprise-class storage management tool. When you want to inspect a large setup (or sometimes even a small one!), its output (vxprint) can be unclear, even cryptic. Here is a small (root, swap, /var) configuration. This video demonstrates veritas volume manager introduction. This video demonstrates veritas volume manager introduction. The VERITAS Volume Manager Troubleshooting Guide provides information about how to recover from hardware failure, and how to understand and deal with VERITAS Volume Manager (VxVM) error messages during normal operation. It includes guidelines for recovering from the failure of disks and other hardware upon which virtual software.
we are using a SID of 'ABC'
we have nine disks, c0t0d1 through c0t0d9
Veritas Volume Manager supports hydrogenous environment, peta bytes, 4000 sub disks per 1 vmdisk & Online file system management. Volume Manager offers an efficient solution for Fast file system recovery as well. This Volume Manager course will equip you with core skills to install, configure, administer, maintain and troubleshoot a Volume Manager. VCS agents support both Veritas Volume Manager and Linux Logical Volume Manager (LVM2) - i.e Linux volume groups can be imported and deported by VCS. Is this what you asking, if not, please clarify. Veritas Volume Manager can be mikebounds.
we will be creating six volumes: /u01/oradata/ABC ( 4gb), /u02/oradata/ABC (4gb ), /u03/oradata/ABC (8gb ), /u04/oradata/ABC (4gb ), /u01/app/oracle/product/8.0.5_ABC ( 4gb ), and /u01/admin/ABC (4gb ).
We added these disks to Volume Manager Control duringinstallation with vxinstall, or later withvxdiskadd(1m). Both vxinstalland vxdiskadd can add either initialize a previouslyunused disk, or 'encapsulate' a disk already containing data, but not underVolume Manager control.
we could take the following steps to set up our filesystems.
Adding an EMC disk to Veritas
Use the inq utility to see if you have SCSI visibility to the disk
Use vxdisk -o alldgs list to see if Veritas has seen the disk
if not, try the following, and then repeat the previous step:
devfsadm
vxdctl initdmp
vxdctl enable
Creating a Disk Group in Volume Manager:
Create a vxvm disk group for the Oracle SID using vxdg(1m).It's important that all of the disks/filesystems necessary for the ABCdatabase to run are included in the disk group, otherwise the databasecould not be moved to another system.
The easiest way to do this is to use vxdiskadd
vxdiskadd c0t0d0 c0t0d1 c0t0d2 . . .
Doing it the hard way:
vxdg init ABCdg ABCdg01=c0t0d1
This would create a disk group called ABCdg containingone physical disk, c0t0d1, which will be referred to by it's name withinvxvm, ABCdg01. You cannot initiate a disk group without specifying at leastone disk as a member of the group. You should not include any disks destinedto be part of an Oracle Database in the default vxvm group, rootdg. Thisallows you to use the vxdg 'deport' and 'import'commands to migrate an entire vxvm disk group to another host.
Now that we've create the disk group for our database,we can add the rest of our disks to it:
vxdg -g ABCdg adddisk ABCdg02=c0t0d2
vxdg -g ABCdg adddisk ABCdg09=c0t0d9
Creating Volumes With vxassist
vxassist(1m) is a vxvm commandthat acts as a front-end to other vxvm commands, much as newfs(1m)acts as a simpler-to-use front-end to mkfs(1m).Using vxassist with it's -vflag will display the actual vxvm commands used during volume construction.vxassist also front-ends vxfs commands andnormal UNIX utilities during volume construction. An example of this isusing a single vxassist command to set up avolume.Using vxassist simplifies many vxvm tasks,but you should pay careful attention to the defaults you will inherit whensetting up volumes using this tool. Understanding the contents of the /etc/default/vxassistfile is important, especially when striping disks.
Malata laptops & desktops driver download for windows. To make our 8gb /u03/oradata/ABC volume, we could usethe following command line:
vxassist -g ABCdg make ABC01 8g
Breaking it down into it's component parts:
vxassist
-g ABCdg # this volume will belong to the ABCdg disk group
make # tells vxassist that we are creating a new volume
ABC01 # name the volume
8g # specify the size of the volume
Here we create the other five volumes:
vxassist -g ABCdg make ABC02 8g
vxassist -g ABCdg make ABC03 8g
vxassist -g ABCdg make ABC04 8g
vxassist -g ABCdg make ABC05 8g
vxassist -g ABCdg make ABC06 8g
Creating a File System:
We now lay filesystems down on our newly created volumes.We assume here that you've agreed with the Oracle DBA's to use a blocksize of 8192 for our filesystems. Not specifying a block size allow Veritasto dynamically assign one for you based upon the size of the volume. Ourvolumes would default to 1024 for a block size on our 4 GB volumes, and2048 for our 8GB volume. We will specify the largefiles option, becausethe mkfs_vxfs(1m) command uses nolargefilesas a default, unlike mkfs_ufs(1m) on Solaris2.6 or greater, which uses largefiles as adefault. If we forgot to do so, we could use fsadm( fsadm_vxfs(1m) ) to set the largefilesbit on. fsadm can also query a mounted filesystemfor the current setting of this flag. Be certain that whatever flags youset during file system creation or modification are reflect in vfstab,or the resulting file system may be un-mount-able.
mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/ABCdg/ABC01
Mounting a File System:
Creating and mounting filesystems go hand in hand. Youmust be certain that any special flags set at creation time are reflectedin /etc/vfstab, or on the command line if thereis no entry in vfstab for your filesystem.
mount -F vxfs -o largefiles /dev/vx/dsk/ABCdg/ABC01/u03/oradata/ABC
Resizing a mounted volume and file system:
/etc/vx/bin/vxresize -g rootdg -F vxfs archive 16g
Recovering disks under VM control:
(if you want to live dangerously, try looking at dfwset01:/root/progs/hose_vx_dg.pl)
Pre-reqs
- Do a vxprint -g mydg first to see what disks your volumes lie on!
- Do a vxdisk list and save it
- Do an inq -et and save it!
- You may wish to review moving a volume off of a particluar disk
Procedure
1) comment the volume(s) you're destroying out of vfstab
2) umount the volume
3) stop it:
vxvol stop volume01
4) remove it:
vxedit -rf rm volume01
5) remove the disk(s) the volume was on from the disk group ( up to the last disk )
vxdg -g mydg rmdisk dmdiskname01
6) Remove the the disk(s) from VXVM control
vxdisk rm c1t1d51s2
7) If you wish do get rid of the disk group ( in order to recover the last disk ), you must destroy the disk group:
vxdg destroy mydg
8) remove the last disk
vxdisk rm c2t7d9s2
9) If you're removing the disks from the EMC port, be sure to clean up:
drvconfig
disks
vxdctl enable
vxdctl initdmp
10) Freak out and realize you whacked the wrong thing, use /root/eotw to recover.
Renaming a VM Disk:
Since names like 'ABCdg10' are not as descriptive as theycould be, you can rename it to something more useful.
vxedit rename ABCdg10 ABCdg_hot_spare
Using long disk names can be more descriptive, but willmake using vxva trickier, as it will truncate your disk name somewhat ifit is too long.
Moving a Disk Group to Another System:
1) umount the disks:
umount /u01/app/oracle/product/8.0.5_ABC
umount /u01/admin/ABC
umount /u01/oradata/ABC
Veritas Disk Management
umount /u02/oradata/ABC
umount /u03/oradata/ABC
umount /u04/oradata/ABC
2) Stop the volumes:
vxvol -g ABCdg stopall
3) deport the disk group from one system:
vxdg deport ABCdg
4) import them on another system:
vxdg import ABCdg
5) Start all of the volumes on the new system and resyncmirrors in the background:
vxrecover -g ABCdg -sb
6) mount the filesystems
mount /u01/app/oracle/product/8.0.5_ABC
mount /u01/admin/ABC
mount /u01/oradata/ABC
mount /u02/oradata/ABC
mount /u03/oradata/ABC
mount /u04/oradata/ABC
This procedure assumes that the second system can seethe disks, and also that you have commented the file systems out of vfstabon the old system.
Rename a Disk Group
/root
dfwns19 # df -k | grep reports
/dev/vx/dsk/reportsdg/ncr01 /u01/app/oracle/admin/REPORTS
/dev/vx/dsk/reportsdg/ncr02 /u01/app/oracle/product/8.0.5REPORTS
/dev/vx/dsk/reportsdg/ncr03 /u01/oradata/REPORTS
/dev/vx/dsk/reportsdg/ncr04 /u02/oradata/REPORTS
/dev/vx/dsk/reportsdg/ncr05 /u03/oradata/REPORTS
/dev/vx/dsk/reportsdg/ncr06 /u04/oradata/REPORTS
/dev/vx/dsk/reportsdg/ncr07 /u11/oraarch/REPORTS
dfwns19 # umount /u01/app/oracle/admin/REPORTS
dfwns19 # umount /u01/app/oracle/product/8.0.5REPORTS
dfwns19 # umount /u01/oradata/REPORTS
dfwns19 # umount /u02/oradata/REPORTS
dfwns19 # umount /u03/oradata/REPORTS
dfwns19 # umount /u04/oradata/REPORTS
dfwns19 # umount /u11/oraarch/REPORTS
dfwns19 # vxvol -g reportsdg stopall
dfwns19 # vxdg deport reportsdg
dfwns19 # vxdg -n nclproddg import reportsdg
dfwns19 # vxdg list
Mirroring and then breaking mirrors
NAME STATE ID
nclproddg enabled 949356971.2501.dfwns19
Renaming a disk group and volume
bansecdbdg -> secproddg used as an example
Resizing a disk, while specifying the disk
Moving a volume off of a particluar disk
# Move u11 off of dm dev20dg20vxassist -g dev20dg move u11 !dev20dg20
Most Veritas Volume Manager (VxVM) commands (excepting daemons, library commands and supporting scripts) are linked to the /usr/sbin directory from the /opt/VRTS/bin directory. It is recommended that you add the following directories to your PATH environment variable:
If you are using the Bourne or Korn shell (sh or ksh), use the commands:
If you are using a C shell (csh or tcsh), use the commands:
Note: | If you have not installed database software, you can omit /opt/VRTSdbed/bin, /opt/VRTSdb2ed/bin and /opt/VRTSsybed/bin. Similarly, /opt/VRTSvxfs/bin is only required to access some VxFS commands. |
VxVM library commands and supporting scripts are located under the /usr/lib/vxvm directory hierarchy. You can include these directories in your path if you need to use them on a regular basis.
For detailed information about an individual command, refer to the appropriate manual page in the 1M section.
Commands and scripts that are provided to support other commands and scripts, and which are not intended for general use, are not located in /opt/VRTS/bin and do not have manual pages.
Commonly-used commands are summarized in the following tables:
Table: Obtaining information about objects in VxVM lists commands for obtaining information about objects in VxVM.
Table: Administering disks lists commands for administering disks.
Table: Creating and administering disk groups lists commands for creating and administering disk groups.
Table: Creating and administering subdisks lists commands for creating and administering subdisks.
Table: Creating and administering plexes lists commands for creating and administering plexes.
Table: Creating volumes lists commands for creating volumes.
Table: Administering volumes lists commands for administering volumes.
Table: Monitoring and controlling tasks lists commands for monitoring and controlling tasks in VxVM.
Table: Obtaining information about objects in VxVM
Command | Description |
---|---|
vxdctl license [init] | List licensed features of VxVM. The init parameter is required when a license has been added or removed from the host for the new license to take effect. |
vxdisk [-g diskgroup] list [diskname] | Lists disks under control of VxVM. Example: |
vxdg list [diskgroup] | Lists information about disk groups. Example: |
vxdg -s list | Lists information about shared disk groups. Example: |
vxdisk -o alldgs list | Lists all diskgroups on the disks. The imported diskgroups are shown as standard, and additionally all other diskgroups are listed in single quotes. |
Displays information about the accessibility and usability of volumes. See the Veritas Volume Manager Troubleshooting Guide. Example: | |
vxprint -hrt [-g diskgroup] [object ..] | Prints single-line information about objects in VxVM. Example: |
vxprint -st [-g diskgroup] [subdisk ..] | Displays information about subdisks. Example: |
vxprint -pt [-g diskgroup] [plex ..] | Displays information about plexes. Example: |
Table: Administering disks
Command | Description |
---|---|
vxdiskadm | Administers disks in VxVM using a menu-based interface. |
vxdiskadd [devicename ..] | Adds a disk specified by device name. Example: |
Renames a disk under control of VxVM. Example: | |
Sets aside/does not set aside a disk from use in a disk group. Examples: | |
Does not/does allow free space on a disk to be used for hot-relocation. Examples: | |
Adds/removes a disk from the pool of hot-relocation spares. Acr ic102 vcp (com5) driver download for windows 10. Examples: | |
vxdisk offline devicename | Takes a disk offline. Example: # vxdisk offline hdisk1 |
vxdg -g diskgroup rmdisk diskname | Removes a disk from its disk group. Example: # vxdg -g mydg rmdisk mydg02 |
vxdiskunsetup devicename | Removes a disk from control of VxVM. Example: # vxdiskunsetup hdisk3 |
Table: Creating and administering disk groups
Command | Description |
---|---|
Creates a disk group using a pre-initialized disk. Example: | |
Reports conflicting configuration information. Example: | |
vxdg [-n newname] deport diskgroup | Deports a disk group and optionally renames it. Example: |
vxdg [-n newname] import diskgroup | Imports a disk group and optionally renames it. Example: |
vxdg [-n newname] -s import diskgroup | Imports a disk group as shared by a cluster, and optionally renames it. Example: |
Lists the objects potentially affected by moving a disk group. Example: | |
Moves objects between disk groups. Example: | |
Splits a disk group and moves the specified objects into the target disk group. Example: | |
vxdg join sourcedg targetdg | Joins two disk groups. Example: |
Sets the activation mode of a shared disk group in a cluster. Example: | |
vxrecover -g diskgroup -sb | Starts all volumes in an imported disk group. Example: |
vxdg destroy diskgroup | Destroys a disk group and releases its disks. Example: |
Table: Creating and administering subdisks
Command | Description | |
---|---|---|
Creates a subdisk. See Creating subdisks. Example: | ||
Associates subdisks with an existing plex. Example: | ||
Adds subdisks to the ends of the columns in a striped or RAID-5 volume. Example: | ||
Replaces a subdisk. Example: | ||
Splits a subdisk in two. Example: | ||
Joins two or more subdisks. Example: | ||
Relocates subdisks in a volume between disks. Example:
| ||
vxunreloc [-g diskgroup] original_disk | Relocates subdisks to their original disks. Example: | |
vxsd [-g diskgroup] dis subdisk | Dissociates a subdisk from a plex. Example: | |
vxedit [-g diskgroup] rm subdisk | Removes a subdisk. Example: | |
vxsd [-g diskgroup] -o rm dis subdisk | Dissociates and removes a subdisk from a plex. Example: |
Table: Creating and administering plexes
Command | Description |
---|---|
Creates a concatenated plex. Example: | |
Creates a striped or RAID-5 plex. Example: | |
vxplex [-g diskgroup] att volumeplex | Attaches a plex to an existing volume. Example: |
vxplex [-g diskgroup] det plex | Detaches a plex. Example: |
vxmend [-g diskgroup] off plex | Takes a plex offline for maintenance. Example: |
vxmend [-g diskgroup] on plex | Re-enables a plex for use. Example: |
Replaces a plex. Example: | |
Copies a volume onto a plex. Example: | |
vxmend [-g diskgroup] fix clean plex | Sets the state of a plex in an unstartable volume to CLEAN. Example: |
vxplex [-g diskgroup] -o rm dis plex | Dissociates and removes a plex from a volume. Example: |
Table: Creating volumes
Command | Description |
---|---|
Displays the maximum size of volume that can be created. Example: | |
Creates a volume. Example: | |
Creates a mirrored volume. Example: | |
Creates a volume that may be opened exclusively by a single node in a cluster. Example: | |
Creates a striped or RAID-5 volume. Example: | |
Creates a volume with mirrored data plexes on separate controllers. Example: | |
Creates a volume from existing plexes. Example: | |
Initializes and starts a volume for use. Example: | |
Initializes and zeros out a volume for use. Example: |
Table: Administering volumes
Veritas Commands Cheat Sheet
Command | Description | |
---|---|---|
Adds a mirror to a volume. Example: | ||
Silicon vendor driver. Removes a mirror from a volume. Example:
| ||
Grows a volume to a specified size or by a specified amount. Example: | ||
Shrinks a volume to a specified size or by a specified amount. Example: | ||
Resizes a volume and the underlying Veritas File System. Example: | ||
Prepares a volume for instant snapshots and for DRL logging. Example: | ||
Takes a full-sized instant snapshot of a volume by breaking off plexes of the original volume. Example: | ||
Takes a full-sized instant snapshot of a volume using a prepared empty volume. See Creating a volume for use as a full-sized instant or linked break-off snapshot. Example: | ||
Creates a cache object for use by space-optimized instant snapshots. A cache volume must have already been created. After creating the cache object, enable the cache object with the vxcache start command. For example: | ||
Takes a space-optimized instant snapshot of a volume. Example: | ||
Refreshes a snapshot from its original volume. Example: | ||
Turns a snapshot into an independent volume. Example: | ||
Removes support for instant snapshots and DRL logging from a volume. Example: | ||
Performs online relayout of a volume. Example: | ||
Relays out a volume as a RAID-5 volume with stripe width W and N columns. Example: | ||
Reverses the direction of a paused volume relayout. Example: | ||
Converts between a layered volume and a non-layered volume layout. Example: | ||
Removes a volume. Example: |
Veritas Volume Manager Cheat Sheet
Table: Monitoring and controlling tasks
Veritas Volume Manager
Command | Description |
---|---|
Specifies a task tag to a VxVM command. Example: | |
Lists tasks running on a system. Example: | |
Monitors the progress of a task. Example: | |
Suspends operation of a task. Example: | |
Lists all paused tasks. Example: | |
Resumes a paused task. Example: | |
Cancels a task and attempts to reverse its effects. Example: |