7.2 VxVM Striping (RAID 0)

     

VxVM supports RAID levels 0, 1, 0/1, and 5. In fact, we can set up quite complex configurations depending on how sophisticated you want to be. Let's start with something simple by creating a RAID 0 (striped) volume across three of my disks. I want the stripe size to be 16KB to match the application that will use this volume:

 

 root@hpeos003[]  vxassist -g ora1 make dbvol 10G layout=stripe ncol=3 stripeunit=16k graphics/ccc.gif ora_disk1 ora_disk3 ora_disk2  root@hpeos003[]  vxprint -g ora1 -tvps  V  NAME         RVG       KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE 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 sd ora_disk1-01 dbvol-01  ora_disk1 0       3495264  0/0       c0t4d0   ENA sd ora_disk2-01 dbvol-01  ora_disk2 0       3495264  1/0       c0t5d0   ENA sd ora_disk3-01 dbvol-01  ora_disk3 0       3495264  2/0       c4t12d0  ENA pl dbvol-01     dbvol     ENABLED  ACTIVE   10485792 STRIPE    3/16     RW v  dbvol        -         ENABLED  ACTIVE   10485760 SELECT    dbvol-01 fsgen root@hpeos003[] root@hpeos003[] 

One great aspect of vxassist is that it does an awful lot of work for us. Without it, we would have to make the subdisks ourselves , associate the subdisks with a plex, and then associate the plex with a volume. In our example, these were the first subdisks created and are therefore sector-aligned. This is good for performance because it avoids any delays in positioning the disk read-write heads when accessing data. If we wanted to position a subdisk precisely to ensure sector-alignment or to position subdisks in a particular area of the disk, i.e., to maximize performance, we would have to go beyond what vxassist can do. In this example, I want to create a striped volume over three disks. The disks will host other volumes that will, we hope, not be accessed excessively (to avoid seek-time problems). I am going to position the stripes in the center of the disk. This is not necessarily the best for performance (being at the start of the disk where the surface is spinning fastest would be better), but it does mean that my average seek times will not be too bad when the disk is being accessed by other volumes. Here is the disk group at present:

 

 root@hpeos003[]  vxprint -g ora1 -tvpsr dbv  ol RV NAME         RLINK_CNT KSTATE   STATE    PRIMARY  DATAVOLS  SRL RL NAME         RVG       KSTATE   STATE    REM_HOST REM_DG    REM_RLNK V  NAME         RVG       KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE 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 DC NAME         PARENTVOL LOGVOL SP NAME         SNAPVOL   DCO dm ora_disk1    c0t4d0    simple   1024     71682048 - dm ora_disk2    c0t5d0    simple   1024     71682048 - dm ora_disk3    c4t12d0   simple   1024     71682048 - v  dbvol        -         ENABLED  ACTIVE   10485760 SELECT    dbvol-01 fsgen pl dbvol-01     dbvol     ENABLED  ACTIVE   10485792 STRIPE    3/16     RW sd ora_disk1-01 dbvol-01  ora_disk1 0       3495264  0/0       c0t4d0   ENA sd ora_disk2-01 dbvol-01  ora_disk2 0       3495264  1/0       c0t5d0   ENA sd ora_disk3-01 dbvol-01  ora_disk3 0       3495264  2/0       c4t12d0  ENA root@hpeos003[] 

I will create a 10GB subdisk on each physical disk. Being 10GB and wanting to be situated in the center of the disk means that the first block should be placed at offset = (71860248 “ 10485760)/2 = 30687244KB. My previous volume started on ora_disk01 . I will start this volume on a different disk to ensure that IO is spread over all disks. Here are the commands to create the subdisks and subsequent volume:

 

 root@hpeos003[]  vxmake -g ora1 sd oralog01 ora_disk2,30687244,10485760  root@hpeos003[]  vxmake -g ora1 sd oralog02 ora_disk3,30687244,10485760  root@hpeos003[]  vxmake -g ora1 sd oralog03 ora_disk1,30687244,10485760  root@hpeos003[] root@hpeos003[]  vxmake -g ora1 plex logvol-01 layout=stripe ncolumn=3 stwidth=64k graphics/ccc.gif sd=oralog01:0/0, oralog02:1/0,oralog03:2/0  root@hpeos003[]  vxmake -g ora1 -U fsgen vol logvol prefer=select prefname=logvol-01 graphics/ccc.gif plex=logvol-01  root@hpeos003[]  vxvol -g ora1 start logvol  root@hpeos003[]  vxprint -g ora1 -tvpsr logvol  RV NAME        RLINK_CNT KSTATE   STATE    PRIMARY  DATAVOLS  SRL RL NAME        RVG       KSTATE   STATE    REM_HOST REM_DG    REM_RLNK V  NAME        RVG       KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE 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 DC NAME        PARENTVOL LOGVOL SP NAME        SNAPVOL   DCO dm ora_disk1   c0t4d0    simple   1024     71682048 - dm ora_disk2   c0t5d0    simple   1024     71682048 - dm ora_disk3   c4t12d0   simple   1024     71682048 - v  logvol      -         ENABLED  ACTIVE   31457280 SELECT    logvol-01 fsgen pl logvol-01   logvol    ENABLED  ACTIVE   31457280 STRIPE    3/64     RW sd oralog01    logvol-01 ora_disk2 30687244 10485760 0/0      c0t5d0   ENA sd oralog02    logvol-01 ora_disk3 30687244 10485760 1/0      c4t12d0  ENA sd oralog03    logvol-01 ora_disk1 30687244 10485760 2/0      c0t4d0   ENA root@hpeos003[] 

We can start to get a feel for how powerful VxVM is and how flexible the configuration can be. This does pose its own challenges in that we could spend this entire book exploring every permutation of options and commands. Inevitably, that isn't going to happen. We look at some of the more common configuration options. Next, we look at mirroring (RAID level 1).



HP-UX CSE(c) Official Study Guide and Desk Reference
HP-UX CSE(c) Official Study Guide and Desk Reference
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 434

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net