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 7 Next »


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


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, NVMe that are present inside the storage server.


The fibre channel HBA port that is running in target mode. For iSCSI operation it represents the attached Ethernet interfaces.  For NVMe Target operation the controller can be any RDMA capable network interfaces.


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



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.


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




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


Proprietary target mode driver for Qlogic Fibre-Channel HBAs. Currently it supports target mode operation for Qlogic 2/4/8 Gbps HBA

mayaiscsiProprietary implementation of RFC 3720 iSCSI server protocol.


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


This module  used for cache management for mayadev operations. (Deprecated)


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.


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

maya.configdMayastor service program for configuration and management.


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

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-1

Raid levels supported by Mayastor

RAID level


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
No IO caching. But the underlying storage pool may have cache of its own. For example the ZFS storage pool has sophisticated ARC caching for data and metadata as well.  For POSIX compliance of and data integrity any sync call has to commit the data to stable storage before acknowledging it. 

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-2

Source of Mayastor Volumes




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


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.


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.

  1. 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



/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.


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 uses the default portal configuration.

mayacli> create mapping volume=testvol1 targetid=0 lun=0 controller=iscsi

  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

  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 :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.

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.

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”)



[ … ] (square braces)

zero or one occurrence

{ … } (curly braces)

zero or more occurrences

( a | b | c )

“choose exactly one of the alternatives”

mayacli help

Command component `mayastor' Usage:

Mayastor Command Line Interface version 0.23

(c) Copyright 2003-2008 PavitraSoft Inc.

(c) Copyright 2010-2018 Crossmeta Solutions.

The following are the registered components for management:

    mayastor  disk  controller  volume  mapping  

    host  stats  performance  iscsi  nvmet  

    rg  mirror  vg  zpool  cloud  

    tape  vtl  snapshot  replication  failover  


Valid operations include:

    create, bind, delete, set, show, and help

    start or stop on mayastor main component

You may try help on individual component to get more information.

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




Apply settings to an object


Create a new object


Delete an existing object.


Manipulate the settings of an object


Show the settings of an object.


Start the operation of an object.


Revoke settings to an object


Stop the operation of an object.

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


Mayastor Configuration section


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


Represents the iSCSI targets, sessions and connections for management.


Available physical disks in the system.


The application server that will make use of the Mayastor volumes


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


The overall storage server.


Performance object for volumes or controllers.


Statistics object for volumes or controllers.


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

CLI Commands


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


Bind causes volume mappings to go into effect and actually makes it available online for access from SAN clients.

mayacli> bind mapping


Display information about the physical SCSI disks in the system.



  • No labels