5. Volume Lesson 2: Striped Volumes

VxAssist will, by default, create concatinated (simple) volumes. If we had descided to create a 40G volumes in the first lession it would have simply created a 40G concat using up as many disks as it needed. But simple volumes really don't give us the speed and power that we really want from a volume, so in this lesson we'll get just alittle more specific with vxassist and great a large (40G) striped volume. Let's look at the syntax:

vxassist -g <diskgroup> -U <usagetype> make <volname> <size> \
	layout=<layouttype> stwidth=<width> ncolumn=<#> <disk1> \
	<disk2> <disk3> ....

Alright, we discused the first several options, and the others you'll recall from the VxMake course when you made striped plexes. "layout" specifies the layout type for the volume we're building (concat, stripe, mirror, RAID5, etc). The options "stwidth" and "ncolumn" are stripe specific options defining the width of the stripe unit for each column. The remaining options specify the vmdisks we want vxassist to use in building this volumes.

It should be noted that we can use as many or as few of these options as we like. For instance, we can make the layout "stripe" but not specify the stripe width or number of columns. We can specify the stripe width and stripe layout, but not the number of columns or disks to use. You should exersies some common sense when omiting options, thinking of what vxassist is going to need to be told to make it's choice, but without being told it will do the best it can to meet your request. In the following examples we'll build a striped volume using only the "layout" option, and letting vxassist figure the rest out.

# vxassist -g cuddledg -U fsgen make stripevol 40g layout=stripe
# vxprint -g cuddledg -hrt
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
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE

 (..... removed ..........)

v  stripevol    fsgen        ENABLED  ACTIVE   83886080 SELECT    stripevol-01
pl stripevol-01 stripevol    ENABLED  ACTIVE   83907654 STRIPE    7/128    RW
sd cuddle-f0-01 stripevol-01 cuddle-f0 0       11986758 0/0       c1t0d0   ENA
sd cuddle-f1-01 stripevol-01 cuddle-f1 0       11986758 1/0       c1t1d0   ENA
sd cuddle-f2-01 stripevol-01 cuddle-f2 0       11986758 2/0       c1t2d0   ENA
sd cuddle-f3-01 stripevol-01 cuddle-f3 0       11986758 3/0       c1t3d0   ENA
sd cuddle-f4-01 stripevol-01 cuddle-f4 0       11986758 4/0       c1t4d0   ENA
sd cuddle-f5-01 stripevol-01 cuddle-f5 0       11986758 5/0       c1t5d0   ENA
sd cuddle-f6-01 stripevol-01 cuddle-f6 0       11986758 6/0       c1t6d0   ENA

VxAssist descided that to create our volume it would use 7 disks, use a 64k stripe width (128 sectors). Because it doesn't need the full size of each vmdisk it created 7 subdisks that are 11986758 sectors in length (5.9G). There this really comes to be diffrent than if we had used vxmake to create our own striped volumes is that more than likely we'd have used 5 disks and used the full length of each disk, creating a volume about 45G in size, but vxassist instead gets as close to the desired volume size as possible. This, in and of itself, has advantages.

Let's build another volume, but this time specify the stripe width, the number of columns and the vmdisks to use.

# vxassist -U fsgen -g cuddledg make stripevol2 40g layout=stripe stwidth=128k \ 
ncolumn=5 cuddle-f0 cuddle-f1 cuddle-f2 cuddle-f3 cuddle-f4
# vxprint -g cuddledg -hrt
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
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE

 (..... removed ......)

v  stripevol2   fsgen        ENABLED  ACTIVE   83886080 SELECT    stripevol2-01
pl stripevol2-01 stripevol2  ENABLED  ACTIVE   83903943 STRIPE    5/256    RW
sd cuddle-f0-01 stripevol2-01 cuddle-f0 0      16780743 0/0       c1t0d0   ENA
sd cuddle-f1-01 stripevol2-01 cuddle-f1 0      16780743 1/0       c1t1d0   ENA
sd cuddle-f2-01 stripevol2-01 cuddle-f2 0      16780743 2/0       c1t2d0   ENA
sd cuddle-f3-01 stripevol2-01 cuddle-f3 0      16780743 3/0       c1t3d0   ENA
sd cuddle-f4-01 stripevol2-01 cuddle-f4 0      16780743 4/0       c1t4d0   ENA
#

In this example you can see that I told vxassist exactly what I wanted, and that's exactly what I got. I hope that these two examples help you see just how vxassist can intelligently "fill in the gaps", but may not do what we assume. If you assumed that vxassist would build a 5 disk stripe for our 40g volumes you might have been supprised when you got a 7 disks stripe. This helps illustrate that if you descide to be indiffrent about a layout descision you should be sure about it, otherwise you'll be disappointed in what you get.

Because in this course concepts are much easier to grasp we'll go even further than we could in the VxMake course. Let's next jump into building mirrored volumes and RAID0+1 volumes using vxassist.