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 #

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

Thursday, 8 May 2014

SNAPSHOT from ILOM by CLI and GUI !!!

Snapshot is a utility provided by ILOM to collect SP(Service Processor) data in High end servers like T-series and M-series.

To run the snapshot, we have two methods :
1) ILOM CLI (Command Line Interface).
2) WEBGUI (Graphical User Interface).

Let me start with ILOM CLI, In CLI we use ftp or tftp protocol.
For this we need to login to ILOM.

Oracle(R) Integrated Lights Out Manager
Version 3.2.1.7.d r86718
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
Warning: password is set to factory default.
Hostname: SDELB0631LLP05-SP

->
-> cd /SP/diag/snapshot               ------ Go to snapshot location.
/SP/diag/snapshot
->
-> show
 /SP/diag/snapshot
    Targets:
    Properties:
        dataset = normal
        dump_uri = (Cannot show property)
        encrypt_output = false
        result = (none)
    Commands:
        cd
        set
        show
->

Here we can observe dump_uri which means, where the snapshot dump should be generated.
So we need to set this dump location.

NOTE: Since snapshot is a large file,ensure the size of desired location before setting dump_uri.

-> cd /HOST
/HOST
-> 
-> start /HOST/console
Are you sure you want to start /HOST/console (y/n)? y
Serial console started.  To stop, type #.
LLPT52 console login: root
Password:
May  8 05:08:53 LLPT52 login: ROOT LOGIN /dev/console
Last login: Wed May  7 18:09:46 from 10.32.232.18
Oracle Corporation      SunOS 5.11      11.1    November 2013
You have new mail.
root@LLPT52:~#
root@LLPT52:~#
root@LLPT52:~# df -kh
Filesystem             Size   Used  Available Capacity  Mounted on
rpool/ROOT/solaris     196G   4.2G       109G     4%    /
/devices                 0K     0K         0K     0%    /devices
/dev                     0K     0K         0K     0%    /dev
ctfs                     0K     0K         0K     0%    /system/contract
proc                     0K     0K         0K     0%    /proc
mnttab                   0K     0K         0K     0%    /etc/mnttab
swap                    98G   2.6M        98G     1%    /system/volatile
objfs                    0K     0K         0K     0%    /system/object
sharefs                  0K     0K         0K     0%    /etc/dfs/sharetab
fd                       0K     0K         0K     0%    /dev/fd
rpool/ROOT/solaris/var
                       196G   290M       109G     1%    /var
swap                    98G    32K        98G     1%    /tmp
rpool/VARSHARE         196G   102K       109G     1%    /var/share
rpool/export           196G    32K       109G     1%    /export
rpool/export/home      196G    31K       109G     1%    /export/home
rpool                  196G    73K       109G     1%    /rpool
root@LLPT52:~#
root@LLPT52:~#
root@LLPT52:~#
root@LLPT52:~# cd /tmp
root@LLPT52:/tmp# ls
dbus-nWFJlDIOUn          dbus-RsYSLGKvTY          gdm-auth-cookies-y7aO6d
dbus-q4KAq7ZbG1          disk-details.txt         hsperfdata_root
root@LLPT52:~#
root@LLPT52:~#
Serial console stopped.
->
->
->
-> cd /SP/diag/snapshot
/SP/diag/snapshot
->
-> show
 /SP/diag/snapshot
    Targets:
    Properties:
        dataset = normal
        dump_uri = (Cannot show property)
        encrypt_output = false
        result = (none)
    Commands:
        cd
        set
        show
->

Now set the dump_uri as shown below : 
Here we need mention protocol and host ip address...(not ILOM IP)

->
-> set dump_uri=ftp://root@10.32.232.16/tmp/
Enter remote user password: *******                    ----- we need to enter our ftp user's passwd
Set 'dump_uri' to 'ftp://root@10.32.232.16/tmp/'

-> show
 /SP/diag/snapshot
    Targets:
    Properties:
        dataset = normal
        dump_uri = (Cannot show property)
        encrypt_output = false
        result = Running                                 ----- we can observe that the status of result is running.
    Commands:
        cd
        set
        show
->
->                  It takes long time to complete, around 1hr minimum.
->
-> show
 /SP/diag/snapshot
    Targets:
    Properties:
        dataset = normal
        dump_uri = (Cannot show property)
        encrypt_output = false
        result = Running
    Commands:
        cd
        set
        show
->

Check the status in periodic time intervals, once it gets completed we will get the status of result as shown below. (SNAPSHOT COMPLETE DONE)

->
-> show
 /SP/diag/snapshot
    Targets:
    Properties:
        dataset = normal
        dump_uri = (Cannot show property)
        encrypt_output = false
        result = Collecting data into
ftp://root@ip_address>/tmp/***.zip
Snapshot Complete.
Done.
->

Now Go and collect the zip file of snapshot from provided directory (/tmp).

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

Next is GUI method :

IN GUI method, we need to login to ILOM ip from browser url :
https://ipaddress/ 

Soon after entering credentials we can login to ILOM and can see a page as shown below :
NOTE : In screens observe the highlighted red box.



Then click on ILOM Administration :


Now click on the maintenance:


After clicking on maintenance, a page will be loaded then select the snapshot :


Then we can observe the option " Run " , click on it.


Now we need to select option " save " the snapshot in our local PC :


Lastly we need to select our desired location to where our snapshot should be downloaded:


Once download gets completed successfully, we can check our given location " My Documents " for the snapshot file.

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

Tuesday, 6 May 2014

Configuring Control/Service Domain !!!

Soon after creating a control domain, we need to make it a service domain so that it can provide virtual services (such as disk drives,switches) using all the resources to guest ldoms.

root-myt5server:~#
root-myt5server:~# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-c--  SP      64    32640M   0.4%  21m
root-myt5server:~#


Reduce control domain's resources as per its requirement....

root-myt5server:~#
root-myt5server:~#
ldm set-vcpu 16 primary
Crypto unit 7 was removed from domain primary
Crypto unit 6 was removed from domain primary
Crypto unit 5 was removed from domain primary
Crypto unit 4 was removed from domain primary
Crypto unit 3 was removed from domain primary
Crypto unit 2 was removed from domain primary
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-c--  SP      16    32640M   0.4%  23m
root-myt5server:~#
root-myt5server:~#

root-myt5server:~#
root-myt5server:~# ldm remove-mem 20g primary
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-c--  SP      16    12160M   0.3%  24m
root-myt5server:~#
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm list-services
root-myt5server:~#
root-myt5server:~#


Currently there are no virtual services under my control domain.

Let us add virtual services starting with virtual switch (vsw).

root-myt5server:~#
root-myt5server:~#
dladm show-link
LINK                CLASS     MTU    STATE    OVER
net1                phys      1500   unknown  --
net2                phys      1500   unknown  --
net0                phys      1500   up       --                     we need a netdev for a vsw.
net3                phys      1500   unknown  --
root-myt5server:~#
root-myt5server:~#
root-myt5server:~#

root@testserver:~# ldm add-vsw
Virtual switch service and LDom are missing

Usage:
        ldm add-vsw [-q] [default-vlan-id=<vid>] [pvid=<pvid>]
                [vid=<vid1,vid2,...>] [mac-addr=<num>] [net-dev=<device>]
                [linkprop=phys-state] [mode=<mode>] [mtu=<mtu>] [id=<switchid>]
                [inter-vnet-link=<on|off>] <vswitch_name> <ldom>
root-myt5server:~#

root-myt5server:~# ldm add-vsw net-dev=net0 primary-vsw0 primary
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm list-services
VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE   INTER-VNET-LINK
    primary-vsw0     primary          00:14:4f:fa:1a:49 net0      0   
switch@0              1               1                         1500         on
root-myt5server:~#
root-myt5server:~#


Next we need a vcc to provide virtual console service to all our guest ldoms,

root-myt5server:~# ldm add-vcc
Usage:
        ldm add-vcc port-range=<x>-<y> <vcc_name> <ldom>

root-myt5server:~#
root-myt5server:~#

root-myt5server:~# ldm add-vcc port-range=5000-5100 primary-vcc primary
root-myt5server:~#
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm list-services
VCC
    NAME             LDOM             PORT-RANGE
    primary-vcc      primary          5000-5100

VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE   INTER-VNET-LINK
    primary-vsw0     primary          00:14:4f:fa:1a:49 net3      0   
switch@0              1               1                         1500         on

root-myt5server:~#

Virtual disk service which provides disk drives to guest ldoms.

root-myt5server:~#
root-myt5server:~# ldm add-vds primary-vds0 primary
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm list-services
VCC
    NAME             LDOM             PORT-RANGE
    primary-vcc      primary          5000-5100
VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE   INTER-VNET-LINK
    primary-vsw0     primary          00:14:4f:fa:1a:49 net3      0   
switch@0              1               1                         1500         on
VDS
    NAME             LDOM             VOLUME         OPTIONS          MPGROUP        DEVICE
   
primary-vds0     primary

root-myt5server:~#
root-myt5server:~#

Let us add some disks to our vds (virtual disk server).

root-myt5server:~#
root-myt5server:~# zpool list
NAME   SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
rpool  136G  55.6G  80.4G  40%  1.00x  ONLINE  -
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# zpool status rpool
  pool: rpool
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
         
c3t0d0s0  ONLINE       0     0     0

errors: No known data errors
root-myt5server:~#

root-myt5server:~# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c3t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
         
/pci@0/pci@0/pci@2/scsi@0/sd@0,0

       1. c3t1d0 <SEAGATE-ST914602SSUN146G-0603 cyl 14087 alt 2 hd 24 sec 848>
         
/pci@0/pci@0/pci@2/scsi@0/sd@1,0
Specify
 disk (enter its number): 1
selecting c3t1d0
[disk formatted]

partition> p
Current partition table (unnamed):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0 -  1030       10.01GB    (1031/0/0)   20982912
  1 unassigned    wu    1031 -  2061       10.01GB    (1031/0/0)   20982912
  2     backup    wu       0 - 14086      136.71GB    (14087/0/0) 286698624
 
3 unassigned    wm    2062 -  4122       20.00GB    (2061/0/0)   41945472
  4 unassigned    wm    4123 -  6183       20.00GB    (2061/0/0)   41945472
  5 unassigned    wm    6184 -  8244       20.00GB    (2061/0/0)   41945472
  6 unassigned    wm    8245 - 10305       20.00GB    (2061/0/0)   41945472
  7 unassigned    wm   10306 - 12366       20.00GB    (2061/0/0)   41945472

partition> q
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm add-vdsdev /dev/dsk/c3t1d0s3 mydsk1@primary-vds0
root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm list-services
VCC
    NAME             LDOM             PORT-RANGE
    primary-vcc      primary          5000-5100

VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE   INTER-VNET-LINK
    primary-vsw0     primary          00:14:4f:fa:1a:49 net3      0   
switch@0              1               1                         1500         on

VDS
    NAME             LDOM             VOLUME         OPTIONS          MPGROUP        DEVICE
    primary-vds0     primary          mydsk1                                         /dev/dsk/c3t1d0s3

root-myt5server:~#
root-myt5server:~#
root-myt5server:~# ldm add-vdsdev /dev/dsk/c3t1d0s4
mydsk2@primary-vds0

root-myt5server:~#
root-myt5server:~# ldm add-vdsdev /dev/dsk/c3t1d0s5
mydsk3@primary-vds0

root-myt5server:~#
root-myt5server:~# ldm add-vdsdev /dev/dsk/c3t1d0s6
mydsk4@primary-vds0

root-myt5server:~#
root-myt5server:~# ldm add-vdsdev /dev/dsk/c3t1d0s7
mydsk5@primary-vds0

root-myt5server:~#
root-myt5server:~# ldm list-services
VCC
    NAME             LDOM             PORT-RANGE
    primary-vcc      primary          5000-5100

VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE   INTER-VNET-LINK
    primary-vsw0     primary          00:14:4f:fa:1a:49 net3      0   
switch@0              1               1                         1500         on

VDS
    NAME             LDOM             VOLUME         OPTIONS          MPGROUP        DEVICE
    primary-vds0     primary          mydsk1                      /dev/dsk/c3t1d0s3
                                      mydsk2                                         /dev/dsk/c3t1d0s4
                                      mydsk3                                         /dev/dsk/c3t1d0s5
                                      mydsk4                                         /dev/dsk/c3t1d0s6
                                      mydsk5                                         /dev/dsk/c3t1d0s7

root-myt5server:~#
root-myt5server:~#
root-myt5server:~#
root-myt5server:~#
ldm list-bindings
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      16    12160M   0.3%  28m

UUID
    e77f7a54-fb08-c28d-8cdd-eba22d2258fd

MAC
    00:14:4f:98:4a:18

HOSTID
    0x84984a18

CONTROL
    failure-policy=ignore
    extended-mapin-space=off
    cpu-arch=native
    rc-add-policy=
    shutdown-group=0

DEPENDENCY
    master=

CORE
    CID    CPUSET
    0      (0, 1, 2, 3, 4, 5, 6, 7)
    1      (8, 9, 10, 11, 12, 13, 14, 15)

VCPU
    VID    PID    CID    UTIL STRAND
    0      0      0      0.6%   100%
    1      1      0      0.4%   100%
    2      2      0      0.4%   100%
    3      3      0      0.3%   100%
    4      4      0      0.3%   100%
    5      5      0      0.2%   100%
    6      6      0      0.3%   100%
    7      7      0      0.2%   100%
    8      8      1      0.4%   100%
    9      9      1      0.4%   100%
    10     10     1      0.4%   100%
    11     11     1      0.4%   100%
    12     12     1      0.3%   100%
    13     13     1      0.1%   100%
    14     14     1      0.2%   100%
    15     15     1      0.3%   100%

MAU
    ID     CPUSET
    0      (0, 1, 2, 3, 4, 5, 6, 7)
    1      (8, 9, 10, 11, 12, 13, 14, 15)

MEMORY
    RA               PA               SIZE
    0x8000000        0x8000000        128M
    0x510000000      0x510000000      12032M

CONSTRAINT
    threading=max-throughput

VARIABLES
    pm_boot_policy=disabled=1;ttfc=0;ttmr=0;

IO
    DEVICE                           PSEUDONYM        OPTIONS
   
pci@0                            pci
   
niu@80                           niu
   
pci@0/pci@0/pci@8/pci@0/pci@9    MB/RISER0/PCIE0
   
pci@0/pci@0/pci@8/pci@0/pci@1    MB/RISER1/PCIE1
   
pci@0/pci@0/pci@9                MB/RISER2/PCIE2
   
pci@0/pci@0/pci@1/pci@0/pci@2    MB/NET0
   
pci@0/pci@0/pci@1/pci@0/pci@3    MB/NET2
   
pci@0/pci@0/pci@2                MB/SASHBA
VCC
    NAME             PORT-RANGE
    primary-vcc      5000-5100

VSW
    NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE   INTER-VNET-LINK
    primary-vsw0     00:14:4f:fa:1a:49 net3      0   
switch@0              1               1                         1500         on
VDS
    NAME             VOLUME         OPTIONS          MPGROUP        DEVICE
  
  primary-vds0     mydsk1                                         /dev/dsk/c3t1d0s3
                     mydsk2                                         /dev/dsk/c3t1d0s4
                     mydsk3                                         /dev/dsk/c3t1d0s5
                     mydsk4                                         /dev/dsk/c3t1d0s6
                     mydsk5                                         /dev/dsk/c3t1d0s7

VCONS
    NAME             SERVICE                     PORT   LOGGING
                     SP
root-myt5server:~#
root-myt5server:~#


Now our control domain is ready enough to provide its services to its guest ldoms.....

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