Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »





MAYASTOR
Technical Reference Guide







Release 0.2
December 2004 Copyright © 2004 Pavitrasoft, Inc. All rights reserved.
This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of Pavitrasoft, Inc.
TRADEMARKSPavitrasoft® and the Pavitrasoft logo are registered trademarks of Pavitrasoft, Inc.
Mayastor, Mayatape are trademarks of Pavitrasoft, Inc. All other names and/or trademarks herein are the property of their respective owners.
All terms mentioned in this document that are known to be trademarks or service marks have been appropriately capitalized. Pavitrasoft Inc. cannot attest to the accuracy of this information. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark.
DISCLAIMER The software and information are provided "AS IS, WHERE IS, WITH ALL DEFECTS" without warranty of any kind whatsoever. Pavitrasoft, Inc. disclaims any and all implied representations and warranties of merchantability or fitness for s particular purpose. Pavitrasoft, Inc. does not warrant, guarantee, or make any representation regarding the use, or the results of the use, of any software or information, in terms of correctness, accuracy, reliability, currentness, or otherwise. The entire risk as to the results and performance of the software and information is assumed by you. If any software or information is defective, you, not Pavitrasoft, Inc. or its dealers, distributors, agents, or employees, assumes the entire risk of loss and cost of all necessary servicing, repair, or correction.
PAVITRASOFT, INC., SHALL NOT BE LIABLE FOR ANY CONSEQUENTIAL OR INCIDENTAL DAMAGES ARISING FROM THE BREACH OF ANY WARRANTIES, THE FAILURE OF DELIVERY, DELAY IN DELIVERY, DELIVERY IN NONCONFORMING CONDITION, OR FOR ANY OTHER BREACH OF CONTRACT OR DUTY BETWEEN YOU AND PAVITRASOFT, INC.
Some states do not allow the exclusion of implied warranties, so the limitations and exclusions contained in this document may not apply. Apart from your rights specified in this document, you may have other rights which vary from state to state.
The information and policies contained in this document are subject to change without notice.
RESTRICTED RIGHTS LEGEND – Use, reproduction, or disclosure is subject to the restrictions set forth for computer software, as applicable.






1
Mayastor Management Architecture Chapter











Introduction
This chapter introduces the major components in Mayastor storage management. The components include both the hardware components and the logical components of the storage system.
The storage management commands are issued from the Mayastor Command Line Interface (CLI) program mayacli by running on the Mayastor storage server system.
Major Hardware Components
The following table lists the major hardware components that are involved in the Mayastor networked storage infrastructure.
Table 1-1Major Hardware Components

Hardware Component

Description

Storage Server

The Linux Server system that is running the Mayastor software to provide enhanced disk services.

Storage Array

This includes the external direct-attached disks such as fibre channel disks, serial ATA disks and SCSI disks.

Embedded disks

This includes the disks such as IDE and SCSI disks t hat are present inside the storage server.

Controller

The fibre channel HBA port that is running in target mode. For iSCSI operation it represents the attached Ethernet interfaces.

Host

The Application servers that will make use of the provisioned volumes from the Storage Server over fibre channel or Ethernet interconnect.














Logical Components of Storage Server
The logical components of storage server can be configured from the physical drives provided by Storage Array or Embedded disks.
Table 1-2Logical Components of Storage Server

Component

Description

Volume group

Set of drives that are logically grouped together by the Volume Manager supported in Linux. A volume group can provide appropriate raid-level as required by the application server, if the individual drives themselves are RAID disks. A volume group provides increased data availability and I/O performance and online resizing of volume capacity.

Volume

This is the basic unit that can be created to store data in the networked storage environment. It can represent a physical disk, disk partition, Linux software raid disk, LVM logical volume, LVM snapshot volume or any other block device such as loop device, dm-crypt device.

Unconfigured capacity

Any available storage capacity that is not yet configured as volumes is referred to as Unconfigured Capacity.

Mapped volume

Mapping is the process of assigning a Logical Unit Number and Controller so that it can appear as SCSI3 compliant direct access disk in the Storage Area Network (SAN). You can optionally associate access controls with mappings.

Mapped volume

Mapping is the process of assigning a Logical Unit Number and Controller so that it can appear as SCSI3 compliant direct access disk in the Storage Area Network (SAN). You can optionally associate access controls with mappings.

Bind volume

Binding is the process of bringing a mapped volume to be online.

Unbind volume

Unbinding changes the online device to become offline.


Major Software Components
The Mayastor Enterprise Storage Software consists of the following major software components listed below.
Table 1-3Major Software Components of Storage Server

Component

Description

fcgate

This is the gateway driver that provides interface to SCSI commands coming from the underlying fibre channel controller.

qlfctgt

This is the target mode driver for Qlogic Fibre-Channel HBAs. Currently it supports target mode operation for Qlogic 2200 and Qlogic 23xx series of adapters.

mayadev

This is the virtual disk driver that implements SCSI-3 SCSI Primary Commands (SPC) and SCSI Block Commands (SBC) for SCSI disks.

mdcache

This module provides cache management for mayadev operations.

mayatape

This is the virtual tape driver that implements SCSI-3 SCSI Streaming Commands (SSC) for SCSI tape devices. By default this driver emulates IBM 3580 LTO Ultrium tape drive.

mayatld

This is the virtual tape library driver that implements the SCSI-3 Medium Changer Commands. By default this driver emulates IBM 3584 Tape Library.

mayacli

Mayastor Command Line Interface utility to manage the storage server.







Mayastor Networked Storage Example
In the example shown in Figure 1-1, heterogeneous hosts have been shown sharing the volumes provisioned from Mayastor storage server. There are three hosts Tachyon, Dragonfly and Hurricane connected to the Mayastor storage server and the server is configured with the volumes sales, qa1, qa2, eng1 and eng2. In order for the servers to have exclusive access to the volumes the host has to be defined in the storage server with its port World Wide Name (WWN) address.
Figure 1-1Mayastor networked storage with heterogeneous hosts










Installing Mayastor Storage Server Software
The software is available as standard Linux RPM distribution, which can be easily installed as follows. Once you are logged in as root, type the following command
rpm –ivh mayastor-redhat-1.0-1-i686.rpm
This will copy all the required driver modules to /lib/modules/<kernel version>/kernel/drivers/mayastor and install Mayastor program files to /opt/mayastor directory.
For Mayastor Fibre Channel versions make sure there are no other qlogic fibre channel drivers loaded on the system. You may check this by running lsmod command and looking for any loaded qlogic drivers. You should also make sure that in the file /etc/modules.conf no aliases exist for qlogic fibre channel drivers, which may be auto-started and interfere with Mayastor qlogic target mode driver. If there are more than one Qlogic FC HBAs or have multi-port HBAs and would like to use only selective ports for Mayastor fibre channel target mode operation and the rest for initiator mode operation then please check with the README file in /opt/mayastor/docs.
After installation of Mayastor RPM the product has to be activated by providing the supplied license information. The license information consists of username and license key. The license key information can be supplied with or without dashes embedded. To activate type the following command and replace the input with appropriate information.

  1. /etc/init.d/mayastor activate
    Mayastor 1.0 Standard license activation
    User Name: Evaluation User
    License Key: KLEKTDMLB39ABDEAFJLKKEED
    Mayastor is started by the standard Linux RC script startup mechanism in /etc/init.d/mayastor. To manually start/stop make use of the following commands.
  2. /etc/init.d/mayastor start
  3. /etc/init.d/mayastor stop



    Chapter2
    Configuring Mayastor Storage Server














    This chapter describes how to configure Mayastor storage server for enhanced disk services. The server can be configured to offer higher throughput and data protection for volumes. Mayastor achieves all of these by using the standard volume manager and RAID support provided by the Linux operating system instead of rolling out its own volume manager. This means your data remain un-obscured by Mayastor virtualization and can be used without any data conversion in the event Mayastor was not deployed.

    Data Protection
    The server itself can be configured with redundant hardware such as power supply and fans or participate in cluster environment to offer high availability. In addition to this the volumes can be configured using the raid1 technology available through Linux Software raid module and by using Hardware RAID controllers that offer such feature. The raid1 technology offers continuous data protection by synchronously mirroring any data writes.
    Mayastor can provide another data protection feature by utilizing LVM snapshot capability. A snapshot volume is a point-in-time image of a volume. The snapshot volume can be shared with a different Host for backup purposes there by reducing the CPU overload on the server. The snapshot volume can also be used to test with real production data without the risk of data loss.

    RAID Levels
    By utilizing the Linux software raid or other hardware raid controller supported in Linux, Mayastor can offer volumes with different raid levels and data redundancy. The following raid levels are fully supported.
    Table 2-1Raid levels supported by Mayastor

    RAID level

    Description

    Raid 0

    It stripes data across all of the drives in the volume group and offers high performance but does not provide any data redundancy.

    Raid 1

    Provides disk mirroring. It offers the best data availability but only half of capacity is available for user data. It can offer higher read performance by load balancing across the drives.

    Raid 5

    The user data and error correcting information (parity) is also striped across the drives. This results in good performance and fault tolerance.

    Raid 10

    This is a combination of Raid 0 and Raid 1 offering higher performance and data redundancy.












    IO Caching
    Mayastor uses different caching techniques to match the IO patterns of the application server. It performs read-ahead if sequential read is detected. You can completely disable the cache if your application doesn't benefit from caching. Mayastor supports Write Caching that can increase IO performance by acknowledging good status without actually writing the data to the disk. Caching also increases the risk for data loss if the server fails while there are unwritten data still residing in the memory. You can minimize the risk of data loss and also achieve good performance by setting the cache flush delay to be zero, which causes any unwritten data to be written immediately after sending good status to the host for the write command. It is not recommended to enable this feature if you do not have a Universal Power Supply (UPS) for power protection.
    Dynamic Volume Expansion
    If the Mayastor volume was created using LVM volume manager then it can support online resizing of the volume or adding additional capacity by assigning unconfigured drives. Note that increasing the capacity on a host operating system that is unsupported may render the additional capacity unusable.
    Creating Volumes
    Mayastor supports creating volumes from several types of block devices. It can be just a physical disk, physical partition, Linux software raid disk, LVM volume, LVM snapshot volume and other block devices such as loop, dm-crypt devices.
    Table 2-2Source of Mayastor Volumes

    Type

    Description

    Disk

    A valid physical SCSI disk recognized by Linux with the following address Host, Channel, Id, and Lun.

    Partition

    The block device that represents the partition or the whole disk can be used as Mayastor volume. Most useful to create volumes from IDE devices or SCSI devices.

    Linux Software Raid

    Any Linux software raid disk created with appropriated raid level can be used as Mayastor volume.

    LVM

    All LVM volumes can be used as Mayastor volume.

    LVM Snapshot

    All LVM snapshot volumes can be exported as Mayastor volumes. Most useful to offload backup processing from this server to a different server.

    Other block devices

    In short any valid block device recognized by Linux can be used as Mayastor volume. This includes loop devices, dm-crypt or other. By utilizing dm-crypt or loop it is possible to create Mayastor volume that provides transparent block level AES encryption.















    Mayastor volume is created by using these easy steps.
  4. Identify the device name that will be used as Mayastor volume. The following table covers most of the well know block devices in Linux. The block devices should be made operational before making use of them in Mayastor. For example to make use of Linux raid1 device, it may be required to activate by using mdadm command or through other Linux administration mechanism.

Table 2-3Common device names

Name

Description

/dev/sda ..
/dev/sda1 ..

All SCSI disks recognized by Linux. It can include partitions in the disk identified by the number.

/dev/hda …
/dev/hda1 …

IDE disks and valid partitions in the disk.

/dev/md0 …

Linux software raid disk created with appropriated level and activated.

/dev/vg01/lv01

LVM volume group and a volume lv01 created with appropriate size and activated.

/dev/loop0 …

Loop device that was created on a backing store to do block level AES encryption.

  1. Use the create volume statement in mayacli. If required manually start the Mayastor services.
  1. /opt/mayastor/bin/mayacli
    mayacli> show volume
    No volumes configured.
    mayacli> create volume label=testvol1 disk=/dev/sda
  2. Use the create mapping statement to assign a device address. The following example creates a mapping suitable for iSCSI target, which requires a valid iSCSI name parameter.

mayacli> create mapping volume=testvol1 targetid=0 lun=0 controller=iscsi iscsiname=iqn.2004-10.com.pavitrasoft: storage.disk1

  1. Save the configuration

mayacli> save volume

  1. Apply the newly created volume mapping

mayacli> bind mapping volume=testvol1

  1. View the current mapping for all volumes.

mayacli> show mapping
Configured Volume Mappings:
Stat: A = Active, I = Inactive, E = Error
Volume Device Controller TID LUN Stat Options
---------------- ----------------- ---------- — --- ---- --------
testvol1 /dev/sda iscsi0 0 0 I iqn.2003-05.com.pavitrasoft:storage.disk1

  1. Get a list of configured iSCSI target devices.

mayacli> show iscsi targets
Target Active
ID LUNs Sessions Alias iSCSI Name
------ ---- -------- ------------- --------------------------------
0 1 0 testvol1 iqn.2003-05.com.pavitrasoft :storage.disk1
The above created iSCSI volume is now available for discovery from any iSCSI initiator in the IP SAN. If you prefer, a list of iSCSI initiators can be specified during the create mapping statement to restrict access to this device.

3
Mayastor Command Line Interface Chapter









This chapter describes the Mayastor Command Line Interface program mayacli used for managing Mayastor storage server. The mayacli is a RPC client program and can be used on the same system as Mayastor storage server or from any other Linux system in the network by utilizing the –h parameter to mayacli. By adopting the client-server RPC based architecture model it makes it possible to administer any number of Mayastor storage servers from a single location running mayacli.

  1. mayacli –h mayaserv1
    The mayacli program makes use of Linux tcpwrapper library interface to prevent unauthorized access. Please consult the Linux Administrator guide for more information on tcpwrapper.
    The mayacli program when invoked without any command statement will enter into interactive mode waiting for commands to be entered. Otherwise it will execute the command statement passed in the command line argument and exit immediately intended for scripting.
    Command Description and Syntax
    Each CLI command is made up of string of keywords separated by spaces. Each keyword could be a command, system object, parameter, etc. The keywords are case insensitive and so writeCacheEnabled is equivalent to writecacheenabled. Sometimes it can be recognized by partial keywords as long as it is not ambiguous. For example writeCacheEnabled can be recognized simply by writecache. Also some keywords can have aliases, which are easier to type. For example the keyword logicalUnitNumber can also be referred by keyword lun. The special character "*" refers to all the objects. The label name cannot use these reserved names:
    command object cmd-statement
    The following table gives the notational conventions for the command set.
    Table 3-1Command notational conventions

    *a

    b*

    alternatives ("a or b")

    italicized-word

    non-terminals

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0504f1c3-4b18-49b6-988b-03a6ab514aef"><ac:plain-text-body><![CDATA[

    [ … ] (square braces)

    zero or one occurrence

    ]]></ac:plain-text-body></ac:structured-macro>

    { … } (curly braces)

    zero or more occurrences

    *( a

    b

    c )*

    "choose exactly one of the alternatives"








    Commands
    The following table describes the commands that are understood by the Mayastor Command Line Interface program. Each command performs a set of operations on the Mayastor configuration.
    Table 3-2Mayacli commands

    Command

    Description

    bind

    Apply settings to an object

    create

    Create a new object

    delete

    Delete an existing object.

    set

    Manipulate the settings of an object

    show

    Show the settings of an object.

    start

    Start the operation of an object.

    unbind

    Revoke settings to an object

    stop

    Stop the operation of an object.








    Objects
    The components of Mayastor storage server for management are identified by the following system objects.
    Table 3-3Mayastor System Objects

    Object

    Mayastor Configuration section

    controller

    Represents the fibre channel HBA operating in target mode. For iSCSI operations this refers to all the Ethernet interfaces in the system.

    iscsi

    Represents the iSCSI targets, sessions and connections for management.

    disk

    Available physical disks in the system.

    host

    The application server that will make use of the Mayastor volumes

    mapping

    Binding a volume to controller and lun for a particular host or for all the hosts.

    mayastor

    The overall storage server.

    perf

    Performance object for volumes or controllers.

    stats

    Statistics object for volumes or controllers.

    volume

    Mayastor basic unit of storage that is presented as disks to hosts.














    CLI Commands
    controller
    Displays information about the controllers used for Mayastor storage services. For iSCSI operation it will show the familiar ifconfig output for Ethernet interfaces. For Fibre Channel version of Mayastor it will provide information about the Qlogic controller operating in target mode.
    mayacli> show controller
    iSCSI on eth0:
    eth0 Link encap:Ethernet HWaddr 00:07:E9:03:FA:BF
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    Base address:0x2800 Memory:fe980000-fe9a0000
    iSCSI on eth1:
    eth1 Link encap:Ethernet HWaddr 00:07:E9:03:FA:BE
    inet addr:10.1.1.92 Bcast:10.255.255.255 Mask:255.0.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:767 errors:0 dropped:0 overruns:0 frame:0
    TX packets:539 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:58283 (56.9 Kb) TX bytes:47071 (45.9 Kb)
    Base address:0x2840 Memory:fe960000-fe980000
    bind
    Bind causes volume mappings to go into effect and actually makes it available online for access from SAN clients.
    bind mapping [volume = string-literal ]| *
    In the following example a specific volume testvol1 is made online by issuing a bind command.
    mayacli> bind mapping volume=testvol1
    mayacli> show mapping
    Configured Volume Mappings:
    Stat: A = Active, I = Inactive, E = Error
    Volume Device Controller TID LUN Stat Options

                                • ---------------- ---------- — --- ---- --------
                                  testvol1 /dev/sda iscsi0 0 0 A iqn.200-10.com.pavitrasoft:storage.disk1
                                  To quickly activate all the mappings for all the volumes use the wildcard character *
                                  mayacli> bind mapping *
                                  disk
                                  Display information about the physical SCSI disks in the system.
                                  show disk
                                  The following example shows to get a listing of all SCSI devices in the system.
                                  mayacli> show disk
                                  Attached SCSI disk devices:
                                  DiskID* Vendor Model Rev Capacity Serial#
                        • -------- ---------------- ---- -------- ----------------
                          (1,0,0,0) COMPAQ BD0186349B 3B05 16.96G 3BT0FLTP000020482JR7
                          (1,0,1,0) COMPAQ BD0186349B 3B05 16.96G 3BT0FLJ500001049FQPW
                          (1,0,2,0) COMPAQ BD0186349B 3B05 16.96G 3BT0DNAL000010497F52
                          (1,0,3,0) COMPAQ BD0186349B 3B05 16.96G 3BT0FR65000010493Z8L
                          (1,0,4,0) COMPAQ BD0186349B 3B05 16.96G 3BT0FD3J00001049FW48
                          (1,0,5,0) COMPAQ BD0186349B 3B05 16.96G 3BT0FR5600001049YDNF
  • = DiskID contains (Host, Channel, Id, Lun)

    iscsi
    Display information about the iSCSI operation.
    show iscsi [targets|initiators|sessions|connections]
    To view currently configured iSCSI targets that have been created using iSCSI mapping statement:
    mayacli> show iscsi targets
    ID LUNs Sessions Alias iSCSI Name

            • ---- -------- ------------ --------------------------------
              0 1 0 vol_sda iqn.2003-05.com.pavitrasoft: test.disk.sda
              1 1 0 vol_sdb iqn.2003-05.com.pavitrasoft: test.disk.sdb
              2 1 0 vol_sdc iqn.2003-05.com.pavitrasoft: test.disk.sdc
              3 1 0 vol_sdd iqn.2003-05.com.pavitrasoft: test.disk.sdd
              To view the active iSCSI sessions on this Mayastor iSCSI server type the following command:
              mayacli> show iscsi sess
              Session ID IP Address Initiator Name Options
                                • ---------------- ---------------- ----------------
                                  10100003d0200 10.1.1.91 iqn.1987-05.com.cisco:01.41e02d12b37
                                  MaxConnections : 1
                                  MaxBurstLength : 65536
                                  ErrorRecoveryLevel : 0
                                  20100003d0200 10.1.1.91 iqn.1987-05.com.cisco:01.41e02d12b37
                                  MaxConnections : 1
                                  MaxBurstLength : 65536
                                  ErrorRecoveryLevel : 0
                                  Similary you can view active iSCSI initiators and connections by typing the following commands respectively.
                                  mayacli> show iscsi initiator
                                  mayacli> show iscsi conn
                                  host
                                  This object represents the SAN clients that are connected to Mayastor storage server. The host name entries are just local to the Mayastor operation and not to be confused with DNS host names or other system host name entries. The host name entries are kept in /opt/mayastor/config/mayahosts. This file can contain entries for both FC and iSCSI clients. For FC client a valid WWN port name is required and for iSCSI client a valid iSCSI qualified
                                  initiator name and IP address is required.
                                  create host label = string-literal [wwn = wwn-addr]| [iscsiName=name|ipaddress=n.n.n.n]]
                                  set host string-literal [wwn = wwn-addr| iscsiName=name|ipaddress=n.n.n.n]]
                                  delete host [string-literal | *]
                                  The following example creates host entry for FC client.
                                  mayacli> create host label=nebraska wwn=0a0b0c0d12345678
                                  mayacli> show host
                                  Nebraska0a0b0c0d12345678
                                  mayacli> create host label=omaha iscsiname=iqn.1985-10.com.cisco: initiator.395739f3
                                  mayacli> show host
                                  Type Host Address Host Name

                • ---------------- --------------------------------
                  iscsi 0.0.0.0 omaha iqn.1985-10.com.cisco:initiator.3503f
                  fc 0a0b0c0d12345678 nebraska
                  To view only the iSCSI host entries
                  mayacli> show host controller=iscsi
                  Type Host Address Host Name
                • ---------------- --------------------------------
                  iscsi 0.0.0.0 omaha iqn.1985-10.com.cisco:initiator.3503f
                  To delete host entry
                  mayacli> delete host Nebraska
                  mapping
                  Used to define, delete and modify the volume mappings inside Mayastor storage server.
                  create mapping volume = string-literal [lun = [integer-literal | auto] [targetID = integer-literal] [iscsiName=iqn-name] [access = host]
                  delete mapping [volume=string-literal] |[controller=fcn|iscsi]
                  delete mapping *
                  show mapping [volume=string-literal] [controller=fcn|iscsi]
                  Note that the additional parameter iscsiName is required to create iSCSI mapping. The access parameter takes host name entries defined in /opt/mayastor/mayahosts and not DNS host or other system host entries.
                  The following command creates a new mapping for volume Marketing and assigns to fibre channel controller fc1 and lun 0 with exclusive access to host Nebraska. The volume Marketing should have been created prior to this.
                  mayacli> create mapping volume=Marketing lun=0 controller=fc1 access = Nebraska
                  Another example to create a mapping suitable for iSCSI operation., which requires a valid iSCSI qualified name for the volume. The following are examples of iSCSI qualified names that might be generated by "EXAMPLE Storage Arrays, Inc."
                  Naming String defined by
                  Type Date Auth "example.com" naming authority
                  - --- ------- -------------------------------

                   

                   

                   

                   

                   

                   

                  iqn.2001-04.com.example:storage:diskarrays-sn-a8675309
                  iqn.2001-04.com.example
                  iqn.2001-04.com.example:storage.tape1.sys1.xyz
                  iqn.2001-04.com.example:storage.disk2.sys1.xyz
                  mayacli> create mapping volume=Marketing controller=iscsi iscsiName=iqn.2003-05.com.pavitrasoft:ibmshark.jbod3.disk4
                  This command removes the LUN mapping and can be issued only when the mapping is inactive. To deactivate a mapping use the unbind command statement.
                  mayacli> delete mapping volume=Marketing
                  mayastor
                  This is the main system object that represents the storage server.
                  start mayastor
                  stop mayastor

                  performance
                  This object displays performance information for a volume or controller. The first and second column indicates the throughput in MB/sec or KB/sec or bytes/sec. The third column indicate the Number of IO operations per second.
                  show perf [volume = [string-literal | *]] [controller = fcn | iscsi] [interval=integer-val]
                  The following example provides performance information for volume Marketing.
                  mayacli> show perf vol=Marketing
                  read/sec write/sec IOPS
                  33m 0 712
                  To view the overall performance information use either of the following, if all the volumes are shared by iSCSI only.
                  mayacli> show perf vol=*
                  mayacli> show perf controller=iscsi
                  save
                  Save is used to commit changes to object permanently.
                  save object-name
                  To save newly created volume definitions use the following command:
                  mayacli> save volume
                  unbind
                  Unbind causes active volume to be taken out of service. This will result in any pending IOs to be aborted and the application server will not see this disk anymore. On the SAN client it is recommended that you make sure the disk is not actively used and any file systems are unmounted before issuing this command.
                  unbind mapping [volume = string-literal ]| *
                  In the following example a specific volume testvol1 is made offline by issuing a unbind command.
                  mayacli> unbind mapping volume=testvol1
                  mayacli> unbind mapping *
                  volume
                  Create, modify and Delete volume definitions of Mayastor storage server.
                  create volume label = string-literal disk = device-name
                  delete volume label = string-literal
                  delete volume *
                  show volume [label = ]string-literal
                  set [volume = ]string-literal [ capacity = integer-val | readAheadEnabled=boolean-value | readCacheEnabled=boolean-value | writeCacheEnabled=boolean-value | cacheFlushDelay = integer-val | varyIOEnabled=boolean-value ]
                  cacheFlushDelay
                  Parameter used in conjunction with writeCachedEnabled that specifies the maximum amount of time for any unwritten data to be kept in the cache without actually writing to the physical volume. Setting this parameter to 0 causes data to be written immediately after sending good status to the host.
                  capacity
                  Parameter to resize the volume capacity to the new value specified in bytes. The setting will go into effect immediately if applied to online volume. This has to be followed by the administration procedure to actually resize the concerned file system.


                  Note: Reducing the volume size can render the file system to be unusable if proper administration procedure was not followed.----
                  readCacheEnabled
                  Parameter to enable/disable all caching associated with this volume. This also disables read-ahead functionality. This option is very useful for certain IO patterns that do not benefit from caching or results in reduced performance due to caching.
                  For example the XFS file system logging writes lots of small IOs of 512 bytes to the log device that result in unaligned IO, when cache blocksize is 4096 bytes. If mayastor volume is used for XFS file system then it is better to create a separate volume for log device and set readCacheEnabled to false.
                  writeCacheEnabled
                  Parameter to enable/disable write caching associated with this volume. The default setting disables the write caching which results in status to be sent out only after writing the data to the physical volume. If enabled, write caching can increase IO performance by acknowledging good status without actually writing the data to the disk. But write caching also increases the risk for data loss if the server fails while there are unwritten data still residing in the memory. You can minimize the risk of data loss and also achieve good performance by setting the cache flush delay to be zero, which causes any unwritten data to be written immediately after sending good status to the host for the write command.
                  It is not recommended to enable this feature for production environment. By not enabling the write caching the SAN client will wait for the volume to become online again in the event of Mayastor failure and re-issue all the pending IOs and continue with the operation without any data loss or application failure but with some incurred delay. On the other hand if write cache was enabled on Mayastor server that had failed, the SAN client will not re-issue the IOs for unwritten data since the Mayastor server had already returned good status for them and there will be data loss or corruption as a result of this.
                  cacheFlushDelay
                  Parameter used in conjunction with writeCachedEnabled that specifies the maximum amount of time for any unwritten data can be kept in the cache without actually writing to the physical volume. Setting this parameter to 0 causes data to be written immediately after sending good status to the host.
                  varyIOEnabled
                  Parameter to control IO requests that are not aligned at 4KB blocks. If this parameter is enabled then Mayastor will always issue IO requests that are aligned at 4KB to underlying block device even if the SAN client sent unaligned request.
                  By default this parameter is enabled which passes the IO requests to the underlying block device as is from the SAN client. However if the underlying block device is Linux software raid5 device then it cannot cope with IO requests that are not aligned on 4KB and will result in switching its buffer size from 512 to 4096 and vice versa. To avoid this parameter varyIOEnabled can be set to 0 only for Linux software raid5 devices. Note that this is not applicable to hardware raid5 device.
                  readAheadEnabled
                  Read-ahead prefetches data blocks ahead of time and keeps them in cache if the client is performing read requests in sequential manner. This parameter is very useful if the underlying block device is not a high-performance device.
                  The create statement defines a new volume based on a valid block device name for Mayastor operation. The following examples show how volumes are created from various devices.
                  To create a new volume definition that represents the SCSI disk /dev/sda use the following command
                  mayacli> create volume label=Sales disk=/dev/sda
                  The next example show how to create a new volume definition that will be used for Fibre-Channel to SCSI or iSCSI to SCSI bridging operation represented by device id (1,0,2,0). The device identification is simply a combination of Linux SCSI host#, channel#, targetID# and LUN#.
                  mayacli> create volume label=legacy_jbod disk=(1,0,2,0)
                  To create a new volume definition that represents the Linux software raid disk /dev/md0 use the following command:
                  mayacli> create volume label=Marketing disk=/dev/md0
                  In the above example the raid disk should have been newly created or assembled using the Linux mdadm command or through other Linux administration procedures.
                  To view the configured volumes
                  mayacli> show vol
                  Configured Volumes:
                  Type: id = Individual Disk, bd = Block Device, raid = Software RAID,
                  lvm = LVM disk, snap = Snapshot Volume, vtape = Virtual Tape Volume,
                  crypt = Block level encrypted volume
                  Volume Type Size Device
                                                        • ------ --------- ----------------------------
                                                          Sales bd 16.96G /dev/sda
                                                          Marketing bd 200.00G /dev/md0
                                                          legacy_jbod id 0.00G
                                                          The following command disables variable IO size option, which is required for raid5. Otherwise the raid5 driver will switch between 512 blocksize and 4096 blocksize.
                                                          mayacli> set volume Marketing varyIoEnabled=0
                                                          To display the details of a volume
                                                          mayacli> show volume Sales
                                                          Volume : Sales
                                                          UUID : a1c570e1:1102492e:8555b3c5:c3801217
                                                          Type : Block device disk
                                                          Device Name : /dev/sda
                                                          Device Serial Number : 3BT0FLTP000020481JR7
                                                          Volume Size : 18209320960 (16.96G)
                                                          Read Cache : Enabled
                                                          Write Cache : Disabled
                                                          Read-Ahead : Disabled
                                                          Cache Blocksize : 4096
                                                          Sector Size : 512
                                                          Variable IO Size : Enabled
                                                          Volume Mapping : Unmapped
                                                          Finally to delete a volume definition from Mayastor configuration:
                                                          mayacli> delete volume Marketing
                                                          Note: Deleting the volume definition does not result in loss of data; rather it only removes from Mayastor configuration and will not be available for the application servers anymore.




                                                          <span style="color: #000080">A</span>
                                                          Sample Mayastor iSCSI Configuration <span style="color: #ffffff"><strong>Appendix</strong></span>









                                                          This chapter describes a simple iSCSI based SAN deployment using a single Mayastor storage server connected to a single SAN client running Linux.
                                                          Server Configuration:
                                                          Hostname: mayastor1
                                                          Software: Linux AS 3.1 Update 3
                                                          Mayastor Standard 1.0 iSCSI server
                                                          Ethernet: Intel 82546EB Gigabit Controller
                                                          Attached devices:
                                                          Host: scsi1 Channel: 00 Id: 00 Lun: 00
                                                          Vendor: COMPAQ Model: BD0186349B Rev: 3B05
                                                          Type: Direct-Access ANSI SCSI revision: 02
                                                          Host: scsi1 Channel: 00 Id: 01 Lun: 00
                                                          Vendor: COMPAQ Model: BD0186349B Rev: 3B05
                                                          Type: Direct-Access ANSI SCSI revision: 02
                                                          Host: scsi1 Channel: 00 Id: 02 Lun: 00
                                                          Vendor: COMPAQ Model: BD0186349B Rev: 3B05
                                                          Type: Direct-Access ANSI SCSI revision: 02
                                                          Host: scsi1 Channel: 00 Id: 03 Lun: 00
                                                          Vendor: COMPAQ Model: BD0186349B Rev: 3B05
                                                          Type: Direct-Access ANSI SCSI revision: 02
                                                          Host: scsi1 Channel: 00 Id: 04 Lun: 00
                                                          Vendor: COMPAQ Model: BD0186349B Rev: 3B05
                                                          Type: Direct-Access ANSI SCSI revision: 02
                                                          Host: scsi1 Channel: 00 Id: 05 Lun: 00
                                                          Vendor: COMPAQ Model: BD0186349B Rev: 3B05
                                                          Type: Direct-Access ANSI SCSI revision: 02
                                                          Client Configuration:
                                                          Hostname: client1
                                                          Software: Linux AS 3.1 Update 3
                                                          Ethernet: Intel 82546EB Gigabit Controller
                                                          Cisco iSCSI initiator driver
                                                          Description
                                                          Start the Mayastor server if it was not started automatically.
                                                          root@mayastor1 root]# /etc/init.d/mayastor start
                                                          First volume definitions have to be created for the disks that will be shared as iSCSI volumes. The disks are available as sda, sdb, sdc, sdd and sde in the /dev directory. The volume names are selected to identify the source disk. The target IDs are assigned automatically in increasing order. With the following simple commands we are ready to create iSCSI volumes in less than a minute.
                                                          [root@mayastor1 root]# for d in /dev/sd[a-e] do
                                                          do
                                                          /opt/mayastor/bin/mayacli create volume label=vol_`basename $d` disk=$d
                                                          /opt/mayastor/bin/mayacli create mapping volume=vol_`basename $d` iscsiName=iqn.2003-05.com.pavitrasoft:test.disk.`basename $d` lun=auto
                                                          done
                                                          Just make sure it worked fine before actually binding the volumes so that it can be accessed from iSCSI initiators.
                                                          root@mayastor1 root]# /opt/mayastor/bin/mayacli
                                                          mayacli> show vol
                                                          Configured Volumes:
                                                          Type: id = Individual Disk, bd = Block Device, raid = Software RAID,
                                                          lvm = LVM disk, snap = Snapshot Volume, vtape = Virtual Tape Volume,
                                                          crypt = Block level encrypted volume
                                                          Volume Type Size Device

                                                        • ------ --------- ----------------------------
                                                          vol_sda bd 16.96G /dev/sda
                                                          vol_sdb bd 16.96G /dev/sdb
                                                          vol_sdc bd 16.96G /dev/sdc
                                                          vol_sdd bd 16.96G /dev/sdd
                                                          vol_sde bd 16.96G /dev/sde
                                                          mayacli> show mapping
                                                          Configured Volume Mappings:
                                                          Stat: A = Active, I = Inactive, E = Error
                                                          Volume Device Controller TID LUN Stat Options
                                • -------------------- ---------- — --- ---- --------
                                  vol_sda /dev/sda iscsi0 0 0 I iqn.2003-05.com.pavitrasoft:home.disk.sda
                                  vol_sdb /dev/sdb iscsi0 1 0 I iqn.2003-05.com.pavitrasoft:home.disk.sdb
                                  vol_sdc /dev/sdc iscsi0 2 0 I iqn.2003-05.com.pavitrasoft:home.disk.sdc
                                  vol_sdd /dev/sdd iscsi0 3 0 I iqn.2003-05.com.pavitrasoft:home.disk.sdd
                                  vol_sde /dev/sde iscsi0 4 0 I iqn.2003-05.com.pavitrasoft:home.disk.sde
                                  To actually bind the mappings and start serving to iSCSI initiator Client1
                                  mayacli> bind mapping *
                                  mayacli> show iscsi targets
                                  ID LUNs Sessions Alias iSCSI Name
            • ---- -------- ------------ --------------------------------
              0 1 0 vol_sda iqn.2003-05.com.pavitrasoft: test.disk.sda
              1 1 0 vol_sdb iqn.2003-05.com.pavitrasoft: test.disk.sdb
              2 1 0 vol_sdc iqn.2003-05.com.pavitrasoft: test.disk.sdc
              3 1 0 vol_sdd iqn.2003-05.com.pavitrasoft: test.disk.sdd
              4 1 0 vol_sde iqn.2003-05.com.pavitrasoft: test.disk.sde
              On the Client1 system specify the mayastor1 IP address as the DiscoveryAddress in the file /etc/iscsi.conf . Now restart iSCSI initiator services as follows:
              root@client1 root]# /etc/init.d/iscsi restart
              After this Client1 should have discovered the newly created iSCSI targets from server mayastor1 and is available as disk devices in the system for use.
              [root@mayastor1 root]# cat /proc/scsi/scsi
              Attached devices:
              Host: scsi0 Channel: 00 Id: 23 Lun: 00
              Vendor: MAYASTOR Model: sd(8,0) Rev: 0.7
              Type: Direct-Access ANSI SCSI revision: 03
              Host: scsi0 Channel: 00 Id: 24 Lun: 00
              Vendor: MAYASTOR Model: sd(8,16) Rev: 0.7
              Type: Direct-Access ANSI SCSI revision: 03
              On mayastor1 to view the iSCSI session details
              mayacli> show iscsi sess
              Session ID IP Address Initiator Name Options

                                • ---------------- ---------------- ----------------
                                  10100003d0200 10.1.1.91 iqn.1987-05.com.cisco:01.41e02d12b37
                                  MaxConnections : 1
                                  MaxBurstLength : 65536
                                  ErrorRecoveryLevel : 0
                                  20100003d0200 10.1.1.91 iqn.1987-05.com.cisco:01.41e02d12b37
                                  MaxConnections : 1
                                  MaxBurstLength : 65536
                                  ErrorRecoveryLevel : 0
                                  [...]
                                  mayacli> show iscsi conn
                                  TID Session ID CID IP Address:Port Options

        • ---------------- ---- -------------------- --------------------
          0 10100003d0200 0 10.1.1.91:32769
          MaxRecvDataSegmentLength : 131072
          HeaderDigest : CRC32C
          DataDigest : CRC32C
          1 20100003d0200 0 10.1.1.91:32770
          MaxRecvDataSegmentLength : 131072
          HeaderDigest : CRC32C
          DataDigest : CRC32C
          [ ... ]
          This concludes a simple iSCSI based SAN setup using Mayastor iSCSI server software and a Linux client running Cisco iSCSI initiator driver.

  • No labels