Total Pageviews

Friday, 4 July 2014

DG Creation in VXVM !!!

In this month, let us discuss about Veritas Volume Manager.
So let me start with Disk group creation in brief with steps.

While bringing disks (luns from storage) under Veritas Control we will face a common error message :
VxVM vxedvtoc ERROR V-5-1-11177 error writing EFI partitions
VxVM vxedvtoc ERROR V-5-1-11170  Unknown problem reading EFI VTOC

This is because VTOC of a particular lun is not yet labeled. So first of all label VTOC of all the luns before bringing them under veritas control....

In my following server I have installed VRTSvxvm 6.0 version and also added 6 luns from EMC storage.

STEPS:

1. Bringing disks under Veritas control.
2. Initializing disk group.
3. Adding disks to disk group.
4. Creation of volumes.
5. Making filesystems.
6. Mounting the filesystems.

root@mydev1 #
root@mydev1 # pkginfo -l VRTSvxvm
   PKGINST:  VRTSvxvm
      NAME:  Binaries for VERITAS Volume Manager by Symantec
  CATEGORY:  system
      ARCH:  sparc
   VERSION:  6.0.000.000,REV=11.21.2011.15.23
   BASEDIR:  /
    VENDOR:  Symantec Corporation
      DESC:  Virtual Disk Subsystem
    PSTAMP:  6.0.000.000-GA-2011-11-21
  INSTDATE:  Feb 22 2012 16:49
   HOTLINE:  http://www.symantec.com/business/support/assistance_care.jsp
    STATUS:  completely installed
     FILES:      842 installed pathnames
                  41 shared pathnames
                 119 directories
                 346 executables
              393444 blocks used (approx)
root@mydev1 #
root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:SVM        -            -            SVM
disk_1       auto:SVM        -            -            SVM
emcpower0    auto:sliced     -            -            online invalid
emcpower1    auto:sliced     -            -            online invalid
emcpower2    auto:sliced     -            -            online invalid
emcpower3    auto:sliced     -            -            online invalid
emcpower4    auto:sliced     -            -            online invalid
emcpower5    auto:sliced     -            -            online invalid
root@mydev1 #
root@mydev1 #

Let us bring these luns under veritas volume manager....

root@mydev1 #
root@mydev1 # vxdisksetup -i emcpower0 format=sliced
VxVM vxedvtoc ERROR V-5-1-11177 error writing EFI partitions
VxVM vxedvtoc ERROR V-5-1-11170  Unknown problem reading EFI VTOC
root@mydev1 #

As I told earlier, using format command label the lun....

root@mydev1 #
root@mydev1 # format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01812a2b1,0
       1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e018127f41,0
       2. c4t5006048452A85013d0 <EMC-SYMMETRIX-5772 cyl 1 alt 2 hd 15 sec 128>
          /pci@8,700000/QLGC,qla@3/fp@0,0/ssd@w5006048452a85013,0
       3. c4t5006048452A85013d117 <EMC-SYMMETRIX-5773-68.08GB>

          /pci@8,700000/QLGC,qla@3/fp@0,0/ssd@w5006048452a85013,75

              ...... OUTPUT TRUNCATED......

      15. c5t5006048452A8501Cd122 <EMC-SYMMETRIX-5773-68.08GB>
          /pci@8,700000/QLGC,qla@3,1/fp@0,0/ssd@w5006048452a8501c,7a
      16. emcpower0a <EMC-SYMMETRIX-5773-68.08GB>
          /pseudo/emcp@0
      17. emcpower1a <EMC-SYMMETRIX-5773-68.08GB>
          /pseudo/emcp@1
      18. emcpower2a <EMC-SYMMETRIX-5773-68.08GB>
          /pseudo/emcp@2
      19. emcpower3a <EMC-SYMMETRIX-5773-68.08GB>
          /pseudo/emcp@3
      20. emcpower4a <EMC-SYMMETRIX-5773-68.08GB>
          /pseudo/emcp@4
      21. emcpower5a <EMC-SYMMETRIX-5773-68.08GB>
          /pseudo/emcp@5
Specify disk (enter its number): 16
selecting emcpower0a
[disk formatted]

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> p

PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> p
Current partition table (original):
Total disk sectors available: 142754782 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector         Size         Last Sector
  0 unassigned    wm                 0           0               0
  1          -    wm              2082      127.00MB          262177
  2 unassigned    wm                 0           0               0
  3 unassigned    wm                 0           0               0
  4 unassigned    wm                 0           0               0
  5 unassigned    wm                 0           0               0
  6 unassigned    wm                 0           0               0

partition> l
Ready to label disk, continue? y

no reserved partition found
partition>
partition> q

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> q
root@mydev1 #
root@mydev1 #

Now Observe the difference....Type f the disk is "none".

root@mydev1 #
root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:SVM        -            -            SVM
disk_1       auto:SVM        -            -            SVM
emcpower0    auto:none       -            -            online invalid
emcpower1    auto:sliced     -            -            online invalid
emcpower2    auto:sliced     -            -            online invalid
emcpower3    auto:sliced     -            -            online invalid
emcpower4    auto:sliced     -            -            online invalid
emcpower5    auto:sliced     -            -            online invalid
root@mydev1 #
root@mydev1 #

Try once again, this time system will allow you to bring the lun under VXVM control....

root@mydev1 #
root@mydev1 # vxdisksetup -i emcpower0 format=sliced
root@mydev1 #
root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:SVM        -            -            SVM
disk_1       auto:SVM        -            -            SVM
emcpower0    auto:sliced     -            -            online                ---- under VXVM
emcpower1    auto:sliced     -            -            online invalid
emcpower2    auto:sliced     -            -            online invalid
emcpower3    auto:sliced     -            -            online invalid
emcpower4    auto:sliced     -            -            online invalid
emcpower5    auto:sliced     -            -            online invalid
root@mydev1 #

Now do the same for all the luns..... (label VTOC of all luns)

root@mydev1 #
root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:SVM        -            -            SVM
disk_1       auto:SVM        -            -            SVM
emcpower0    auto:sliced     -            -            online
emcpower1    auto:none       -            -            online invalid
emcpower1    auto:none       -            -            online invalid
emcpower3    auto:none       -            -            online invalid
emcpower4    auto:none       -            -            online invalid
emcpower5    auto:none       -            -            online invalid
root@mydev1 #
root@mydev1 #
root@mydev1 # vxdisksetup -i emcpower1 format=sliced
root@mydev1 # vxdisksetup -i emcpower2 format=sliced
root@mydev1 # vxdisksetup -i emcpower3 format=sliced
root@mydev1 # vxdisksetup -i emcpower4 format=sliced
root@mydev1 # vxdisksetup -i emcpower5 format=sliced
root@mydev1 #
root@mydev1 #

As of now, we brought all luns under veritas control.... observe below output :

root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:SVM        -            -            SVM
disk_1       auto:SVM        -            -            SVM
emcpower0    auto:sliced     -            -            online
emcpower1    auto:sliced     -            -            online
emcpower2    auto:sliced     -            -            online
emcpower3    auto:sliced     -            -            online
emcpower4    auto:sliced     -            -            online
emcpower5    auto:sliced     -            -            online
root@mydev1 #
root@mydev1 #

Let us initialize the disk group,

CMD : vxdg init dgname diskname=actual disk

root@mydev1 #
root@mydev1 # vxdg init MYDVDATA MYDVDATA0=emcpower0 cds=off
root@mydev1 #

Obseve the changes in below output the device is now given with disk and diskgroup name....

root@mydev1 #
root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:SVM        -            -            SVM
disk_1       auto:SVM        -            -            SVM
emcpower0    auto:sliced     MYDVDATA0     MYDVDATA      online
emcpower1    auto:sliced     -            -            online
emcpower2    auto:sliced     -            -            online
emcpower3    auto:sliced     -            -            online
emcpower4    auto:sliced     -            -            online
emcpower5    auto:sliced     -            -            online
root@mydev1 #
root@mydev1 #

Add all the disks to the diskgroup...

root@mydev1 # for i in 1 2 3 4 5
root@mydev1 > do
root@mydev1 > vxdg -g MYDVDATA adddisk MYDVDATA$i=emcpower$i
root@mydev1 > done
root@mydev1 #
root@mydev1 #
root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:SVM        -            -            SVM
disk_1       auto:SVM        -            -            SVM
emcpower0    auto:sliced     MYDVDATA0     MYDVDATA      online
emcpower1    auto:sliced     MYDVDATA1     MYDVDATA      online
emcpower2    auto:sliced     MYDVDATA2     MYDVDATA      online
emcpower3    auto:sliced     MYDVDATA3     MYDVDATA      online
emcpower4    auto:sliced     MYDVDATA4     MYDVDATA      online
emcpower5    auto:sliced     MYDVDATA5     MYDVDATA      online
root@mydev1 #
root@mydev1 #

Now we can start creation of volumes....

CMD : vxassist -g dgname make volname size layout ncol stwidth

ncol : no.of columns.
stwidth : stripe width.

root@mydev1 #
root@mydev1 # vxassist -g MYDVDATA make oracle 300g layout=stripe ncol=2 stwidth=1024
root@mydev1 #
root@mydev1 # vxassist -g MYDVDATA make usrsap 50g layout=stripe ncol=2 stwidth=1024
root@mydev1 #
root@mydev1 # vxassist -g MYDVDATA make softdump 25g layout=stripe ncol=2 stwidth=1024
root@mydev1 #
root@mydev1 #
root@mydev1 # vxprint -ht
Disk group: MYDVDATA

DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
ST NAME         STATE        DM_CNT   SPARE_CNT         APPVOL_CNT
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
RV NAME         RLINK_CNT    KSTATE   STATE    PRIMARY  DATAVOLS  SRL
RL NAME         RVG          KSTATE   STATE    REM_HOST REM_DG    REM_RLNK
CO NAME         CACHEVOL     KSTATE   STATE
VT NAME         RVG          KSTATE   STATE    NVOLUME
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
SR NAME         KSTATE

dg MYDVDATA      default      default  28000    1330065610.21.mydev1

dm MYDVDATA0     emcpower0    auto     65535    142705568 -
dm MYDVDATA1     emcpower1    auto     65535    142705568 -
dm MYDVDATA2     emcpower2    auto     65535    142705568 -
dm MYDVDATA3     emcpower3    auto     65535    142705568 -
dm MYDVDATA4     emcpower4    auto     65535    142705568 -
dm MYDVDATA5     emcpower5    auto     65535    142705568 -

v  oracle       -            ENABLED  ACTIVE   629145600 SELECT   oracle-01 fsgen
pl oracle-01    oracle       ENABLED  ACTIVE   629145600 STRIPE   2/1024   RW
sd MYDVDATA0-01  oracle-01    MYDVDATA0 0        142705568 0/0      emcpower0 ENA
sd MYDVDATA2-01  oracle-01    MYDVDATA2 0        142705568 0/142705568 emcpower2 ENA
sd MYDVDATA4-01  oracle-01    MYDVDATA4 0        29161664 0/285411136 emcpower4 ENA
sd MYDVDATA1-01  oracle-01    MYDVDATA1 0        142705568 1/0      emcpower1 ENA
sd MYDVDATA3-01  oracle-01    MYDVDATA3 0        142705568 1/142705568 emcpower3 ENA
sd MYDVDATA5-01  oracle-01    MYDVDATA5 0        29161664 1/285411136 emcpower5 ENA

v  softdump     -            ENABLED  ACTIVE   52428800 SELECT    softdump-01 fsgen
pl softdump-01  softdump     ENABLED  ACTIVE   52428800 STRIPE    2/1024   RW
sd MYDVDATA4-03  softdump-01  MYDVDATA4 81590464 26214400 0/0       emcpower4 ENA
sd MYDVDATA5-03  softdump-01  MYDVDATA5 81590464 26214400 1/0       emcpower5 ENA

v  usrsap       -            ENABLED  ACTIVE   104857600 SELECT   usrsap-01 fsgen
pl usrsap-01    usrsap       ENABLED  ACTIVE   104857600 STRIPE   2/1024   RW
sd MYDVDATA4-02  usrsap-01    MYDVDATA4 29161664 52428800 0/0       emcpower4 ENA
sd MYDVDATA5-02  usrsap-01    MYDVDATA5 29161664 52428800 1/0       emcpower5 ENA
root@mydev1 #
root@mydev1 #

********************************************************************************

Now create the filesystems, here observe the following difference.

root@mydev1 #
root@mydev1 #
root@mydev1 # mkfs -Fvxfs /dev/vx/rdsk/MYDVDATA/oracle
    version 9 layout
    629145600 sectors, 314572800 blocks of size 1024, log size 65536 blocks
    rcq size 8192 blocks
    largefiles supported
root@mydev1 #
root@mydev1 #
root@mydev1 # mkfs -Fvxfs /dev/vx/rdsk/MYDVDATA/softdump
    version 9 layout
    52428800 sectors, 26214400 blocks of size 1024, log size 65536 blocks
    rcq size 2048 blocks
    largefiles supported
root@mydev1 #
root@mydev1 #
root@mydev1 # mkfs -Fvxfs /dev/vx/rdsk/MYDVDATA/usrsap
    version 9 layout
    104857600 sectors, 52428800 blocks of size 1024, log size 65536 blocks
    rcq size 4096 blocks
    largefiles supported
root@mydev1 #
root@mydev1 # mkdir -p /oracle
root@mydev1 # 
root@mydev1 # mkdir -p /usr/sap
root@mydev1 # 
root@mydev1 # mkdir -p /softwares
root@mydev1 #
root@mydev1 # mount -Fvxfs  /dev/vx/dsk/MYDVDATA/oracle /oracle
root@mydev1 #
root@mydev1 #
root@mydev1 # df -kh
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10         30G    17G    13G    58%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    91G   1.8M    91G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
swap                    91G     0K    91G     0%    /dev/vx/dmp
swap                    91G     0K    91G     0%    /dev/vx/rdmp
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
                        30G    17G    13G    58%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
                        30G    17G    13G    58%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   512M   248K   512M     1%    /tmp
swap                    91G    56K    91G     1%    /var/run
/dev/odm                 0K     0K     0K     0%    /dev/odm
/dev/vx/dsk/MYDVDATA/oracle
                       300G   148M   281G     1%    /oracle
root@mydev1 #

Here observe the output of df -kh, there is a lot of wastage in space. To avoid this we need to give block size while creating filesystem , so that there will be a minimum space wastage.

root@mydev1 # umount /oracle
root@mydev1 #

*********************************************************************************
root@mydev1 #
root@mydev1 #
root@mydev1 # mkfs -Fvxfs -o bsize=8192 /dev/vx/rdsk/MYDVDATA/oracle
    version 9 layout
    629145600 sectors, 39321600 blocks of size 8192, log size 8192 blocks
    rcq size 1024 blocks
    largefiles supported
root@mydev1 #
root@mydev1 #
root@mydev1 # mkfs -Fvxfs -o bsize=8192 /dev/vx/rdsk/MYDVDATA/usrsap
    version 9 layout
    104857600 sectors, 6553600 blocks of size 8192, log size 8192 blocks
    rcq size 512 blocks
    largefiles supported
root@mydev1 #
root@mydev1 #
root@mydev1 # mkfs -Fvxfs -o bsize=8192 /dev/vx/rdsk/MYDVDATA/softdump
    version 9 layout
    52428800 sectors, 3276800 blocks of size 8192, log size 8192 blocks
    rcq size 256 blocks
    largefiles supported
root@mydev1 #
root@mydev1 #

As you see, above I mentioned my block size so check the space consumed when I mount these filesystems.

root@mydev1 # mount -Fvxfs  /dev/vx/dsk/MYDVDATA/oracle /oracle
root@mydev1 #
root@mydev1 #
root@mydev1 # df -kh
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10         30G    17G    13G    58%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    91G   1.8M    91G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
swap                    91G     0K    91G     0%    /dev/vx/dmp
swap                    91G     0K    91G     0%    /dev/vx/rdmp
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
                        30G    17G    13G    58%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
                        30G    17G    13G    58%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   512M   248K   512M     1%    /tmp
swap                    91G    56K    91G     1%    /var/run
/dev/odm                 0K     0K     0K     0%    /dev/odm
/dev/vx/dsk/MYDVDATA/oracle
                       300G    83M   298G     1%    /oracle
root@mydev1 #
root@mydev1 # mount -Fvxfs /dev/vx/dsk/MYDVDATA/usrsap /usr/sap
root@mydev1 #
root@mydev1 # mount -Fvxfs /dev/vx/dsk/MYDVDATA/softdump /softwares
root@mydev1 #
root@mydev1 # df -kh
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10         30G    17G    13G    58%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    91G   1.8M    91G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
swap                    91G     0K    91G     0%    /dev/vx/dmp
swap                    91G     0K    91G     0%    /dev/vx/rdmp
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
                        30G    17G    13G    58%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
                        30G    17G    13G    58%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   512M   248K   512M     1%    /tmp
swap                    91G    56K    91G     1%    /var/run
/dev/odm                 0K     0K     0K     0%    /dev/odm
/dev/vx/dsk/MYDVDATA/oracle
                       300G    83M   298G     1%    /oracle
/dev/vx/dsk/MYDVDATA/usrsap
                        50G    71M    50G     1%    /usr/sap
/dev/vx/dsk/MYDVDATA/softdump
                        25G    68M    25G     1%    /softwares
root@mydev1 #
root@mydev1 #

#################################################################################

No comments:

Post a Comment