Monday, 6 January 2014

VERITAS VOLUMEMANAGER RAID-0 CONCATINATION VOLUME OPERATIONS

RAID - 0
Concatination:-
to create disk group:-
-bash-4.1# vxdg init test d0=c2d18
-bash-4.1# vxdg -g test adddisk d1=c2d17
-bash-4.1# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c2d0s2       auto:ZFS        -            -            ZFS
c2d1s2       auto:ZFS        -            -            ZFS
c2d8s2       auto:none       -            -            online invalid
c2d9s2       auto:none       -            -            online invalid
c2d10s2      auto:none       -            -            online invalid
c2d11s2      auto:none       -            -            online invalid
c2d15s2      auto:cdsdisk    -            -            online
c2d16s2      auto:cdsdisk    -            -            online
c2d17s2      auto:cdsdisk    d1           test         online
c2d18s2      auto:cdsdisk    d0           test         online
to crate subdisk:-
-bash-4.1# vxmake -g test sd sd1 d0,0,100m
-bash-4.1# vxprint -svt
Disk group: test
V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
sd sd1          -            d0       0        204800   -         c2d18    ENA
-bash-4.1# vxmake -g test sd sd2 d0,204800,100m
-bash-4.1# vxprint -svt
Disk group: test
V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
sd sd1          -            d0       0        204800   -         c2d18    ENA
sd sd2          -            d0       204800   204800   -         c2d18    ENA
to create plex
-bash-4.1# vxmake -g test plex plex1 sd=sd1,sd2
-bash-4.1# vxprint -svt
Disk group: test
V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
sd sd2          plex1        d0       204800   204800   204800    c2d18    ENA
-bash-4.1# vxprint -pvt
Disk group: test
V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
pl plex1        -            DISABLED -        409600   CONCAT    -        RW
to create volume
-bash-4.1# vxmake -g test vol vol1 plex=plex1
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            DISABLED EMPTY    409600   ROUND     -        gen
pl plex1        vol1         DISABLED EMPTY    409600   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
sd sd2          plex1        d0       204800   204800   204800    c2d18    ENA
to start volume
-bash-4.1# vxvol -g test start vol1
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   409600   ROUND     -        gen
pl plex1        vol1         ENABLED  ACTIVE   409600   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
sd sd2          plex1        d0       204800   204800   204800    c2d18    ENA
to craete filesystem & mountsame

-bash-4.1# mkfs -F vxfs /dev/vx/rdsk/test/vol1
    version 10 layout
    409600 sectors, 204800 blocks of size 1024, log size 1024 blocks
    rcq size 1024 blocks
    largefiles supported
    maxlink supported

-bash-4.1# mount -F vxfs /dev/vx/dsk/test/vol1  /mnt
-bash-4.1# df -h /mnt
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       200M   3.1M       185M     2%    /mnt

grow to:
-bash-4.1# vxassist -g test growto vol1 300M
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   614400   ROUND     -        gen
pl plex1        vol1         ENABLED  ACTIVE   614400   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
sd sd2          plex1        d0       204800   409600   204800    c2d18    ENA
-bash-4.1# df -kh /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       200M   3.1M       185M     2%    /test
grow volumes file system :-

-bash-4.1# /usr/lib/fs/vxfs/fsadm -F vxfs -b 300M /test
UX:vxfs fsadm: INFO: V-3-25942: /dev/vx/rdsk/test/vol1 size increased from 409600 sectors to 614400 sectors
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       300M   3.2M       278M     2%    /test

GROW BY:-
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   819200   ROUND     -        gen
pl plex1        vol1         ENABLED  ACTIVE   819200   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
sd sd2          plex1        d0       204800   614400   204800    c2d18    ENA
-bash-4.1# vxassist -g test growby vol1 100m
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   1024000  ROUND     -        gen
pl plex1        vol1         ENABLED  ACTIVE   1024000  CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
sd sd2          plex1        d0       204800   819200   204800    c2d18    ENA
-bash-4.1# /usr/lib/fs/vxfs/fsadm -b 400m /test
UX:vxfs fsadm: INFO: V-3-25942: /dev/vx/rdsk/test/vol1 size increased from 614400 sectors to 819200 sectors
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1 400M   3.2M       372M     1%    /test

SHRINK BY:-
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       400M   3.2M       372M     1%    /test
-bash-4.1# vxassist -g test shrinkby vol1 50m
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   921600   ROUND     -        gen
pl plex1        vol1         ENABLED  ACTIVE   921600   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
sd sd2          plex1        d0       204800   716800   204800    c2d18    ENA
-bash-4.1#  /usr/lib/fs/vxfs/fsadm -b 350m /test
UX:vxfs fsadm: INFO: V-3-23586: /dev/vx/rdsk/test/vol1 is currently 819200 sectors - size will be reduced
-bash-4.1# df -kh /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       350M   3.2M       325M     1%    /test
SHRINK TO:-
-bash-4.1# vxassist -g test shrinkto vol1 100m
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   204800   ROUND     -        gen
pl plex1        vol1         ENABLED  ACTIVE   204800   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
-bash-4.1# /usr/lib/fs/vxfs/fsadm -b 100m /test
UX:vxfs fsadm: INFO: V-3-23586: /dev/vx/rdsk/test/vol1 is currently 716800 sectors - size will be reduced
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       100M   3.1M        91M     4%    /test

NOTE:-
-bash-4.1# vxresize -g test vol1 +100
VxVM vxresize ERROR V-5-1-13363  resizing volume other than FSGEN or RAID5 can result in loss of data. Use -f option to force resize this volume.
-bash-4.1# vxresize -g test -f vol1 +100m
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       200M   3.1M       185M     2%    /test

if VOLUME HAS FSGEN TAG
-bash-4.1# vxmake -g test sd sd1 d0,0,100m
-bash-4.1# vxmake -g test plex plex1 sd=sd1
-bash-4.1# vxmake -g test -U fsgen vol vol1 plex=plex1
-bash-4.1# vxpirnt -hvt
-bash: vxpirnt: command not found
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            DISABLED EMPTY    204800   ROUND     -        fsgen
pl plex1        vol1         DISABLED EMPTY    204800   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
-bash-4.1# vxvol -g test start vol1
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   204800   ROUND     -        fsgen
pl plex1        vol1         ENABLED  ACTIVE   204800   CONCAT    -        RW
sd sd1          plex1        d0       0        204800   0         c2d18    ENA
-bash-4.1# mkfs -F vxfs /dev/vx/rdsk/test/vol1
    version 10 layout
    204800 sectors, 102400 blocks of size 1024, log size 1024 blocks
    rcq size 1024 blocks
    largefiles supported
    maxlink supported
-bash-4.1# mount -F vxfs /dev/vx/dsk/test/vol1 /test
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       100M   3.1M        91M     4%    /test

-bash-4.1# vxresize -g test  vol1 +200m
NOTE:now no error frealy it resizes
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       300M   3.2M       278M     2%    /test


to remove:-
==>un mount file system
-bash-4.1# vxedit -g test -rf rm vol1
-bash-4.1# vxprint -hvt

to create volume throug vxassist command
-bash-4.1# vxassist -g test make vol1 100m
-bash-4.1# vxprint -hvt
Disk group: test
V  NAME         RVG/VSET/CO  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
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE
v  vol1         -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
pl vol1-01      vol1         ENABLED  ACTIVE   204800   CONCAT    -        RW
sd d1-01        vol1-01      d1       0        204800   0         c2d17    ENA
-bash-4.1# mkfs -F vxfs /dev/vx/rdsk/test/vol1
    version 10 layout
    204800 sectors, 102400 blocks of size 1024, log size 1024 blocks
    rcq size 1024 blocks
    largefiles supported
    maxlink supported
-bash-4.1# mount -F vxfs /dev/vx/dsk/test/vol1 /test
-bash-4.1# df -h /test
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/vx/dsk/test/vol1
                       100M   3.1M        91M     4%    /test
to remove:-
-bash-4.1# umount /test
-bash-4.1# vxassist -g test remove volume vol1

1 comment:

  1. Thanks for sharing this important information. You may also refer http://www.s4techno.com/blog/2016/06/17/extend-vxvm-filesystem/

    ReplyDelete