Thursday, September 12, 2013

Search Multiple Words / String Pattern Using grep Command

From http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/

How do I search multiple strings or words using the grep command? For example I'd like to search word1, word2, word3 and so on within /path/to/file. How do I force grep to search multiple words?

The grep command supports regular expression pattern. To search multiple words, use following syntax:
grep 'word1\|word2\|word3' /path/to/file

In this example, search warning, error, and critical words in a text log file called /var/log/messages, enter:
$ grep 'warning\|error\|critical' /var/log/messages

To just match words, add -w swith:
$ grep -w 'warning\|error\|critical' /var/log/messages

Compare Directories using Diff in Linux

From: http://linuxcommando.blogspot.com/2008/05/compare-directories-using-diff-in-linux.html

To compare 2 files, we use the diff command. How do we compare 2 directories? Specifically, we want to know what files/subdirectories are common, what are only in 1 directory but not the other. 

Unix old-timers may remember the dircmp command. Alas, that command is not available in Linux. In Linux, we use the same diff command to compare directories as well as files.

$ diff  ~peter ~george
Only in /home/peter: announce.doc
diff /home/peter/.bashrc /home/george/.bashrc
76,83d72
<
< # Customization by Peter
< export LESS=-m
< export GREP_OPTIONS='--color=always'
< shopt -s histappend
< shopt -s cmdhist
< export PROMPT_COMMAND="history -a;$PROMPT_COMMAND"
< #echo keycode 58 = Escape |loadkeys -
Only in /home/george: .mcoprc
Only in /home/peter: .metacity
Only in /home/george: .newsticker-images
Only in /home/peter: .notifier.conf
Only in /home/george: targets.txt
Only in /home/peter: .xsession-errors

Without any option, diffing 2 directories will tell you which files only exist in 1 directory and not the other, and which are common files. Files that are common in both directories (e.g., .bashrc in the above listing) are diffed to see if and how the file contents differ.

 If you are NOT interested in file differences, just add the -q (or --brief) option.

diff -q ~peter ~george  |sort
Files /home/peter/.bashrc and /home/george/.bashrc differ
Only in /home/george: .mcoprc
Only in /home/george: .newsticker-images
Only in /home/george: targets.txt
Only in /home/peter: .metacity
Only in /home/peter: .notifier.conf
Only in /home/peter: .xsession-errors
Only in /home/peter: announce.doc

diff orders its output alphabetically by file/subdirectory name. I prefer to group them by whether they are common, and whether they only exist in the first or second directory. That is why I piped the output of diff through sort in the above command. Note that by default diff does not reach into the subdirectories to compare the files and subdirectories at that level. To change its behavior to recursively go down subdirectories, add -r.

  diff -qr ~peter ~george |sort

Creating a StorNext Filesystem (cvfs v4.3 or earlier)

Creating a StorNext Filesystem (cvfs v4.3 or earlier)

You may have just provisioned some new DDN 9900 LUNs or otherwise added new storage to your StorNext based SAN.  You now need to create the filesystem.

Prerequisites:

  • StorNext MDS/MDC (MetaData Server/Controller) in this example this will be built on RHEL
  • A LUN presented to the MDS/MDC system(s) to be used for metadata storage.  This should be fast, capable of large IOPS, and as low latency as possible.
  • LUNs presented to all of your client systems to be used for your data pool where the StorNext file system will be created and you data will be stored.

Overview:

 

CVLABEL - Label the Disks / LUNs for use with StorNext

WARNING: The CVLABEL command is similar to formatting a disk!  Using the wrong device name could result in data loss!

First you need to view the LUNs that are available to StorNext.  This should be done via the StorNext command cvlabel:

NOTE: Using the command cvlabel -c will output information in the same format as is required to make a "cvlabel file" for "labeling" later in the process.

[user@system]# cvlabel -c
CvfsDisk_UNKNOWN /dev/sda    # host 2 lun 0 sectors 1170619103 sector_size 512 inquiry [DotHill DH3000          T230] serial 600C0FF000132F1A8BC8EB4E01000000
CvfsDisk_UNKNOWN /dev/sdb    # host 1 lun 0 sectors 487997407 sector_size 512 inquiry [Adaptec systemOS       V1.0] serial 166D4B28
CvfsDisk_UNKNOWN /dev/sdd    # host 2 lun 0 sectors 9376430047 sector_size 512 inquiry [DDN     S2A 9900        6.11] serial 60001FF01590A361000001000008BB85
CvfsDisk_UNKNOWN /dev/sdp    # host 2 lun 1 sectors 9376430047 sector_size 512 inquiry [DDN     S2A 9900        6.11] serial 60001FF0157EA47E010001000008BB85
CvfsDisk_UNKNOWN /dev/sdv    # host 2 lun 2 sectors 9376430047 sector_size 512 inquiry [DDN     S2A 9900        6.11] serial 60001FF01590A3C8020001000008BB85

Output this same info to a file cvlabel -c >> /path/to/file.txt to then manipulate it for "labeling".  Remove all LUNs that are not applicable by running the output through the grep command to focus on only the DotHill for metadata LUNs, DDN for data LUNs, or all LUNs from a particular host if you have multiple paths to your storage.  (ex: cvlabel -c | grep "host 2" | grep DDN >> /path to file or if you know how the system or OS disk will be presented you can show everything but that cvlabel -c | grep -v Adaptec >> /path to file)

 

The resulting info breaks down as follows:

CvfsDisk_UNKNOWN = StorNext Label

/dev/sda = Device

# host 2 lun 0 sectors 1170619103 sector_size 512 inquiry = commented (unused) info about the LUN to detarmain source

[DotHill DH3000 T230] = [ Vendor info ]

serial 600C0FF000132F1A8BC8EB4E01000000 = LUN / Disk serial number

 

Replace CvfsDisk_UNKNOWN with the desired label (ex: LUN14 to LUN16) in the text file.

META_LUN2 /dev/sda 1170619103 EFI    # host 2 lun 0 sectors 1170619103 sector_size 512 inquiry [DotHill DH3000          T230] serial 600C0FF000132F1A8BC8EB4E01000000
LUN14 /dev/sdd 9376430047 EFI    # host 2 lun 0 sectors 9376430047 sector_size 512 inquiry [DDN     S2A 9900        6.11] serial 60001FF01590A361000001000008BB85
LUN15 /dev/sdp 9376430047 EFI    # host 2 lun 1 sectors 9376430047 sector_size 512 inquiry [DDN     S2A 9900        6.11] serial 60001FF0157EA47E010001000008BB85
LUN16 /dev/sdv 9376430047 EFI    # host 2 lun 2 sectors 9376430047 sector_size 512 inquiry [DDN     S2A 9900        6.11] serial 60001FF01590A3C8020001000008BB85

 NOTE:  If you have redundant paths you only have to label each LUN once on any one of the paths, not once per path.  Also, be sure LUN labels are unique per LUN, meaning, LUN1 may be presented multiple times but in the storage device (DDN) there is only one LUN1.  If multiple unique LUNs are given the same names data corruption may occur!

 

Apply the label(s) using cvlabel /path/to/cvlabel/file.txt: (ex: cvlabel.txt)

NOTE: Be sure the LUN_label - to - device association in the file is correct or data loss could occur!  You will be prompted for each LUN prior to making changes, please read all the information completely before proceeding.

[user@system]# cvlabel cvlabel.txt

*WARNING* This program will over-write volume labels on the
          devices specified in the file "cvlabel.txt".

          After execution, the devices will only be usable by the
          StorNext. You will have to re-partition the
          devices to use them on a different file system.


Do you want to proceed? (Y / N) -> y

/dev/sdd   [DDN     S2A 9900        6.11] SNFS-EFI "LUN14"  Controller 'DAE54B28', Serial 'DAE54B28', Sector Size 512, Sectors 9376430047 (4.8TB), GUID 99a524b2-f943-11e2-b832-00259004d1b4 [Tue Jul 30 11:12:31 2013 00:25:90:04:d1:b4]

Disk "/dev/sdd" already has a valid label, and is being changed:

- The ctq_depth is changing from 0 to 16.
  This may change disk performance on IRIX systems.

Warning: The raw capacity (9376430047 sectors) of disk "/dev/sdd" might make it unusable by some older Solaris systems.

Warning: Because it will use an EFI label, disk "/dev/sdd" will not be usable by earlier StorNext releases.

Do you want to re-label it SNFS-EFI - Name: LUN14 Sectors: 9376430047 (Y / N) -> y
New Volume Label -Device: /dev/sda  SNFS Label: LUN14  Sectors: 9376430047.

 

Making the File System Config File

In some cases you are able to use an existing file system config file (or the following) and simply change a few parts to add additional file systems to an existing SAN.  For this example we will use the following existing file: volA.cfgx

<?xml version="1.0"?>
<configDoc xmlns="http://www.quantum.com/snfs" version="1.0">
  <config configVersion="0" name="volA" fsBlockSize="16384" journalSize="16777216">
    <globals>
      <abmFreeLimit>false</abmFreeLimit>
      <allocationStrategy>round</allocationStrategy>
      <haFsType>HaUnmanaged</haFsType>
      <bufferCacheSize>33554432</bufferCacheSize>
      <cvRootDir>/</cvRootDir>
      <storageManager>false</storageManager>
      <dataMigrationThreadPoolSize>128</dataMigrationThreadPoolSize>
      <debug>00000000</debug>
      <dirWarp>true</dirWarp>
      <extentCountThreshold>32768</extentCountThreshold>
      <enforceAcls>false</enforceAcls>
      <fileLocks>false</fileLocks>
      <fileLockResyncTimeOut>20</fileLockResyncTimeOut>
      <forcePerfectFit>false</forcePerfectFit>
      <fsCapacityThreshold>0</fsCapacityThreshold>
      <globalSuperUser>true</globalSuperUser>
      <inodeCacheSize>65536</inodeCacheSize>
      <inodeExpandMin>0</inodeExpandMin>
      <inodeExpandInc>0</inodeExpandInc>
      <inodeExpandMax>0</inodeExpandMax>
      <inodeDeleteMax>0</inodeDeleteMax>
      <inodeStripeWidth>0</inodeStripeWidth>
      <maxConnections>32</maxConnections>
      <maxLogSize>4194304</maxLogSize>
      <maxLogs>4</maxLogs>
      <remoteNotification>false</remoteNotification>
      <reservedSpace>true</reservedSpace>
      <fsmRealTime>false</fsmRealTime>
      <fsmMemLocked>false</fsmMemLocked>
      <opHangLimitSecs>180</opHangLimitSecs>
      <perfectFitSize>131072</perfectFitSize>
      <quotas>false</quotas>
      <restoreJournal>false</restoreJournal>
      <restoreJournalDir/>
      <restoreJournalMaxHours>0</restoreJournalMaxHours>
      <restoreJournalMaxMb>0</restoreJournalMaxMb>
      <stripeAlignSize>0</stripeAlignSize>
      <trimOnClose>0</trimOnClose>
      <threadPoolSize>64</threadPoolSize>
      <unixDirectoryCreationModeOnWindows>777</unixDirectoryCreationModeOnWindows>
      <unixIdFabricationOnWindows>false</unixIdFabricationOnWindows>
      <unixFileCreationModeOnWindows>777</unixFileCreationModeOnWindows>
      <unixNobodyUidOnWindows>501</unixNobodyUidOnWindows>
      <unixNobodyGidOnWindows>501</unixNobodyGidOnWindows>
      <windowsSecurity>false</windowsSecurity>
      <eventFiles>true</eventFiles>
      <eventFileDir/>
      <allocSessionReservationSize>1073741824</allocSessionReservationSize>
    </globals>
    <diskTypes>
      <diskType typeName="MetaDrive" sectors="1170619103" sectorSize="512"/>
      <diskType typeName="DataDrive" sectors="9376430047" sectorSize="512"/>
    </diskTypes>
    <stripeGroups>
      <stripeGroup index="0" name="MetaFiles" status="up" stripeBreadth="65536" read="true" write="true" metadata="true" journal="true" userdata="false" realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0" realTimeMBReserve="0" realTimeTokenTimeout="0" multipathMethod="rotate">
        <disk index="0" diskLabel="META_LUN0" diskType="MetaDrive" ordinal="0"/>
      </stripeGroup>
      <stripeGroup index="1" name="DataFiles_0" status="up" stripeBreadth="1048576" read="true" write="true" metadata="false" journal="false" userdata="true" realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0" realTimeMBReserve="0" realTimeTokenTimeout="0" multipathMethod="rotate">
        <affinities exclusive="false">
          <affinity>data0</affinity>
        </affinities>
        <disk index="0" diskLabel="LUN0" diskType="DataDrive" ordinal="1"/>
        <disk index="1" diskLabel="LUN1" diskType="DataDrive" ordinal="2"/>
        <disk index="2" diskLabel="LUN2" diskType="DataDrive" ordinal="3"/>
        <disk index="3" diskLabel="LUN3" diskType="DataDrive" ordinal="4"/>
        <disk index="4" diskLabel="LUN4" diskType="DataDrive" ordinal="5"/>
        <disk index="5" diskLabel="LUN5" diskType="DataDrive" ordinal="6"/>
        <disk index="6" diskLabel="LUN6" diskType="DataDrive" ordinal="7"/>
        <disk index="7" diskLabel="LUN7" diskType="DataDrive" ordinal="8"/>
        <disk index="8" diskLabel="LUN8" diskType="DataDrive" ordinal="9"/>
        <disk index="9" diskLabel="LUN9" diskType="DataDrive" ordinal="10"/>
      </stripeGroup>
    </stripeGroups>
  </config>
</configDoc>

 

The above file can be copied to make a new file system config file with some changes: volB.cfgx

<?xml version="1.0"?>
<configDoc xmlns="http://www.quantum.com/snfs" version="1.0">
  <config configVersion="0" name="volB" fsBlockSize="16384" journalSize="16777216">
    <globals>
      <abmFreeLimit>false</abmFreeLimit>
      <allocationStrategy>round</allocationStrategy>
      <haFsType>HaUnmanaged</haFsType>
      <bufferCacheSize>33554432</bufferCacheSize>
      <cvRootDir>/</cvRootDir>
      <storageManager>false</storageManager>
      <dataMigrationThreadPoolSize>128</dataMigrationThreadPoolSize>
      <debug>00000000</debug>
      <dirWarp>true</dirWarp>
      <extentCountThreshold>32768</extentCountThreshold>
      <enforceAcls>false</enforceAcls>
      <fileLocks>false</fileLocks>
      <fileLockResyncTimeOut>20</fileLockResyncTimeOut>
      <forcePerfectFit>false</forcePerfectFit>
      <fsCapacityThreshold>0</fsCapacityThreshold>
      <globalSuperUser>true</globalSuperUser>
      <inodeCacheSize>65536</inodeCacheSize>
      <inodeExpandMin>0</inodeExpandMin>
      <inodeExpandInc>0</inodeExpandInc>
      <inodeExpandMax>0</inodeExpandMax>
      <inodeDeleteMax>0</inodeDeleteMax>
      <inodeStripeWidth>0</inodeStripeWidth>
      <maxConnections>32</maxConnections>
      <maxLogSize>4194304</maxLogSize>
      <maxLogs>4</maxLogs>
      <remoteNotification>false</remoteNotification>
      <reservedSpace>true</reservedSpace>
      <fsmRealTime>false</fsmRealTime>
      <fsmMemLocked>false</fsmMemLocked>
      <opHangLimitSecs>180</opHangLimitSecs>
      <perfectFitSize>131072</perfectFitSize>
      <quotas>false</quotas>
      <restoreJournal>false</restoreJournal>
      <restoreJournalDir/>
      <restoreJournalMaxHours>0</restoreJournalMaxHours>
      <restoreJournalMaxMb>0</restoreJournalMaxMb>
      <stripeAlignSize>0</stripeAlignSize>
      <trimOnClose>0</trimOnClose>
      <threadPoolSize>64</threadPoolSize>
      <unixDirectoryCreationModeOnWindows>777</unixDirectoryCreationModeOnWindows>
      <unixIdFabricationOnWindows>false</unixIdFabricationOnWindows>
      <unixFileCreationModeOnWindows>777</unixFileCreationModeOnWindows>
      <unixNobodyUidOnWindows>501</unixNobodyUidOnWindows>
      <unixNobodyGidOnWindows>501</unixNobodyGidOnWindows>
      <windowsSecurity>false</windowsSecurity>
      <eventFiles>true</eventFiles>
      <eventFileDir/>
      <allocSessionReservationSize>1073741824</allocSessionReservationSize>
    </globals>
    <diskTypes>
      <diskType typeName="MetaDrive" sectors="xxxxxxxxxx" sectorSize="512"/>
      <diskType typeName="DataDrive" sectors="xxxxxxxxxx" sectorSize="512"/>
    </diskTypes>
    <stripeGroups>
      <stripeGroup index="0" name="MetaFiles" status="up" stripeBreadth="65536" read="true" write="true" metadata="true" journal="true" userdata="false" realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0" realTimeMBReserve="0" realTimeTokenTimeout="0" multipathMethod="rotate">
        <disk index="0" diskLabel="META_LUN2" diskType="MetaDrive" ordinal="0"/>
      </stripeGroup>
      <stripeGroup index="1" name="DataFiles_0" status="up" stripeBreadth="1048576" read="true" write="true" metadata="false" journal="false" userdata="true" realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0" realTimeMBReserve="0" realTimeTokenTimeout="0" multipathMethod="rotate">
        <affinities exclusive="false">
          <affinity>data0</affinity>
        </affinities>
        <disk index="0" diskLabel="LUN14" diskType="DataDrive" ordinal="1"/>
        <disk index="1" diskLabel="LUN15" diskType="DataDrive" ordinal="2"/>
        <disk index="2" diskLabel="LUN16" diskType="DataDrive" ordinal="3"/>
      </stripeGroup>
    </stripeGroups>
  </config>
</configDoc>

 NOTE: The following is the minimum amount of info that needs to be changed (needs to be unique across file systems or data loss can occur)!  The name of the file needs to match the file system name.  Additionally, based on the info gathered from running the CVLABEL command earlier, be sure to reflect the new metadata label and sectors and data label and sectors from the cvlabel output.

CVMKFS - Make the File System

The cvmkfs command is used to create / format the StorNext file system using the .cfgx file. Be sure to use the file system name and not the file name (ex: use cvmkfs volB not cvmkfs volB.cfgx)

[user@system]# cvmkfs volB
Checked Build disabled - default.
StorNext File System Initializer.

** WARNING ** This will destroy all contents and data of the

              --- [volB] ---

              file system. Re-initialization cannot be un-done!

Do you want to proceed? (Y/[N]) -> y

Re-initializing file system 'volB'.


*Warning*: Inode Expand Min is deprecated and will no longer be supported in future releases
*Warning*: Inode Expand Max is deprecated and will no longer be supported in future releases
*Warning*: Inode Expand Inc is deprecated and will no longer be supported in future releases
*Warning*: AllocationStrategy must be Round Robin ("round") when AllocSessionReservation is enabled.  Ignoring current setting.

Shared Meta Data File System.
Meta Data Root is on "MetaFiles".
Resetting Arbitration Block.
Writing Configuration Information Block.
Writing Root Directory Block.
Writing Disk Information Block.
Writing Stripe Group Index "MetaFiles".
Writing Stripe Group Index "DataFiles_0".
Resetting File System Journal.
Creating Free List.
Writing Initial 512 Inodes.
Inode block size is 1024 bytes.
Writing Initialization Control Block.
Setting "Force Stripe Alignment"
Resetting Super Block.
Writing Reserved Allocations.

File system 'volB' successfully created.

 

Bringing the New File System Online

Using the cvadmin interactive console you need to start then activate the file system:

[user@system]# cvadmin
StorNext Administrator

Enter command(s)
For command help, enter "help" or "?".

List FSS

File System Services (* indicates service is in control of FS):

No FSSs are active.
Select FSM "none"


snadmin> start volB
Starting FSS locally.
Start FSS "volB"

FSS 'volB' start initiated.
FSS 'volB' started.

snadmin> select
List FSS

File System Services (* indicates service is in control of FS):
 1> volB[0]              located on Venice02:36526 (pid 4814)

No FSSs are active.

snadmin> activate volB
Activate FSM "volB"

 Created           :    Wed Sep 11 17:37:36 2013
 Active Connections:    0
 Fs Block Size     :    4K
 Msg Buffer Size   :    4K
 Disk Devices      :    4
 Stripe Groups     :    2
 Fs Blocks         :    3071783232 (11.44 TB)
 Fs Blocks Free    :    3070700352 (11.44 TB) (99%)


snadmin (volB) > select
List FSS

File System Services (* indicates service is in control of FS):
 1>*volB[0]              located on Venice02:36526 (pid 4814)


snadmin (volB) > _

NOTE: the select command can be used to "refresh" the list of file systems.  Notice there is no * next to the file system prior to activation, the presence of an * indicates the file system is active.

 

Now the file system needs to me mounted for use:

[user@system]# mkdir /media/volB
[root@Venice02 ~]# mount -t cvfs volB /media/volB/
mount.cvfs: Filesystem volB mounted on /media/volB
[user@system]# mount
/dev/sdb1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/cvfsctl1_volB on /media/volB type cvfs (rw,sparse=yes)

Your new file system should now me usable / mountable by any of your SAN clients.

Making the New File System Automatically Online and Mount Across Reboots

 The file system needs to be listed among the file systems being managed my this server (by the FSM service).  This means the file system name needs to be added to /usr/cvfs/config/fsmlist file within the MDS.

NOTE: If running multiple MDSes for failover / high availability you will need to do the following on both servers.

Edit the file /usr/cvfs/config/fsmlist and add the following:

volB . 0

NOTE: On the secondary MDS change the 0 to a 1:

volB . 1

You then need to add the mount to /etc/fstab:

LABEL=/                 /                       ext3    defaults        1 1
LABEL=backup            /mnt/backup             ext3    noauto          0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=swap              swap                    swap    defaults        0 0
volB                    /media/volB             cvfs    rw              0 0

 NOTE: It is a good idea to backup the file before making changes.

Your new filesystem should now be usable locally and persistent after reboot.

Tuesday, September 10, 2013

VIM substitution to prepare XML code samples for HTML blogs

I sometimes need to include XML code samples in my blogs.  When I do this I need a quick way to format it for HTML, more specifically, format it for whatever blogging software I'm using.  Since it is infrequent I just use VIM substitution (I know, I could do this in SED but for now VIM is good enough)

From http://vim.wikia.com/wiki/Search_and_replace:
:%s/foo/bar/g
Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.

I search for < or > then replace them with &lt; or &gt; and done.

:%s/</\&lt\;/g to replace all instances of < with &lt;
:%s/>/\&gt\;/g to replace all instances of > with &gt;

Thursday, September 5, 2013

Adding Disks and Creating LUNs in DDN9900 and DDN S7000 Chassis

Installing disks into a DDN enclosure

There are four different enclosure configurations for a DDN based SAN: 5, 10, or 20 enclosures

5 Enclosures (SS7000_1X Enclosure mapping)

BACK
I/O Modules
PSU
25 26 27 28 29 30
DIMMs
25 26 27 28 29 30
19 20 21 22 23 24 19 20 21 22 23 24
13 14 15 16 17 18 13 14 15 16 17 18
7 8 9 10 11 12 7 8 9 10 11 12
1 2 3 4 5 6 1 2 3 4 5 6
A B
FRONT

10 Enclosures (SS7000_2X Enclosure mapping)

BACK
I/O Modules
PSU
49 50 51 52 53 54
DIMMs
55 56 57 58 59 60
37 38 39 40 41 42 43 44 45 46 47 48
25 26 27 28 29 30 31 32 33 34 35 36
13 14 15 16 17 18 19 20 21 22 23 24
1 2 3 4 5 6 7 8 9 10 11 12
A
FRONT

20 Enclosures (SS7000_2X Enclosure mapping)

BACK
I/O Modules
PSU
49 50 51 52 53 54
DIMMs
55 56 57 58 59 60
37 38 39 40 41 42 43 44 45 46 47 48
25 26 27 28 29 30 31 32 33 34 35 36
13 14 15 16 17 18 19 20 21 22 23 24
1 2 3 4 5 6 7 8 9 10 11 12
A
FRONT
BACK
I/O Modules
PSU
109 110 111 112 113 114
DIMMs
115 116 117 118 119 120
97 98 99 100 101 102 103 104 105 106 107 108
85 86 87 88 89 90 91 92 93 94 95 96
73 74 75 76 77 78 79 80 81 82 83 84
61 62 63 64 65 66 67 68 69 70 71 72
A
FRONT

 

Here is an example of a 5 enclosure install already populated with "14 tiers" of disks:

BACK
I/O Modules
PSU
25 26 27 28 29 30
DIMMs
25 26 27 28 29 30
19 20 21 22 23 24 19 20 21 22 23 24
13 14 15 16 17 18 13 14 15 16 17 18
7 8 9 10 11 12 7 8 9 10 11 12
1 2 3 4 5 6 1 2 3 4 5 6
A B
FRONT
BACK
I/O Modules
PSU
25 26 27 28 29 30
DIMMs
25 26 27 28 29 30
19 20 21 22 23 24 19 20 21 22 23 24
13 14 15 16 17 18 13 14 15 16 17 18
7 8 9 10 11 12 7 8 9 10 11 12
1 2 3 4 5 6 1 2 3 4 5 6
C D
FRONT
BACK
I/O Modules
PSU
25 26 27 28 29 30
DIMMs
25 26 27 28 29 30
19 20 21 22 23 24 19 20 21 22 23 24
13 14 15 16 17 18 13 14 15 16 17 18
7 8 9 10 11 12 7 8 9 10 11 12
1 2 3 4 5 6 1 2 3 4 5 6
E F
FRONT
BACK
I/O Modules
PSU
25 26 27 28 29 30
DIMMs
25 26 27 28 29 30
19 20 21 22 23 24 19 20 21 22 23 24
13 14 15 16 17 18 13 14 15 16 17 18
7 8 9 10 11 12 7 8 9 10 11 12
1 2 3 4 5 6 1 2 3 4 5 6
G H
FRONT
BACK
I/O Modules
PSU
25 26 27 28 29 30
DIMMs
25 26 27 28 29 30
19 20 21 22 23 24 19 20 21 22 23 24
13 14 15 16 17 18 13 14 15 16 17 18
7 8 9 10 11 12 7 8 9 10 11 12
1 2 3 4 5 6 1 2 3 4 5 6
P S
FRONT

 

Tier Information:
-----------------

                         Space
             Capacity  Available     Disk
Tier Owner     (MiB)     (MiB)      Status                LUN List
-----------------------------------------------------------------------------
   1 +  1     4578344          0  ABCDEFGHPS  0 
   2 +  2     4578344          0  ABCDEFGHPS  1 
   3 +  1     4578344          0  ABCDEFGHPS  2 
   4 +  2     4578344          0  ABCDEFGHPS  3 
   5 +  1     4578344          0  ABCDEFGHPS  4 
   6 +  2     4578344          0  ABCDEFGHPS  5 
   7 +  1     4578344          0  ABCDEFGHPS  6 
   8 +  2     4578344          0  ABCDEFGHPS  7 
   9 +  1     4578344          0  ABCDEFGHPS  8 
  10 +  2     4578344          0  ABCDEFGHPS  9 
  11 +  1     4578344          0  ABCDEFGHPS  10 
  12 +  2     4578344          0  ABCDEFGHPS  11 
  13 +  1     4578344          0  ABCDEFGHPS  12 
  14 +  2     4578344          0  ABCDEFGHPS  13 

Verifying TIER 1, 38.3%, Continuous.
Verifying TIER 3,  0.4%, Continuous.
Verifying TIER 8, 83.1%, Continuous.
Verifying TIER 10, 71.2%, Continuous.
All disks are healthy.

  Automatic disk restarting:   Disabled
  Automatic disk rebuilding:   Enabled
  Automatic SMART replacement: Disabled
  Maximum active rebuilds:     4
  Maximum active verifies:     2
  System rebuild extent:       64 MiB
  System rebuild delay:        10
  System delay IO limit:       0
  Journaling:                  Enabled                                     
                                     
              System Capacity 64096816 MiB, 0 MiB available.

 

If you were to add additional drives, say 30 drives for a total of 3 new tiers (10 drives per tier), you would add them to "15", "16", and "17" of each of the five enclosures.

BACK
I/O Modules
PSU
25 26 27 28 29 30
DIMMs
25 26 27 28 29 30
19 20 21 22 23 24 19 20 21 22 23 24
13 14 15 16 17 18 13 14 15 16 17 18
7 8 9 10 11 12 7 8 9 10 11 12
1 2 3 4 5 6 1 2 3 4 5 6
A B
FRONT

...

 Once the disks are installed you will create internal LUNs.  For ease of configuration use one LUN per Tier.  You will use the command lun add=<LUN#>:

NOTE: LUN numbers start at "0" but Tier numbers start at "1".  In our example, Tier 15 will be used to create LUN 14 which we label "LUN14"

S2A 9900[1]: lun add=14

Enter a label for LUN 14 (up to 16 characters): LUN14

Enter the capacity (in Mbytes) for LUN 14, LUN14

0 for all available capacity (default): 0

Enter the number of tiers (1..8)

Default will auto select, 'e' to escape: 1

Enter the tiers, each one on a new line, or 'e' to escape:
15

Enter the block size, (512, 1024, 2048, 4096)
Default is 512, 'e' to escape: 512

Attempting to add LUN 14
Operation successful: LUN 14 was added to the system.

The LUN must be formatted before it can be used.

Would you like to format the LUN now? (y/N): Y

INFO INIT_137 1-22 18:48:21 Starting Format of LUN 14

NOTE: The lines that say (default) in them will allow simply hitting the ENTER key to apply the default value instead of entering a value.

 

Repeat the above for each internal LUN / Tier that has been added.

NOTE: Each LUN / Tier will be "owned" by the controller that was used to create it.  To "load balance" the creation of LUNs you can alternate creation between both controllers.

 

 The following will need to be done on each controller individually

Next we need to present, or map, the internal LUN / Tier through the fiber ports as "external" LUNs.  This is done using the zoning edit=n command:

NOTE: zoning edit can be invoked without specifying a port number (=n) in which case you will be asked to specify a port number.

  S2A 9900[1]: zoning edit=1

  Enter the new LUN zoning for host port 1.

  Enter the unique LUN mapping, as follows:

  G.l   GROUP.LUN number
  P     Place-holder
  R     Before GROUP.LUN to indicate Read-Only
  N     Clear current assignment
 ENTER  No change
  E     Exit command
  ?     Display detailed help text

External LUN 0: is not mapped.  Enter new internal LUN:

NOTE: zoning edit will cycle through each external LUN number even after you have passed the number of available internal LUNs / Tiers, to escape the loop type e

CAUTION: Changes take effect immediately!  If you accidentally change the mapping for an existing LUN it could cause data loss/corruption and will most-likely at least interrupt (offline) the SAN.  Changes should be done carefully.  Mistakes are best avoided by focusing on each line individually, the line will indicate current LUN mappings.  When in doubt strike the ENTER key or use e to escape and start over.

 

Next, run tier verify=on to allow the controller to continuously check the tier for disk related problems.

S2A 9900[1]: tier verify=on

                             Tier Status     

                         Space
             Capacity  Available     Disk
Tier Owner     (MiB)     (MiB)      Status                LUN List
-----------------------------------------------------------------------------
   1 +  1     4578344          0  ABCDEFGHPS  0 
   2 +  2     4578344          0  ABCDEFGHPS  1 
   3 +  1     4578344          0  ABCDEFGHPS  2 
   4 +  2     4578344          0  ABCDEFGHPS  3 
   5 +  1     4578344          0  ABCDEFGHPS  4 
   6 +  2     4578344          0  ABCDEFGHPS  5 
   7 +  1     4578344          0  ABCDEFGHPS  6 
   8 +  2     4578344          0  ABCDEFGHPS  7 
   9 +  1     4578344          0  ABCDEFGHPS  8 
  10 +  2     4578344          0  ABCDEFGHPS  9 
  11 +  1     4578344          0  ABCDEFGHPS  10 
  12 +  2     4578344          0  ABCDEFGHPS  11 
  13 +  1     4578344          0  ABCDEFGHPS  12 
  14 +  2     4578344          0  ABCDEFGHPS  13
  15 +  1     4578344          0  ABCDEFGHPS  14
  16 +  2     4578344          0  ABCDEFGHPS  15
  17 +  1     4578344          0  ABCDEFGHPS  16

                         Tier Verification Status:

 TIER   Scheduled   Continuous  Progress    Passes  Last Verify Completion Time  

-------------------------------------------------------------------------------

   1                    Yes       0.8%          29     16:17:07 01/22/2011 
   2        No          Yes                     29     16:17:05 01/22/2011 
   3                    Yes                     28     19:25:51 01/12/2011 
   4        No          Yes                     28     11:47:25 01/16/2011 
   5                    Yes                     28     09:35:10 01/22/2011 
   6        No          Yes                     27     09:46:24 01/22/2011 
   7                    Yes                     24     15:09:06 11/28/2010 
   8        No          Yes                     24     15:20:22 12/01/2010 
   9                    Yes                     24     09:21:15 12/04/2010 
  10        No          Yes                     24     15:10:33 12/12/2010 
  11                    Yes                     24     23:28:35 12/13/2010 
  12        No          Yes                     24     12:19:44 12/21/2010 
  13                    Yes                     48     22:39:50 12/30/2010 
  14        No          Yes                      0     12:46:02 01/05/2011 
  15                    Yes                      0     21:10:56 01/05/2011 
  16        No          Yes                      0     23:02:30 01/05/2011
  17                    Yes                      0     23:02:30 01/05/2011 

  System verify extent:    32 Mbytes
  System verify delay:     40
  Maximum active verifies: 2


Please enter a TIER ('a' for all TIERs owned by this unit or 'q' to quit): a

ALL valid TIERs owned by this unit selected

Do you want the verify to run continuously? (y/N): y

 

Next, run cache writeback=on and av fastav=on

S2A 9900[1]: cache writeback=on

                          Current Cache settings

           Write   Maximum   MF  Prefetch
    LUN   Caching  Prefetch  Bit  Ceiling
 ------------------------------------------------------------------------------
      0   Enabled    x    1   On   65535
      1   Enabled    x    1   On   65535
      2   Enabled    x    1   On   65535
      3   Enabled    x    1   On   65535
      4   Enabled    x    1   On   65535
      5   Enabled    x    1   On   65535
      6   Enabled    x    1   On   65535
      7   Enabled    x    1   On   65535
      8   Enabled    x    1   On   65535
      9   Enabled    x    1   On   65535
     10   Enabled    x    1   On   65535
     11   Enabled    x    1   On   65535
     12   Enabled    x    1   On   65535
     13   Enabled    x    1   On   65535
     14   Enabled    x    1   On   65535
     15   Enabled    x    1   On   65535
     16   Enabled    x    1   On   65535

Writeback Limit: 75%

                     2560.0 Mbytes of Cache Installed
                      (2048 Segments of 1024 Kbytes)

S2A 9900[1]: av fastav=on

           Current LUN Audio/Visual settings

                                Read     Write   Maximum
  LUN  Label          FastAV Continuous Caching  Prefetch
-----------------------------------------------------------
    0 SAS_0              On      Off       On       x  1
    1 SAS_1              On      Off       On       x  1
    2 SAS_2              On      Off       On       x  1
    3 SAS_3              On      Off       On       x  1
    4 SAS_4              On      Off       On       x  1
    5 SAS_5              On      Off       On       x  1
    6 SAS_6              On      Off       On       x  1
    7 SAS_7              On      Off       On       x  1
    8 SAS_8              On      Off       On       x  1
    9 SAS_9              On      Off       On       x  1
   10 SAS_10             On      Off       On       x  1
   11 SAS_11             On      Off       On       x  1
   12 SAS_12             On      Off       On       x  1
   13 SAS_13             On      Off       On       x  1
   14 SAS_14             On      Off       On       x  1
   15 SAS_15             On      Off       On       x  1
   16 SAS_16             On      Off       On       x  1

  Disk Audio/Visual settings are:  Disabled  (Using disk defaults)
    Recovery Time Limit:           65535

  Ordered Tag Count:     0
  Unit Attention:        Enabled
  FASTAV Timeout:        200
  RC Timeout:            250
  Fail Check Condition:  Disabled