DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
[Next] [Previous] [Top] [Contents] [Index]

VxVM User's Guide

CLI Introduction

Chapter 9


Introduction

This chapter provides some preliminary information that you should know before attempting to use the Volume Manager Command Line Interface (CLI).

Refer to the chapters that follow for information on using Volume Manager commands to perform common tasks. The vxintro(1M) manual page also contains introductory information relating to Volume Manager utilities.

Topics covered in this chapter include:

Disk Naming

When performing disk administration, it is important that you recognize the difference between a device name and a disk name.

The device name (sometimes referred to as devname or disk access name) is the location of the disk. The syntax of a device name is c#b#t#d#s#, where:

The full pathname of a device is /dev/dsk/devicename. In this document, only the device name is listed and /dev/dsk is assumed. An example of a device name is c0b0t0d0s7.

The disk name (sometimes referred to as disk media name) is an administrative name for the disk, such as disk01. If you do not assign a disk name, the disk name defaults to disk## if the disk is being added to rootdg (where ## is a sequence number). Otherwise, the default disk name is groupname##, where groupname is the name of the disk group to which the disk is added.

Displaying Configuration Information

Displaying Disk Listings

To see a list of available disks, use the following command:

	vmdisk list
This command provides a list of all disks available to the Volume Manager. The output of vxdisk list lists the device name, the type of disk, the disk name, the disk group to which the disk belongs, and the disk's status. The following is an example of vxdisk list output:


	DEVICE       TYPE     DISK      GROUP     STATUS
	c0b0t0d0s7   sliced   rootdisk  rootdg    online
	c0b0t1d0s7   sliced   disk02    rootdg    online
	c0b0t2d0s7   sliced   disk03    rootdg    online

Displaying VxVM Object Listings

The vxprint command displays detailed information on existing Volume Manager objects. Display detailed output for all currently-existing objects as follows:

	vxprint -ht 
This displays output such as the following:


Disk group: rootdg

DG NAME        NCONFIG     NLOG     MINORS   GROUP-ID
DM NAME        DEVICE      TYPE     PRIVLEN  PUBLEN   STATE
V  NAME        USETYPE     KSTATE   STATE    LENGTH   READPOL   PREFPLEX
PL NAME        VOLUME      KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME        PLEX        DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE

dg rootdg      default     default  0        774226267.1025.tweety

dm disk01      c0b0t5d0s7  sliced   1055     1054944  -
dm disk02      c0b0t1d0s7  sliced   1119     1043840  -

v  vol03       fsgen       DISABLED ACTIVE   1310720  SELECT   -
pl vol03-01    vol03       DISABLED ACTIVE   1311632  STRIPE    2/128    RW
sd disk01-01   vol03-01    disk01   0        655380   0/0       c0b0t0d0 ENA
sd disk02-08   vol03-01    disk02   0        655760   1/0       c0b0t1d0 ENA

v  vm-build    fsgen       DISABLED ACTIVE   409600   SELECT    -
pl vm-build-01 vm-build    DISABLED ACTIVE   410016   STRIPE    2/128    RW
sd disk01-02   vm-build-01 disk01   655380   204831   0/0       c0b0t0d0 ENA
sd disk02-01   vm-build-01 disk02   655760   204960   1/0       c0b0t1d0 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 of output line that follows. Each volume is listed along with its associated plex(es) and subdisk(s).

Displaying Free Space in a Disk Group

Before you add volumes and file systems to your system, you may want to make sure you have enough free disk space to adequately meet your needs. The Volume Manager lets you request a display of free space.

To display free space for a disk group, enter:

	vxdg -g diskgroup free
where -g diskgroup optionally specifies a disk group.

To see the free space in the default disk group, rootdg, enter:

	vxdg free 
The Volume Manager returns the following:


	GROUP   DISK    DEVICe      TAG       OFFSET   LENGTH   FLAGS

	rootdg  disk04  c0b0t0d0s7  c0b0t0d0  726400   102672   -

	rootdg  disk01  c1b0t0d0s7  c1b0t0d0  0        102128   -

	rootdg  disk01  c1b0t0d0s7  c1b0t0d0  175856   26384    - 

	rootdg  disk02  c1b0t1d0s7  c1b0t1d0  26624    175616   - 

The free space is measured in 512-byte sectors.

Creating Volumes

Volumes need to be created in order to take advantage of the Volume Manager concept of virtual disks. Once a volume exists, a file system can be placed on the volume to organize the disk space with files and directories. Alternatively, applications like databases might be used to organize data on volumes.

You can create volumes using either a basic or advanced approach:

The creation of a volume involves the creation of plex and subdisk components. With the basic approach to volume creation, the underlying plexes and subdisks are handled automatically. You simply indicate the desired volume characteristics.

Volumes can be created with various layout types:

General Use of the vxassist Utility

The vxassist utility provides a simple way to create and manage volumes from the command line. You can use vxassist to create, mirror, grow, shrink, and back up volumes. vxassist is capable of performing many operations that would otherwise require the use of a series of more complicated VxVM commands. vxassist creates and manipulates volumes based on a set of established defaults, but also allows the user to supply preferences for each operation.

The vxassist command typically takes the following form:

	vxassist keyword volume_name [attributes...]
Select the specific action to perform by specifying an operation keyword as the first argument on the command line. For example, the keyword for creating a new volume is make. You can therefore create a new volume by entering:

	vxassist make volume_name length
The first argument after any vxassist keyword is always a volume name. Follow the volume name with a set of attributes. Use these attributes to specify where to allocate space and whether you want mirroring or striping to be used.

You can select the disks on which the volumes are to be created by specifying the disk names at the end of the command line. For example, to create a 30 megabyte striped volume on three specific disks (disk03, disk04, and disk05), enter:

	vxassist make stripevol 30m layout=stripe disk03 disk04\
 	disk05
vxassist defaults are listed in the file /etc/defaults/vxassist. The defaults listed in this file take effect if there is no overriding default specified on the vxassist command line.

Refer to the VERITAS Volume Manager System Administrator's Guide or the vxassist(1M) manual page for more information on operations, options, and attributes of the vxassist utility.


[Next] [Previous] [Top] [Contents] [Index]