Wednesday, April 2, 2014

Install Veritas Volume Manager on Solaris 10


# uname -a

SunOS sol1 5.10 Generic_147148-26 i86pc i386 i86pc
# cd dvd2-sol_x64/sol10_x64
# ./installer

    Storage Foundation and High Availability Solutions 6.0.1 Install Program

Symantec Product                                   Version Installed    Licensed
================================================================================
Symantec Licensing Utilities (VRTSvlic) are not installed due to which products
and licenses are not discovered.
Use the menu below to continue.


Task Menu:

    P) Perform a Pre-Installation Check       I) Install a Product
    C) Configure an Installed Product         G) Upgrade a Product
    O) Perform a Post-Installation Check      U) Uninstall a Product
    L) License a Product                      S) Start a Product
    D) View Product Descriptions              X) Stop a Product
    R) View Product Requirements              ?) Help

Enter a Task: [P,I,C,G,O,U,L,S,D,X,R,?] I

     1)  Veritas Dynamic Multi-Pathing (DMP)
     2)  Veritas Cluster Server (VCS)
     3)  Veritas Storage Foundation (SF)
     4)  Veritas Storage Foundation and High Availability (SFHA)
     5)  Veritas Storage Foundation Cluster File System HA (SFCFSHA)
     6)  Symantec VirtualStore (SVS)
     7)  Veritas Storage Foundation for Oracle RAC (SF Oracle RAC)
     b)  Back to previous menu

Select a product to install: [1-7,b,q] 3

Do you agree with the terms of the End User License Agreement as specified in
the storage_foundation/EULA/en/EULA_SF_Ux_6.0.1.pdf file present on media?
[y,n,q,?] y


     1)  Install minimal required packages - 379 MB required
     2)  Install recommended packages - 728 MB required
     3)  Install all packages - 730 MB required
     4)  Display packages to be installed for each option

Select the packages to be installed on all systems? [1-4,q,?] (2)

Enter the Solaris x64 system names separated by spaces: [q,?] (sol1)

Logs are being written to /var/tmp/installer-201404022341tms while installer is
in progress

    Verifying systems: 100%

    Estimated time remaining: (mm:ss) 0:00                            8 of 8

    Checking system communication ..................................... Done
    Checking release compatibility .................................... Done
    Checking installed product ........................................ Done
    Checking prerequisite patches and packages ........................ Done
    Checking platform version ......................................... Done
    Checking file system free space ................................... Done
    Checking product licensing ........................................ Done
    Performing product prechecks ...................................... Done

System verification checks completed

The following warnings were discovered on the systems:

CPI WARNING V-9-30-1997 The swap size on sol1 is 970 megabytes, the minimal swap
size required by product SF is 1024 megabytes

CPI WARNING V-9-40-4970 To avoid a potential reboot after installation, you
should modify the /etc/system file on sol1 with the appropriate values, and
reboot prior to package installation.

Appropriate /etc/system file entries are shown below:
        set lwp_default_stksize=0x6000
        set rpcmod:svc_default_stksize=0x6000

Do you want to continue? [y,n,q] (y)

The following Veritas Storage Foundation packages will be installed on all
systems:

Package           Package Description

VRTSperl          Veritas Perl 5.14.2 Redistribution
VRTSvlic          Veritas Licensing
VRTSspt           Veritas Software Support Tools by Symantec
VRTSvxvm          Veritas Volume Manager Binaries
VRTSaslapm        Veritas Volume Manager - ASL/APM
VRTSob            Veritas Enterprise Administrator Service by Symantec
VRTSvxfs          Veritas File System
VRTSdbed          Veritas Storage Foundation Databases
VRTSodm           Veritas Oracle Disk Manager
VRTSsfmh          Veritas Storage Foundation Managed Host by Symantec
VRTSsfcpi601      Veritas Storage Foundation Installer

Press [Enter] to continue:

Logs are being written to /var/tmp/installer-201404022341tms while installer is
in progress

    Installing SF: 100%

    Estimated time remaining: (mm:ss) 0:00                          13 of 13

    Performing SF preinstall tasks .................................... Done
    Installing VRTSperl package ....................................... Done
    Installing VRTSvlic package ....................................... Done
    Installing VRTSspt package ........................................ Done
    Installing VRTSvxvm package ....................................... Done
    Installing VRTSaslapm package ..................................... Done
    Installing VRTSob package ......................................... Done
    Installing VRTSvxfs package ....................................... Done
    Installing VRTSdbed package ....................................... Done
    Installing VRTSodm package ........................................ Done
    Installing VRTSsfmh package ....................................... Done
    Installing VRTSsfcpi601 package ................................... Done
    Performing SF postinstall tasks ................................... Done

Veritas Storage Foundation Install completed successfully

To comply with the terms of Symantec's End User License Agreement, you have 60
days to either:

 * Enter a valid license key matching the functionality in use on the systems
 * Enable keyless licensing and manage the systems with a Management Server. For
more details visit http://go.symantec.com/sfhakeyless. The product is fully
functional during these 60 days.

     1)  Enter a valid license key
     2)  Enable keyless licensing and complete system licensing later

How would you like to license the systems? [1-2,q] (2)

     1)  SF Standard
     2)  SF Enterprise
     b)  Back to previous menu

Select product mode to license: [1-2,b,q,?] (2)

Would you like to enable the Veritas Volume Replicator? [y,n,q] (n)

Would you like to enable the Veritas Volume Replicator? [y,n,q] (n)

Registering SF license
SF vxkeyless key (SFENT) successfully registered on sol1

The updates to VRTSaslapm package are released via the Symantec SORT web page:
https://sort.symantec.com/asl. To make sure you have the latest version of
VRTSaslapm (for up to date ASLs and APMs), download and install the latest
package from the SORT web page.

Veritas Storage Foundation cannot be started without configuration.

Run the '/opt/VRTS/install/installsf601 -configure' command when you are ready
to configure Veritas Storage Foundation.

Checking online updates for Veritas Storage Foundation 6.0.1

        Attempted to connect to https://sort.symantec.com to check for product
updates, but connection failed.
        Please visit https://sort.symantec.com to check for available product
updates and information.

The following packages require reboot while installing them on sol1:
        VRTSvxfs

It is strongly recommended to reboot the following systems:
        sol1

Execute '/usr/sbin/shutdown -y -i6 -g0' to properly restart your systems

installer log files, summary file, and response file are saved at:

        /opt/VRTS/install/logs/installer-201404022341tms

Would you like to view the summary file? [y,n,q] (n)

shutdown -y -i6 -g0


after reboot :

# vxdisk list
VxVM vxdisk ERROR V-5-1-684 IPC failure: Configuration daemon is not accessible
# vxconfigd
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
# vxdctl init
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
# vxdctl enable
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS

Please note that only after running vxdctl enable then vxdisk list will show output

Now 2 more disks are added 

# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1t0d0s2     auto:none       -            -            online invalid

c1t1d0s2     auto:none       -            -            online invalid

# cfgadm -al
Ap_Id                          Type         Receptacle   Occupant     Condition
usb0/1                         usb-input    connected    configured   ok
usb0/2                         unknown      empty        unconfigured ok
:
:

# /usr/sbin/devfsadm -Cvc disk
devfsadm[3767]: verbose: symlink /dev/dsk/c1d0s0 -> ../../devices/pci@0,0/pci-ide@1,1/ide@1/cmdk@0,0:a
devfsadm[3767]: verbose: symlink /dev/dsk/c1d0s1 -> ../../devices/pci@0,0/pci-ide@1,1/ide@1/cmdk@0,0:b
devfsadm[3767]: verbose: symlink /dev/dsk/c1d0s2 -> ../../devices/pci@0,0/pci-ide@1,1/ide@1/cmdk@0,0:c
devfsadm[3767]: verbose: symlink /dev/dsk/c1d0s3 -> ../../devices/pci@0,0/pci-ide@1,1/ide@1/cmdk@0,0:d
:
:


# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1d0s2       auto:none       -            -            online invalid
c1d1s2       auto:none       -            -            online invalid
# vxddladm assign names

# vxddladm set namingscheme=ebn
# vxddladm assign names

vxdisksetup command  brings the disks in to veritas volume manager control. By default this will format the disk in CDS(Cross Data platform Sharing ). Other formats are sliced and simple. sliced will be used for boot disks. In this case, we are using virtual disk, so we have to use format=simple, otherwise, we will get the following error :

# /etc/vx/bin/vxdisksetup -i c1d0

VxVM vxdisksetup ERROR V-5-2-1814 c1d0: Invalid disk device for 'cdsdisk' format

# /etc/vx/bin/vxdisksetup -i c1d0 format=simple
# vxdisk -e list
DEVICE       TYPE           DISK        GROUP        STATUS               OS_NATIVE_NAME   ATTR
c0d0s2       auto:ZFS       -            -           ZFS                  c0d0s2           -
c1d0s2       auto:simple    -            -           online               c1d0s2           -
c1d1s2       auto:none      -            -           online invalid       c1d1s2           -

# /etc/vx/bin/vxdisksetup -i c1d1 format=simple

# vxdisk -e list
DEVICE       TYPE           DISK        GROUP        STATUS               OS_NATIVE_NAME   ATTR
c0d0s2       auto:ZFS       -            -           ZFS                  c0d0s2           -
c1d0s2       auto:simple    -            -           online               c1d0s2           -
c1d1s2       auto:simple    -            -           online               c1d1s2           -


Now we create a disk group called appdg 

# vxdg init appdg appdisk0=c1d0s2
VxVM vxdg ERROR V-5-1-6478 Device c1d0s2 cannot be added to a CDS disk group

To solve the above error. I checked the options in vxdg :


init groupname [[disk=]device ...] [nconfig=default|all|ncopies] [nlog=default|all|ncopies] [cds=on|off] [minor=base-minor]


# vxdg init appdg appdisk0=c1d0s2 cds=off


Add disk to existing disk group


# vxdg -g appdg adddisk appdisk1=c1d1s2

# vxdg list
NAME         STATE           ID
appdg        enabled              1396545212.14.sol1

# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1d0s2       auto:simple     appdisk0     appdg        online
c1d1s2       auto:simple     appdisk1     appdg        online

# vxdg -g appdg rmdisk appdisk1
# vxdg list
NAME         STATE           ID
appdg        enabled              1396545212.14.sol1
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1d0s2       auto:simple     appdisk0     appdg        online
c1d1s2       auto:simple     -            -            online

# vxdg -g appdg adddisk appdisk1=c1d1s2
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1d0s2       auto:simple     appdisk0     appdg        online
c1d1s2       auto:simple     appdisk1     appdg        online

# vxdg -g appdg free
DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
appdisk0     c1d0s2       c1d0         0         2023152   -
appdisk1     c1d1s2       c1d1         0         2023152   -

# vxprint
Disk group: appdg

TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg appdg        appdg        -        -        -        -        -       -

dm appdisk0     c1d0s2       -        2023152  -        -        -       -
dm appdisk1     c1d1s2       -        2023152  -        -        -       -

# vxdg list
NAME         STATE           ID
appdg        enabled              1396545212.14.sol1

Now we deport the disk group

# vxdg deport appdg
# vxdg list

NAME         STATE           ID

# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1d0s2       auto:simple     -            -            online
c1d1s2       auto:simple     -            -            online
# vxdisk -o alldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1d0s2       auto:simple     -            (appdg)      online
c1d1s2       auto:simple     -            (appdg)      online

Now we import the disk group

# vxdg import appdg
# vxdg list
NAME         STATE           ID
appdg        enabled              1396545212.14.sol1
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0d0s2       auto:ZFS        -            -            ZFS
c1d0s2       auto:simple     appdisk0     appdg        online
c1d1s2       auto:simple     appdisk1     appdg        online

# /etc/vx/bin/vxconfigbackup
VxVM vxconfigbackup NOTICE V-5-2-6133 Start backing up diskgroup appdg to /etc/vx/cbr/bk/appdg.1396545212.14.sol1 ...

VxVM  NOTICE V-5-2-3100 Backup complete for diskgroup: appdg

# ls -ltr /etc/vx/cbr/bk
total 3
drwxr-xr-x   2 root     root           6 Apr  3 14:09 appdg.1396545212.14.sol1

Create a mirrored volume

# vxassist -g appdg make lvol1 50m layout=mirror
# vxprint -hvt
Disk group: appdg

V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO
EX NAME         ASSOC        VC                       PERMS    MODE     STATE

v  lvol1        -            ENABLED  ACTIVE   102400   SELECT    -        fsgen
pl lvol1-01     lvol1        ENABLED  ACTIVE   102400   CONCAT    -        RW
sd appdisk0-01  lvol1-01     appdisk0 0        102400   0         c1d0     ENA
pl lvol1-02     lvol1        ENABLED  ACTIVE   102400   CONCAT    -        RW
sd appdisk1-01  lvol1-02     appdisk1 0        102400   0         c1d1     ENA

# ls -la /dev/vx/rdsk/appdg/lvol1
crw-------   1 root     root     273, 21000 Apr  3 14:17 /dev/vx/rdsk/appdg/lvol1

# mkfs -F vxfs /dev/vx/rdsk/appdg/lvol1
    version 9 layout
    102400 sectors, 51200 blocks of size 1024, log size 1024 blocks
    rcq size 1024 blocks
    largefiles supported

# mkdir /ap1
# vi /etc/vfstab
add the following line
/dev/vx/dsk/appdg/lvol1 -       /ap1            vxfs    -       yes     -

# mount /ap1
# df -h /ap1
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/appdg/lvol1
                        50M   3.1M    44M     7%    /ap1

Volume resize
Add 10M by vxresize

# vxassist -g appdg maxsize layout=mirror
Maximum volume size: 1918976 (937Mb)
# vxassist -g appdg maxsize
Maximum volume size: 3840000 (1875Mb)
# /etc/vx/bin/vxresize -g appdg lvol1 +10M
# df -h /ap1
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/appdg/lvol1
                        60M   3.1M    53M     6%    /ap1

Add another 10M by vxassist and fsadm

# vxassist -g appdg growby lvol1 10M
# /usr/lib/fs/vxfs/fsadm -b 70M /ap1
UX:vxfs fsadm: INFO: V-3-25942: /dev/vx/rdsk/appdg/lvol1 size increased from 122880 sectors to 143360 sectors
# df -h /ap1
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/appdg/lvol1
                        70M   3.1M    63M     5%    /ap1


No comments:

Post a Comment