Forum Discussion

YaseenMubarak's avatar
14 years ago

How to find the RAID level implemented on the vxvm disk

In VxVM, if you are given a disk and asked to find out whether the RAID
created on that disk is RAID 0,1,5 or 0+1 or 1+0, then how would you find
it? Which command is used and which field in that command output shows that?


 

  • Use vxprint -th, but to find RAID levels is not straight forward

    The first lines to look for are the lines that start "v" - this is for volume and this is object that is you mount as a filesystem - underneath this will be plex records (starting with a "p") and subdisk records (starting with "s").   For any plex records that have "LOGONLY" (as 6th field), you should ignore (their size, the 5th column will be very small), and the number of plexes denotes the number of mirrors, so if there is only 1 (NON LOGOGLY) plex then this is a non-mirrored volume.  Next you look at the plex record and the 7th field gives its layout, so CONCAT, means it is not striped (has no RAID) and "STRIPE" means it is striped (and the 8th field gives stripe width and number of columns) so the volume is RAID 0.

    If there is more than one (NON LOGONLY) plex, then the volume is mirrored, so for example if there are 3 plex records, then the volume is mirrored 3 ways.  Each plex can theoretically have its own layout, but normally they are the same, so if there are all "CONCAT", then the volumes is RAID 1, and if they are all  STRIPE, then it is RAID 0+1.

    If the volume has records starting "sv" underneath it, then this means it has subvolumes.  Each subvolmes will have plex records under it and if these have layout "STRIPE", then this mean the volume  is RAID 1+0.

    Any volume which is preceded by a record starting "dc" is a "DCO" log volume so you should ignore these.

    So for example the following volumes is called "test" (you would mount as /dev/vx/dsk/diskgroup/test), it has one data plex and 2 LOGONLY plex so it is not mirrored and the plex has layout CONCAT, so the volume has no RAID at all.  It has a DCO log attached denoted by the "dc" record called "test_dcl" which you would ignore as you cannot mount this volume:

    v  test      -         ENABLED  ACTIVE   4194304  SELECT    -    fsgen
    pl test-01   test      ENABLED  ACTIVE   4194304  CONCAT    -    RW
    sd d04-04 test-01 d04 12582912 4194304 0     c2t5d4 ENA
    pl test-02   test      ENABLED  ACTIVE   LOGONLY  CONCAT    -    RW
    sd d08-42 test-02 d08 172039232 96 LOG      c2t5d8 ENA
    pl test-03   test      ENABLED  ACTIVE   LOGONLY  CONCAT    -    RW
    sd d00-45 test-03 d00 398535488 96 LOG      c2t5d0 ENA
    dc test_dco  test      test_dcl
    v  test_dcl  -         ENABLED  ACTIVE   560      SELECT    -    gen
    pl test_dcl-01 test_dcl ENABLED ACTIVE   560      CONCAT    -    RW
    sd d08-47 test_dcl-01 d08 172060064 560 0   c2t5d8 ENA 

     

    Mike

  • Use vxprint -th, but to find RAID levels is not straight forward

    The first lines to look for are the lines that start "v" - this is for volume and this is object that is you mount as a filesystem - underneath this will be plex records (starting with a "p") and subdisk records (starting with "s").   For any plex records that have "LOGONLY" (as 6th field), you should ignore (their size, the 5th column will be very small), and the number of plexes denotes the number of mirrors, so if there is only 1 (NON LOGOGLY) plex then this is a non-mirrored volume.  Next you look at the plex record and the 7th field gives its layout, so CONCAT, means it is not striped (has no RAID) and "STRIPE" means it is striped (and the 8th field gives stripe width and number of columns) so the volume is RAID 0.

    If there is more than one (NON LOGONLY) plex, then the volume is mirrored, so for example if there are 3 plex records, then the volume is mirrored 3 ways.  Each plex can theoretically have its own layout, but normally they are the same, so if there are all "CONCAT", then the volumes is RAID 1, and if they are all  STRIPE, then it is RAID 0+1.

    If the volume has records starting "sv" underneath it, then this means it has subvolumes.  Each subvolmes will have plex records under it and if these have layout "STRIPE", then this mean the volume  is RAID 1+0.

    Any volume which is preceded by a record starting "dc" is a "DCO" log volume so you should ignore these.

    So for example the following volumes is called "test" (you would mount as /dev/vx/dsk/diskgroup/test), it has one data plex and 2 LOGONLY plex so it is not mirrored and the plex has layout CONCAT, so the volume has no RAID at all.  It has a DCO log attached denoted by the "dc" record called "test_dcl" which you would ignore as you cannot mount this volume:

    v  test      -         ENABLED  ACTIVE   4194304  SELECT    -    fsgen
    pl test-01   test      ENABLED  ACTIVE   4194304  CONCAT    -    RW
    sd d04-04 test-01 d04 12582912 4194304 0     c2t5d4 ENA
    pl test-02   test      ENABLED  ACTIVE   LOGONLY  CONCAT    -    RW
    sd d08-42 test-02 d08 172039232 96 LOG      c2t5d8 ENA
    pl test-03   test      ENABLED  ACTIVE   LOGONLY  CONCAT    -    RW
    sd d00-45 test-03 d00 398535488 96 LOG      c2t5d0 ENA
    dc test_dco  test      test_dcl
    v  test_dcl  -         ENABLED  ACTIVE   560      SELECT    -    gen
    pl test_dcl-01 test_dcl ENABLED ACTIVE   560      CONCAT    -    RW
    sd d08-47 test_dcl-01 d08 172060064 560 0   c2t5d8 ENA 

     

    Mike

  • (moved post from Volume Replicator forum to Storage Foundation forum as this is more appropriate category/forum)

  • vxprint -htr will point out difference bewteen raid 0+1 and 1+0