Pages

Saturday, January 12, 2013

sccli command examples

Yesterday I finally managed to reinstall a V480 with Solaris and a attached StorEdge 3310. Beneath a few example how to install the required software and how to use the command line tool sccli on Solaris Sparc.

Install and start

After you have downloaded the package SUNWcscc unzip it (as far as I can tell you need a Oracle subscription to get access to that software):

# unzip p10310598_250_Generic.zip
...


The zip file contains another zip file:

# unzip SSCS-2.5.zip
...


Change into the appropiate directory for your host (mine is Solaris Sparc) and install the software:

# cd SSCS/2.5.0.9/solaris/sparc
# pkgadd -d 2.5_fw_solaris_sparc.pkg
...


Set passwords for newly created users ssmon, ssadmin, ssconfig:

# passwd ssmon
...
# passwd ssadmin
...
# passwd ssconfig
...


Start Sun StorEdge daemon:

# /etc/init.d/ssagent enable start

Set PATH variable:

# export PATH=$PATH:/opt/SUNWsscs/sbin

Start Sun StorEdge command line interface:

# sccli

Get familar with the StorEdge

First you should take closer look at your channels, disks etc. My setup is ver basic, just a Split-Bus configuration with a single host. For the beginning the show command will reveal most information:

sccli> show channels
Ch  Type    Media   Speed   Width  PID / SID
--------------------------------------------
 0  Drive   SCSI    80M     Wide     6 / 7
...


Depending on your StorEdge you will see various information about SCSI, FC, LAN etc. I have only a few SCSI disks attached to channel 0:

sccli> show disk
Ch     Id      Size   Speed  LD     Status     IDs                      Rev
----------------------------------------------------------------------------
...
 0      8   68.37GB   160MB  NONE   FRMT       FUJITSU MAP3735N SUN72G  0401
                                                   S/N 00Q0D4R6
 0      9   68.37GB   160MB  NONE   FRMT       FUJITSU MAP3735N SUN72G  0401
                                                   S/N 00Q0D4C3
...


Create a mirrored Lun

To create a mirrored Lun use the create logical-drive command:

sccli> create logical-drive raid1 0.8-9
sccli: created logical drive 38786CCF


Where raid1 is the the raid level you want to use and 0.0-1 defines the disks you want to use. In my case I am using disk 8 and disk 9 on channel 0. Next run the show logical-drive command to check the logical-drive:

sccli> show logical-drive
LD    LD-ID        Size  Assigned  Type   Disks Spare  Failed Status
------------------------------------------------------------------------
ld0   38786CCF  68.12GB  Primary   RAID1  2     0      0      Good  I
                         Write-Policy Default          StripeSize 128KB


Create a striped Lun with a specific size

Creating a striped Lun is very similar to creating a mirrored Lun, you just define another raid level:

sccli> create logical-drive raid0 size 100GB 0.5 0.10
sccli: created logical drive 6769C779


And check that is was created:

sccli> show logical-driv
LD    LD-ID        Size  Assigned  Type   Disks Spare  Failed Status
------------------------------------------------------------------------
...
ld1   6769C779 100.00GB  Primary   RAID0  2     0      0      Good
                         Write-Policy Default          StripeSize 128KB
...


Map a Lun to a host

The last step on storage side is to map the Lun to a host. My host is connected to channel 1 so I mapped my first lun as target 0 and lun 0:

sccli> map 38786CCF channel 1 target 0 lun 0
sccli: mapping ld 38786CCF-00 to 1.0.0


On operating side you need to rescan your SCSI controller to make the new Lun to show up. On Solaris Sparc and X86 run:

# devfsadm -Cv
...
# iostat -En
...
c2t0d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: SUN      Product: StorEdge 3310    Revision: 415F Serial No:
Size: 73.14GB <73139224576 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 2 Predictive Failure Analysis: 0


In case that you can't find the right tool to rescan your SCSI controller reboot the machine. But this should be the last option.

Add disk(s) to a mirrored Lun

One warning: the following does not seem to work, I have added two disks to a already mirrored Lun consisting of two disks but the add disk command is still running after a couple of hours and still at 0.13% and 0.12%. So I keep the following commands uncommented:

sccli> add disk ld0 0.12 0.13
sccli: start adding disks: ld0
sccli> show disk
...
 0     12   68.37GB   160MB  ld0    ADDING     SEAGATE ST373307LSUN72G  0507
                                                   S/N 3HZ7VH7S00007502
                                                Mirror (0.13)
 0     13   68.37GB   160MB  ld0    ADDING     SEAGATE ST373307LSUN72G  0307
                                                   S/N 3HZ6609Q00007414
                                                Mirror (0.12)


Expand a striped Lun

First take a look at the Lun you want to expand:

sccli> show logical-driv
LD    LD-ID        Size  Assigned  Type   Disks Spare  Failed Status
------------------------------------------------------------------------
...
ld1   6769C779 100.00GB  Primary   RAID0  2     0      0      Good
                         Write-Policy Default          StripeSize 128KB
...


The above Lun is already 100GB in size and is striped across to disks. When you want to expand that to 200GB then run the following command:

sccli> expand ld1 50GB online
sccli: start expanding: ld1


You only need 50GB because with two disks you will get 100GB at the end:

sccli> show logical-driv
LD    LD-ID        Size  Assigned  Type   Disks Spare  Failed Status
------------------------------------------------------------------------
...
ld1   6769C779 200.00GB  Primary   RAID0  2     0      0      Good
                         Write-Policy Default          StripeSize 128KB


Just keep in mind that the size parameter for a striped Lun is calculated by the size to expand (100GB) divided by the number of disks (2) for that Lun.

Delete a Lun

Before you begin to delete a Lun you need to prepare your OS eg. umount the Lun etc. Then take a look at your current Luns:

sccli> show logical-drive
LD    LD-ID        Size  Assigned  Type   Disks Spare  Failed Status
------------------------------------------------------------------------
ld0   6158752D 204.35GB  Primary   RAID5  4     0      0      Good
                         Write-Policy Default          StripeSize 256KB
ld1   1F0E8ACB 204.35GB  Primary   RAID5  4     0      0      Good
                         Write-Policy Default          StripeSize 256KB
ld2   7198F0FC 279.15GB  Primary   RAID1  2     0      0      Good
                         Write-Policy Default          StripeSize 256KB


And the mappings for the Luns:

sccli> show lun-maps
Ch Tgt LUN   ld/lv   ID-Partition  Assigned  Filter Map
---------------------------------------------------------------------
 3   0   0   ld2     7198F0FC-00   Primary
 3   0   1   ld0     6158752D-00   Primary
 3   0   2   ld1     1F0E8ACB-00   Primary


Of course you need to unmap a Lun first:

sccli> unmap partition 3.0.0

Then you can delete the Lun:

sccli> delete logical-drive ld2
This operation will result in the loss of all data on the logical drive.
Are you sure? yes
sccli: ld2: deleted logical drive


Links

Oracle Documentation: http://docs.oracle.com/cd/E19673-01/index.html

No comments:

Post a Comment