Total Pageviews

Friday, 18 July 2014

DATA MIGRATION IN VERITAS !!!

It is time to move on.All the old hardware needs to be replaced with new and latest hardware including storage boxes.
.......... Need of Data Migration ........
In such case we need to move our data from old setup to new setup.For this purpose we have two well known methodologies in Veritas.

1) Using vxevac command.
2) Creating mirror to exiting volume.

vxevac command :

vxevac is used to evacuate data on one disk to another disk.

Example : vxevac -g dgname olddisk newdisk

Now let us go with steps to gain brief knowledge :

root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:ZFS        -            -            ZFS
emcpower0    auto:cdsdisk    -            (vxfendg)    online
emcpower1    auto:cdsdisk    -            (vxfendg)    online
emcpower2    auto:cdsdisk    -            (vxfendg)    online
emcpower3    auto:cdsdisk    datadg01     datadg       online
emcpower4    auto:cdsdisk    datadg02     mydg         online
root@mydev1 # 
root@mydev1 # 

In above output, my existing datadg contains a subdisk. So to move this data to our new storage we need to bring new lun under this dg control. Add the new luns to existing DG.

root@mydev1 #
root@mydev1 # vxdg -g datadg adddisk datadg03=emcpower5
root@mydev1 #
root@mydev1 # vxdg -g mydg adddisk datadg04=emcpower6
root@mydev1 # 

We will use mydg for 2nd method.

root@mydev1 # 
root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:ZFS        -            -            ZFS
emcpower0    auto:cdsdisk    -            (vxfendg)    online
emcpower1    auto:cdsdisk    -            (vxfendg)    online
emcpower2    auto:cdsdisk    -            (vxfendg)    online
emcpower3    auto:cdsdisk    datadg01     datadg       online
emcpower4    auto:cdsdisk    datadg02     mydg         online
emcpower5    auto:cdsdisk    datadg03     datadg       online
emcpower6    auto:cdsdisk    datadg04     mydg         online
root@mydev1 #  
root@mydev1 # 
root@mydev1 # vxprint -htg datadg
Disk group: datadg

dg datadg       default      default  1000     1336573086.38.mydev1

dm datadg01     emcpower3    auto     65536    2027264  -
dm datadg03     emcpower5    auto     65536    2027264  -

v  vol1         -            ENABLED  ACTIVE   204800   SELECT    -          fsgen
pl vol1-01      vol1         ENABLED  ACTIVE   204800   CONCAT    -          RW
sd datadg01-01  vol1-01      datadg01 102400   204800   0         emcpower3  ENA

v  vol2         -            ENABLED  ACTIVE   204800   SELECT    -          fsgen
pl vol2-01      vol2         ENABLED  ACTIVE   204800   CONCAT    -          RW
sd datadg01-02  vol2-01      datadg01 307200   204800   0         emcpower3  ENA
root@mydev1 #  

So to evacuate , vxevac -g datadg datadg01 datadg03

root@mydev1 # 
root@mydev1 # vxevac -g datadg datadg01 datadg03
root@mydev1 # 

Now check the status of DG :

root@mydev1 # vxprint -htg datadg
Disk group: datadg

dg datadg       default      default  1000     1336573086.38.mydev1

dm datadg01     emcpower3    auto     65536    2027264  -
dm datadg03     emcpower5    auto     65536    2027264  -

v  vol1         -            ENABLED  ACTIVE   204800   SELECT    -          fsgen
pl vol1-01      vol1         ENABLED  ACTIVE   204800   CONCAT    -          RW
sd datadg03-01  vol1-01      datadg03 102400   204800   0         emcpower5  ENA

v  vol2         -            ENABLED  ACTIVE   204800   SELECT    -          fsgen
pl vol2-01      vol2         ENABLED  ACTIVE   204800   CONCAT    -          RW
sd datadg03-02  vol2-01      datadg03 307200   204800   0         emcpower5  ENA
root@mydev1 # 
root@mydev1 # 

Now we can the remove the old lun from our datadg.

Mirroring a volume :

By this method using vxassist we need to create mirror of a volume and remove the old plex.
For this method let us use our 2nd DG mydg.

root@mydev1 # vxdisk -oalldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:ZFS        -            -            ZFS
emcpower0    auto:cdsdisk    -            (vxfendg)    online
emcpower1    auto:cdsdisk    -            (vxfendg)    online
emcpower2    auto:cdsdisk    -            (vxfendg)    online
emcpower3    auto:cdsdisk    datadg01     datadg       online
emcpower4    auto:cdsdisk    datadg02     mydg         online
emcpower5    auto:cdsdisk    datadg03     datadg       online
emcpower6    auto:cdsdisk    datadg04     mydg         online
root@mydev1 # 

We already added the new lun emcpower6 (datadg04) earlier.So straight away we can create a mirror vol...

root@mydev1 # vxprint -htg mydg
Disk group: mydg

dg datadg       default      default  1000     1336573086.38.Server101

dm datadg02     emcpower4    auto     65536    2027264  -
dm datadg04     emcpower6    auto     65536    2027264  -

v  locks         -            ENABLED  ACTIVE   102400   SELECT    -          fsgen
pl locks-01      locks        ENABLED  ACTIVE   102400   CONCAT    -          RW
sd datadg02-01   locks-01     datadg02 0        102400   0         emcpower4  ENA 
root@mydev1 # 

Now we have to create mirror to the existing volume...

root@mydev1 # 
root@mydev1 #  vxassist -b -g mydg mirror vol alloc=datadg04
root@mydev1 # 
root@mydev1 #  vxprint -htg mydg
Disk group: mydg
dg datadg       default      default  1000     1336573086.38.mydev1
dm datadg02     emcpower4       auto     65536    2027264  -
dm datadg04     emcpower6       auto     65536    2027264  -
v  locks        -            ENABLED  ACTIVE   102400   SELECT    -          fsgen
pl locks-02     locks        ENABLED  ACTIVE   102400   CONCAT    -          RW
sd datadg04-01  locks-02     datadg04 0        102400   0         emcpower6  ENA
pl locks-01     locks        ENABLED  ACTIVE   102400   CONCAT    -          RW
sd datadg02-01  locks-01     datadg02 0        102400   0         emcpower4  ENA
root@mydev1 # 
root@mydev1 #

We can use vxtask to check the status of sync.

root@mydev1 #
root@mydev1 # vxtask list
TASKID  PTID TYPE/STATE    PCT   PROGRESS
   164     -     ATCOPY/R 35.00% 0/819200/286720 PLXATT engvol engvol-02 mydg smartmove auto-throttled
root@mydev1 #
root@mydev1 # vxtask list
TASKID  PTID TYPE/STATE    PCT   PROGRESS
   164     -     ATCOPY/R 48.00% 0/819200/393216 PLXATT engvol engvol-02 mydg smartmove auto-throttled
root@mydev1 #
root@mydev1 #

Soon after completion of 100% sync, we can remove old plex so that data is mved to new lun.

root@mydev1 # vxplex -g mydg -o rm dis locks-01
root@mydev1 #

Thus we can perform data migration from older lun to new lun through Veritas.

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

VXCONFIGBACKUP & VXCONFIGRESTORE !!!

Always it is better to take vxconfigbackup for critical systems at regular time intervals.
When config data (like private region,disk headers) of a DG gets corrupted, we can restore it from vxconfigbackup file using vxconfigrestore.

Let me start with vxconfigbackup :

vxconfigbackup takes backup of entire configuration information for one or more disk groups.

Full Path : /etc/vx/bin/vxconfigbackup
Default location of backup : /etc/vx/cbr/bk/

EXAMPLE : 
vxconfigbackup  --- Takes configbackup of all DGs and saves in default loaction.
vxconfigbackup dgname ---  Takes configbackup of a particular DG and saves in default loaction.
vxconfigbackup -l directory --- Takes configbackup of all DGs and saves in given location.
vxconfigbackup -l directory dgname/dgid --- Takes configbackup of a particular DG and saves in given location.

vxconfigbackup will takes backup of configuration files only, nowhere related with backup of data.

root@mydev #
root@mydev # df -kh
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/MYDEV         34G    17G    17G    51%    /
/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                   118G   1.9M   118G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
                        34G    17G    17G    51%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
                        34G    17G    17G    51%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   118G   144K   118G     1%    /tmp
swap                   118G    48K   118G     1%    /var/run
swap                   118G     0K   118G     0%    /dev/vx/dmp
swap                   118G     0K   118G     0%    /dev/vx/rdmp
/dev/vx/dsk/MYDEVDATA/oracle
                       1.1T   291M   1.1T     1%    /oracle
/dev/vx/dsk/MYDEVARCH/oraarch
                        68G    82M    64G     1%    /oracle/MYDEV/oraarch
/dev/vx/dsk/MYDEVCI/usrsap
                        30G    73M    28G     1%    /usr/sap
/dev/vx/dsk/MYDEVCI/sapmnt
                        25G    71M    23G     1%    /sapmnt
root@mydev #
root@mydev #
root@mydev # vxdg list
NAME         STATE           ID
MYDEVDATA      enabled,cds          1405420307.56.mydev
MYDEVARCH      enabled,cds          1405420362.58.mydev
MYDEVCI        enabled,cds          1405420374.60.mydev
root@mydev #
root@mydev #
root@mydev # vxconfigbackup -l /tmp/cidg MYDEVCI
Start backing up diskgroup MYDEVCI to /tmp/cidg/MYDEVCI.1405420374.60.mydev ...

VxVM  NOTICE V-5-2-3100 Backup complete for diskgroup: MYDEVCI
root@mydev #

So as I told, If we want for all dg's   : vxconfigbackup -l /tmp/cidg
and if we want in default location     : vxconfigbackup -l
and if we want MYDEVCI in default location : vxconfigbackup -l MYDEVCI

root@mydev #
root@mydev # cd /tmp
root@mydev #
root@mydev # ls -lrth
total 80
drwxr-xr-x   2 noaccess noaccess     178 Jul 15 17:46 hsperfdata_noaccess
drwxr-xr-x   2 root     root         117 Jul 15 17:46 hsperfdata_root
drwx------   2 root     root         117 Jul 15 17:46 vx.025246.163531.034000.3760
drwxr-xr-x   3 root     root         199 Jul 15 18:19 cidg
drwx------   2 root     root         117 Jul 15 18:19 vx.043741.033410.164400.7489
root@mydev #
root@mydev #
root@mydev # cd cidg      ---- Directory which I specified to where the backup is to be saved.
root@mydev #
root@mydev # ls -lrth
total 16
drwxr-xr-x   2 root     root         454 Jul 15 18:19 MYDEVCI.1405420374.60.mydev
root@mydev #
root@mydev # cd MYDEVCI.1405420374.60.mydev --- Directory which contains entire config backup of my given DG.
root@mydev #
root@mydev # ls -lrth
total 48192
-rw-r--r--   1 root     root        1.3K Jul 15 18:19 1405420374.60.mydev.diskinfo     |
-rw-r--r--   1 root     root        7.5K Jul 15 18:19 1405420374.60.mydev.cfgrec        | files related to
-rw-r--r--   1 root     root         24M Jul 15 18:19 1405420374.60.mydev.binconfig  |  config info.
-rw-r--r--   1 root     root        4.1K Jul 15 18:19 1405420374.60.mydev.dginfo        |
root@mydev #
root@mydev #

Thus backup of config info taken successfully....

If there is any situation like config files got corrupted and DG is not getting imported, then we can restore from vxconfigbackup.

vxconfigrestore comes with different options which helps us to choose what corrupted things need to get restored and what else need to be omitted.

root@mydev # vxconfigrestore
VxVM vxconfigrestore ERROR V-5-2-3450 Usage: vxconfigrestore [ -c | -d | -n | -p ] [ -l directory ] {dgname | dgid}
root@mydev #

-c  (Commit) To commit changes to the disks permanently.

-d  (Decommit) At precommit stage we can abandon the restore operation .

-n  (Precommit with no installation of VxVM disk header) Loads the disk group configuration only. It specifies that no corrupted private region headers should not be reinstalled.

-l  (directory) To Specify a directory other than the default (/etc/vx/cbr/bk) where the backup configuration files need to be saved.

-p  (Precommit: load) Loads DG configuration along with corrupted disk headers (reinstalled).

The actual DG configuration is not permanently restored until we choose to commit the changes.

root@mydev # vxdg import MYDEVCI
VxVM vxdg ERROR V-5-1-10978 Disk group MYDEVCI: import failed: 
Disk group has no valid configuration copies
root@mydev #

Let's try importing forcefully...

root@mydev # vxdg -Cf import MYDEVCI
VxVM vxdg ERROR V-5-1-10978 Disk group MYDEVCI: import failed: 
Disk group has no valid configuration copies
root@mydev #

Now let us restore the config from the backup which we took and saved in /tmp/cidg.....

root@mydev #
root@mydev # vxconfigrestore -p -l /tmp/cidg MYDEVCI
Diskgroup MYDEVCI configuration restoration started ......

Installing volume manager disk header for emcpower46 ...

MYDEVCI diskgroup configuration is restored (in precommit state).
Diskgroup can be accessed in read only and can be examined using
vxprint in this state.

Run:
  vxconfigrestore -c MYDEVCI ==> to commit the restoration.
  vxconfigrestore -d MYDEVCI ==> to abort the restoration.

root@mydev #
root@mydev #
root@mydev # vxconfigrestore -c MYDEVCI             ---- To commit the restoration.
Committing configuration restoration for diskgroup MYDEVCI ....

MYDEVCI diskgroup configuration restoration is committed.
root@mydev #
root@mydev #
root@mydev #
root@mydev # vxdg list
NAME         STATE           ID
MYDEVDATA      enabled,cds          1405420307.56.mydev
MYDEVARCH      enabled,cds          1405420362.58.mydev
MYDEVCI        enabled,cds          1405420374.60.mydev
root@mydev #
root@mydev #
root@mydev # vxdg deport MYDEVCI       ---- Now try to deport and re-import the DG once.
root@mydev #
root@mydev # vxdg list
NAME         STATE           ID
MYDEVDATA      enabled,cds          1405420307.56.mydev
MYDEVARCH      enabled,cds          1405420362.58.mydev
root@mydev #
root@mydev #
root@mydev # vxdg import MYDEVCI
root@mydev #
root@mydev # vxdg list
NAME         STATE           ID
MYDEVDATA      enabled,cds          1405420307.56.mydev
MYDEVARCH      enabled,cds          1405420362.58.mydev
MYDEVCI        enabled,cds          1405420374.60.mydev
root@mydev #

Hence the DG got imported successfully after restoring the config from backup file.

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

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 #

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