Thursday, January 19, 2012

Creating volume with Sun StorageTek Common Array Manager (CAMS)

Some terminology:

Storage Pool: We can now take all or part of the disks in the array and attach a profile to it. This would mean that all the disks in this pool would have the RAID level, the segment size, read ahead property, etc of the storage profile that was attached to it.

Virtual Disks: We can think of virtual disks as groups of physical disks on which the volumes are created.

Volumes: From the Storage Pool that we created we could create one or more volumes. The volume that we create will be the ones that the servers see as disks. We can then mount filesystems on them, or use them as raw devices from the server side.

Mappings: The volumes that we create are now mapped onto controllers. A volume can only be mapped/attached to one controller. It's through the ports of the controller that the volume talks to the server.

Controller Ports: Controller usually have multiple ports, where each port could have a speed of say 2Gbps or 4 Gbps or something. If our controller has 4 x 4 Gbps ports, and you have connected Links from the 4 ports to the server, then you'll have 4 different paths leading to the same LUN.We  could use MpxIO to fold the 4 paths into a single path on the server side.
Note that if we are using only 1 x 4 Gbps port of your controller, and converting Gbps to MB/sec,  that you can get a throughput of around 500 MB/sec.

Here are the steps to create a Volume using Sun StorageTek Common Array Manager(CAMS):
Start with creating a Profile → Storage Pool → Create a new Volume → Map the Volume to a controller.
Now when you do a format from the server(Solaris) side you'll see the LUNs that you have created. 


f you want to create 7 volumes out of 14 disks, each having 2 disk,
first create a profile with 2 disks

name : raid0_RA
Raid : RAID)
Segment L 512KB
Noof disk: 2
Disk type : Any

Assign that profile to a pool

name : RA_POOL
storage profile: raid0_RA


Create volume out of that pool, select Currently unassigned disk ; Select specific disks to be used; choose two disk from the list; give a volume name, select number ot create as 1; assign it a 
controller ; Map to the default storage domain and select ok.;



Volume Name: vol7
Volume Capacity:  Fill One Virtual Disk with volumes of size 930.523 GB
Pool Name: raid0_pool
Storage Profile: raid0
Storage Characteristics: RAID:0, Segment Size: 512 KB, Read-Ahead: false, Number Of Disks: 2, Disk Type: ANY
Virtual Disk Name: Create New Virtual Disk Using the Following Drives: [t85d16, t85d15]
Controller: B
Mapping To: Default Storage Domain - LUN:7

If you do not care about which disks are getting assigned and you want to create 7 volumes for LDOM OS disk, you can create a profile namely ldom_disk and assign it 7 disks. You can then create a pool out of it and create 7 volumes from that pool with each containing one virtual disk.

On the server side,run devfsadm -Cv. Also, check the OS device name on which the HBA is attached and issue cfgadm -al  | grep c<portnumber> to verify that you can view all the volumes.  You can also run the following command : cfgadm -al -o show_FCP_dev c2 to see all the FC devices on the C<portnumber> controller



Friday, January 6, 2012

Setup domainname in Solaris 11

  • svcadm disable nis/domain
  • svccfg -s svc:/network/nis/domain listprop config/domainname
  • svccfg -s svc:/network/nis/domain setprop config/domainname = <your domain name>
  • svccfg -s nis/domain:default refresh
  • svcadm enable nis/domain
  • Verify that domainname is setup correctly
    • domainname

Vi : Some tricks

  • You can remove carriage return ( ^M ) characters with the following command:
    • :1,$s/^M//g Note: To input the ^M character, press Ctrl-v , and then press Enter or return.
       

Sudo Installation

Open Office : Some tricks

  • Convert text to columns in Open Office:


  • If slide panel is not docking back to its original position
    • Click View, check Slide Panel so that you can view Slide Panel
    • Hold down CTRL then double click on the gray area near the word "Slides" on the Slide Panel and it will dock itself in the right place
  • Create graph from existing values
    • Say you want Column A as X axis and Column B as y axis.
    • Select the two columns and select "insert graph" option from the menu.
    •  The  DATA RANGE will show:
      • $Sheet1.$A$1:$B$101  replace that with
      • $B1:$B$101   (the  start and end row number of Column B)
      • Click next: On data series , insert the following in categories:
        $A$1:$A$101 (The start and end row number of Column A )
         
 
 

Fiber Channel Storage: Figure out what is attached

  • Find out how many HBA ports the server has
    • fcinfo hba-port | grep HBA
      • HBA Port WWN: 2100001b32016904
      • HBA Port WWN: 2101001b32216904
      • HBA Port WWN: 2100001b3214bf2b
      • HBA Port WWN: 2101001b3234bf2b
    • fcinfo hba-port | grep "OS Device Name"
      • OS Device Name: /dev/cfg/c8
      • OS Device Name: /dev/cfg/c9
      • OS Device Name: /dev/cfg/c1
      • OS Device Name: /dev/cfg/c10
    •  fcinfo hba-port | grep State
      • State: online
      • State: online
      • State: online
      • State: online
  • Issue cfgadm command to find out the ports attached to the OS devices
    • cfgadm -al  | more
    • Ap_Id                          Type         Receptacle   Occupant     Condition
    • c1                             fc-private   connected    configured   unknown
    • c1::201400a0b8563966           disk         connected    configured   unknown
    • c8::200600a0b82aa8e3           disk         connected    configured   unknown
    • c9                             fc-private   connected    configured   unknown
    • c9::200700a0b82aa8e3           disk         connected    configured   unknown
    • c10                            fc-private   connected    configured   unknown
    • c10::201500a0b8563966          disk         connected    configured   unknown
  • On the storage side, find the ports and match them with the ids next to OS device name
  • To find out the disk name as listed in format command, refer to the WWN number listed in the volume sections of the storage 
Look at the mapping section on storage side
     Volume name     Controller   LUN
       V1                    A               0
 
This matches to <controller id for A>,0 on format command



  • Verify if multipathing is enabled on a disk
    • mpathadm show lu
      /dev/rdsk/c0t600A0B800056396600000FDB4EBC22C4d0s0