Wise people learn when they can; fools learn when they must - Arthur Wellesley

Friday, 26 September 2014

Veritas Volume Manager -11 [root disk (ufs) encapsulation in to vxvm]



               VXVM-11 [Encapsulation-root disk]

What we will learn in Next Few Pages,

·         How to encapsulate root disk with VXVM

root@pr-01:>/# vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk

 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
==========removed=============
23     Dynamic Reconfiguration Operations
 list   List disk information

Veritas Volume Manager -10 [manual creation of concat & stripe mirror]


      VXVM-10 (Manual)

What we will learn in Next Few Pages,

·         Layered Volume via vxmake
·         Concat-mirror / stripe-mirror

We need
4 Subdisks
4 Plexes – 1 SD for each plex
2 volumes – 2 plexes for each volume


Did u visualize the diagram?



DG,

Veritas Volume Manager -9 [manual creation of concat/stripe volumes]


     VXVM-9 (Manual)

What we will learn in Next Few Pages,

·         Manually create Concat Volume using vxmake
·         Manually create STRIPE Volume using vxmake

Well, njoyed till creating Dg’s/ Volume’s and the different layouts.
Ever thought who made the Subdisks & Plexes for us?
NO?
Never Mind… I also never thought about it. But there is also a unusual way to create all these,
Let’s have a try…
Steps to Follow,
1.  Initialize disk
2.  Create Dg
3.  Assign disk under Dg
4.  Create subdisks
5.  Create Plexes
6.  Associate plexes with subdisks [actually it is not necessary /skip this]
7.  Create volume
8.  Start volume
9.  Create FS on volume
10. Mount the FS

Veritas Volume Manager -8 [ volume disk removal]


                                      
                    VXVM-8 (Volume –Disk Removal)

What we will learn in Next Few Pages,
·         Online remove disks from volume

Well, I have a volume of 3g and used only 200mb, and I know that it is not going to cross 400-500m ever.

So want to remove some disks and use somewhere else.


root@pr-01:>/# df -kh /test-vol/
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/mydg/myvol-1
                       2.7G   119M   2.4G     5%    /test-vol

Veritas Volume Manager -7 [Volume Resize]

                                     
                                               
                       VXVM-7 (Volume Resize)

What we will learn in Next Few Pages,

·         Resize Volumes without Unmount


Resize Volumes Without Unmounting,


#vxassist       it will initiate volume resize with help of
                Growby     / growto
                Shrinkby   / shrinkto

Ok… but there one more step in it, leave it have u remember that in SVM, after resize we need to fire “growfs” b’coz vol mgr knows about the changes but these changes did not directly propagated to File System, so we need to relay that change via “growfs” to File system

Same Here, Vol mgr knows but FS is unaware of changes, and here we need “fsadm”

#vxresize       automatically resizes for both Vol & FS,


Thursday, 25 September 2014

Veritas Volume Manager -6



                                                                                
VXVM-6 (Volume’s)

What we will learn in Next Few Pages,
1.)     Recover a striped volume if any one of the disk fails
2.)     Recover mirrored volume if one of the disk fails
3.)     Recover raid5 volume if one of the disk fails


OK… Now consider a situation that u had made a striped volume and one of the disks got faulty,

root@pr-01:>/# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c2t2d0s2     auto:sliced     -            -            online
c2t3d0s2     auto:sliced     -            -            online
c2t4d0s2     auto:sliced     -            -            online
c2t5d0s2     auto:sliced     -            -            online
c2t6d0s2     auto:sliced     -            -            online
c2t7d0s2     auto:none       -            -            online invalid
c2t8d0s2     auto:none       -            -            online invalid
c2t9d0s2     auto:none       -            -            online invalid

root@pr-01:>/# vxdg init mydg cds=off d1=c2t2d0

root@pr-01:>/# vxdg -g mydg adddisk d2=c2t3d0

Wednesday, 24 September 2014

Veritas Volume Manager -5


VXVM-5 (Volume’s)

What we will learn in Next Few Pages,

1.  Volumes Basics
2.  Volume mount
3.  Volume removal
4.  Concatenated / striped volumes creation
5.  mirrored [raid 0(strip/concat),Raid 1+0 / 0+1, raid 5 volumes creation

Vxvm builds volumes using virtual objects of VM disks, Dg’s, Subdisks & Plexes

It’s Mirage… it doesn’t exists physically, but used everywhere
A volume is a virtual disk device that appears to applications, databases, and files systems like a physical disk device, but does not have the physical limitations of a physical disk device.

Subdisks:  it’s like normal partition we do in UFS, it won’t span other disk, and Public region of disk in a Dg can be divided in to one or more subdisks.

Plexes:    vxvm uses subdisks to build plexes, Plex consists of one or more subdisks located on one / more disk drives.

Veritas Volume Manager -4


                                                            VXVM-4 (Dg)

What we will learn in Next Few Pages,

·         Disabling Disk Group
·         Destroy / Recover Disk Groups
·         Disk Group Configuration backup / restore (incomplete)


DISABLING Dg,

Just deport it, it will disable

DESTROY-RECOVER Dg,

root@pr-01:>/# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:none       -            -            online invalid
c2t2d0s2     auto:sliced     test-disk2   test-dg1     online
c2t3d0s2     auto:sliced     test-disk3   testdg2      online
c2t4d0s2     auto:sliced     test-disk4   testdg2      online
c2t5d0s2     auto:sliced     -            -            online


Veritas Volume Manager -3

                     
                                     

                                                            VXVM-3 (Dg)

What we will learn in Next Few Pages,

·         Know the Size of Dg with different layouts
·         Vxvm Dg Info
·         Vxvm Disk Info
·         Deport / Import Dg
·         Rename the Disk Group
·         Moving Disk Group


How to know that what is the size of DG,


root@pr-01:>/# vxassist -g test-dg1 maxsize
Maximum volume size: 7778304 (3798Mb)


root@pr-01:>/# vxdg init testdg2 cds=off test-disk3=c2t3d0s2


Veritas Volume Manager -2


                  Veritas Volume Manager -2

What we will learn in Next Few Pages,

·         How vxvm find disks [like devfsadm in Solaris]
·         How to see the disks in vxvm
·         Veritas Naming Convention / modification
·         Realizing disks to Veritas
·         Removing disks from Veritas
·         Veritas User Interactive Disk Configuration (vxdiskadm)
·         Create Dg / add-remove disk to Dg


Better to have BABY STEPS, Instead of start Jumping-Japang at once

root@pr-01:>/# format

Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <DEFAULT cyl 1563 alt 2 hd 255 sec 63>
          /pci@0,0/pci15ad,1976@10/sd@0,0
       1. c2t2d0 <DEFAULT cyl 1917 alt 2 hd 128 sec 32>
          /iscsi/disk@0000iqn.2006-01.com.openfiler%3Atsn.aeed9c1a441f0001,0
Specify disk (enter its number):

I need some more disks…

Tuesday, 23 September 2014

ENABLING / DETECTING iscsi ON SOLARIS



ENABLING / DETECTING iscsi ON SOLARIS

Before starting Veritas, Just enable the iscsi on our Solaris boxes,

 root@pr-01:>/# svcadm enable iscsitgt
Service Enabled

root@pr-01:>/# svcs -a |grep iscsitgt
online         14:39:09 svc:/system/iscsitgt:default

root@pr-01:>/# iscsiadm add static-config iqn.2006-01.com.openfiler:tsn.aeed9c1a441f,192.168.234.170:3260


Veritas SFHA (vxvm + vcs) Installation



                                                                
                                      VERITAS SFHA INSTALLATION

Well, Now I am going to install Veritas on my Solaris (vm)

Before Installation,

2 Solaris Machines

pr-01    192.168.234.201    [extra ip 192.168.234.202]
dr-01    192.168.234.211    [extra ip 192.168.234.212]

with extra IP (These extra IP should be strictly on different Network (subnet), but I had taken on same )

Both Solaris have their entries in there /etc/hosts

Both have ssh tested with root

OK… Now let’s start the Veritas Installation

 root@pr-01:>/hgfs/oS/veritas_SETUP# gunzip VRTS_SF_HA_Solutions_6.0.1_Solaris_x64.tar.gz

root@pr-01:>/hgfs/oS/veritas_SETUP# chmod 777 VRTS_SF_HA_Solutions_6.0.1_Solaris_x64.tar

Configure / Provision Openfiler for Sharing

                                                
           
        
        CONFIGURE OPENFILER FOR DISK SHARING

Considering Openfiler is installed on vmware, 2 extra disks are added in it.


Go to Web Browser, and put the IP of openfiler  as…


Now… The Browser will warn u…No Problem... go ahead…


Username           =             openfiler
Password            =             password

Monday, 22 September 2014

Process Control CRON -- Solaris

                          
PROCESS CONTROL [cron]

Suppose u went to a place and stayed at hotel, u want that someone will wake u up at 5’O clock sharp daily and someone from laundry come at 7pm sharp, and someone will keep the dinner at your room 9pm sharp. Suddenly you remembered that after 3 days at 11am you have to meet somebody so you want this also to be recalled by someone.

Well… Now let’s explain this example…
Daily morning wake up / daily laundry / daily dinner at particular time… without fail
After 3 days want to remind … but this is only once

So what does it mean… it means that we can set particular tasks to be run daily ..once twice thrice or whatever.
We can set also onetime jobs… that will run and expire

The first one can done via utility CRON and the one timers can be done via utility AT

CRON…
5minute 10 hour 12th march Monday

Thursday, 18 September 2014

Flar Installation -- Solaris

                                                
                                               FLAR INSTALLATION

Personally I love this method of installation… it saves lots of time and unnecessary extra Patching / Configuration Burden.

It can be used as BACKUP TOOL also…if have such spaces… it never failed I personally used this as backup and restore several times just 20-30 minutes and server is ready...

SO… what does it do ?

It’s like Image of that Particular time… Just create and use at backup or to Build New Server Install…

**make sure to take the "df -kh" o/p for disk layout -- if planned to use as bkp**

JumpStart on x86 (VMware) -- Solaris


                                        JUMPSTART On x86 (VMware)

Well… sometimes thought that why it is named as Jump-Start?

Does somebody have performed this while jumping or he/she started jumping after performing this?

Or… might be he/she was jumping from this system to that system to perform all steps so that it is named as Jumpstart….. 

Wow… If this is the answer then what do you say about Linux KICK-START?

Ok… Jokes apart…

Package -- Solaris

                                                
                                                PACKAGE

Well, we went thru patch… now what’s this Package?

It is collection of programs or files that provide certain functionality,
Along with method of managing the installation & removal of it.

ADD PACKAGES
REMOVE PACKAGES
INFO ABOUT PACKAGES

OK… First have some commands…
Remember the word “pkg”
Got it… Good… now u can add
Info                    -l / -x
Add                     -d
Rm                      -f (be alert when u have to use –f with pkgrm…)
Chk                     -v  / -lp


Tuesday, 16 September 2014

Patch -- Solaris



                                                                
                                                           PATCH

Well, what does it mean?

What is the First image clicked in mind when we heard the word “patch”


  • A puncture in bike and a small patch is applied on that area & done.
  • A cut in hand and a Band-Aid is applied on that area & done …
  • A damp on wall and a small patch of coating is applied on that area & done…

Well … there are several examples … now let’s explain these

So… what these examples are trying to say??

There was some problem with something and we applied something to correct that problem…Right??

Well… the same is applied in case of programs … How??

Boot Process - Solaris

                                                                                                
                                                               BOOT PROCESS

Well, Let’s Boot the Solaris Box
Any boot will starts from Power on…

Power On the system
                   |
Power goes to Power Supply
                    |
PROM is initiated
                   |
At this stage Open Boot Firmware [OBP] is executed

Monday, 15 September 2014

Swap / Virtual Memory - Solaris

                                                                                                
                                                                  SWAP

Well… what is this Swap ?

       Before Swap we need to know about our Physical Memory i.e. RAM installed on system
       So How to know that how much Physical memory present in our system  ?
      root@sol-test-2:>/# prtconf -v |grep -i mem
      Memory size: 1024 Megabytes
             name='acpi-srat-memory-0' type=int items=6
            name='acpi-srat-memory-1' type=int items=6
            name='maxallocmem' type=int items=1
            name='device-memory' type=int items=6

Ok.. now I know what is my Phy. Mem. ,
Consider a situation where the System has only Phy.  Mem.  And system is running from 45 days, it might be possible or not that our RAM is full… Suppose RAM is full… Now what ?
Should I have to reboot the system?

No… We have an Option of SWAP… By providing some space on HDD for memory usage.
That Space on HDD is called SWAP Space. Generally it is on Slice 1 starting from Cylinder 0

Friday, 12 September 2014

Process Scheduling [ nice / renice ] - Solaris


                          

PROCESS SCHEDULING

NICE / RENICE
·         TO ALTER DEFAULT PRIORITY OF PROCESS’S
·         Every process has a nice value ranging from 0-39
·         Higher the nice value lower the priority
·         By default user process starts with nice value 20
·         NICE command is used to alter the default priority at starting time, means at the time of execution
·         Later if we want to change pri. Of a running process, we need to use RENICE


Let’s try to understand this via examples

root@sol-test-2:>/# nice -n 10 find ./ -name core &
[1] 27955

Process Types [ fg / bg ] + Signals - Solaris


PROCESS TYPES


FOREGROUND (FG)  / BACKBROUND (BG)
-      bg is used in mount option in /etc/vfstab to mount remote shared mounts in background, if it unmounted / mountd is not working
-      fg mount is default

Let’s have some example …
root@sol-test-2:>/# find ./ -name core &
[1] 27816
root@sol-test-2:>/# find ./ -name statsrep &
[2] 27817
root@sol-test-2:>/# find ./ -name nautilus &
[3] 27818

Wednesday, 10 September 2014

System Processes- Solaris

                                                                                                
                                                            SYSTEM PROCESSES

Well… Process that is running on system is called System Process… Ha ha hah…
OK…OK… sorry for the excellent explanation… but it is more or less TRUE,

First what is Process?
Any running Program … right?  
Fine and that running program can run anywhere a/c to requirement, here it is running on system so it’s called SYSTEM PROCESSES.
How do we identify a process? Simple question… just as any organization identifies their employees … by employee id. It’s same here but called Process ID (every running Pr. Has a unique PID)

Tuesday, 9 September 2014

Quota's - Solaris

                                                                                
                                                                    QUOTA
Well… what is this quota system ?

Suppose I have a 73g HDD, in which I had given 30g for /export/home, I have 40 users in system.
This is a fair amount I had given for users, but I have no control over their uses, which users is consuming how much disk

Space is completely unknown to me until I run a scan, it might be possible that a single user can use 25g alone, in that case what should I have to do?