Clustering and storage

Source: Internet
Author: User

Cluster

iSCSI Sharing
Data integrity, security, protocols
Storage is based on different application environment by taking reasonable, safe and effective way to save data to some media and to ensure effective access on the one hand it is the temporary or long-term physical medium of data, on the other hand, it is to ensure the integrity of the data stored in a way or behavior, storage is to combine these two aspects, To provide customers with a set of data storage emancipation program.
Storage Technology Classification:
SCSI Small Computer system interface: As an input/output interface, please use it for hard disk, CD, tape drive and other devices.
Dan Direct-Attached storage
Shared storage:
1.NAS Technology: Data storage server, size is fixed. Through the corresponding network services to share, you can through the HTTP,CIFS,NFS and other network sharing. The user accesses the data through the TCP/IP protocol.
protocol, the abbreviation of network protocol, the network protocol is a set of conventions that both sides of the communication computer must abide together. such as how to establish the connection, how to identify each other. Only by complying with this Convention can computers communicate with each other. Its three elements are: syntax, semantics, timing.
In order for the data to reach the destination from the source on the network, the Parties to the network communication must follow the same rules, called Protocol (Protocol), which ultimately manifests as the format of packets transmitted over the network.
Protocols are often defined in several levels, and layered definitions are designed so that changes to one layer of protocol do not affect other levels of protocol.
A network protocol, also known as an agreement, is usually composed of three elements:
(1) Syntax: The structure or format of data and control information;
(2) Semantics: What kind of control information needs to be emitted, what actions to complete and what response to make;
(3) Timing (synchronization), which is a detailed description of the event implementation sequence.
2.SAN Technology: Storage Area Network, transmission through the transmission media. can be through optical fiber, twisted pair, etc., not limited by the distance. Connect directly via a network cable. The data is encapsulated as an IP packet.
Network transmission medium refers to the transmission of information in the network carrier, the common transmission medium is divided into two categories of wired transmission media and wireless transmission medium. Different transmission media, the characteristics of different, their characteristics of the network data communication quality and communication speed has a greater impact.
Wired transmission media refers to the physical connection between two communication devices, which transmits the signal from one party to the other, and the cable transmission media mainly have twisted pair, coaxial cable and optical fiber. Twisted-pair and coaxial cables transmit electrical signals, and optical fibers transmit light.
Wireless transmission of the media are: Radio waves, infrared, microwave, satellite and laser. In a local area network, radio waves and infra-red are usually used only as transmission media. Wireless transmission media is commonly used for wide-area link connections in broad-area Internet.
The advantage of wireless transmission is that it is easy to install, move, and change, and is not limited by the environment. However, the signal is susceptible to interference and theft during transmission, and the initial installation cost is high.
3.ISCSI Technology:

iSCSI Technology Applications

Object: An object is an instance of a class (objects are not looking for a girlfriend), stateful and behavioral. For example, a dog is an object whose state is: color, name, variety, behavior: wagging the tail, barking, eating, etc.
Class: A class is a template that describes the behavior and state of a class of objects.
Note: To turn off firewalls and NetworkManager before configuring iSCSI
JSON lightweight text Data Interchange Format
JSON Syntax rules
JSON syntax is a subset of the JavaScript object notation syntax.
Data in name/value pairs
Data is separated by commas
Curly braces Save Object
Square brackets Save Array
JSON Name/value pairs
The writing format for JSON data is: name/value pairs.
Name/value pairs include the field name (in double quotation marks), followed by a colon, and then the value:
"FirstName": "John"
This is easy to understand and is equivalent to this JAVASCRIPT statement:
FirstName = "John"
JSON value
The JSON value can be:
Number (integer or floating point)
String (in double quotes)
Logical value (TRUE or FALSE)
Array (in square brackets)
Object (in curly braces)
Null
JSON Object
The JSON object is written in curly braces:
An object can contain multiple name/value pairs:
{"FirstName": "John", "LastName": "Doe"}
This is also easy to understand, and is equivalent to this JAVASCRIPT statement:
FirstName = "John"
LastName = "Doe"
JSON Array
The JSON array is written in square brackets:
An array can contain multiple objects:
{
"Employees": [
{"FirstName": "John", "LastName": "Doe"},
{"FirstName": "Anna", "LastName": "Smith"},
{"FirstName": "Peter", "LastName": "Jones"}
]
}
In the example above, the object "Employees" is an array that contains three objects. Each object represents a record of a person (with a first and last name).
JSON uses JavaScript syntax
Because JSON uses JavaScript syntax, there is no need for additional software to handle JSON in JavaScript.
With JavaScript, you can create an array of objects and assign values like this:
Example
var employees = [
{"FirstName": "Bill", "LastName": "Gates"},
{"FirstName": "George", "LastName": "Bush"},
{"FirstName": "Thomas", "LastName": "Carter"}
];
You can access the first item in an array of JavaScript objects like this:
Employees[0].lastname;
The returned content is:
Gates
You can modify the data like this:
Employees[0].lastname = "Jobs";
JSON file
The file type of the JSON file is ". JSON"
The MIME type of JSON text is "Application/json"

Configuring iSCSI
Step One: Install the iSCSI Server Software

1) Install the TARGETCLI package with Yum

[[email protected] ~]# yum  -y  install  targetcli.. ..[[email protected] ~]# yum info targetcli

Step Two: Configure the iSCSI service from the command line
2) define back-end storage with TARGETCLI

[[email protected] ~]# targetcli/> ls/> backstores/block create store /dev/vdb1备注:store为任意名称

3) Create IQN Object

/> /iscsi create iqn.2018-01.cn.tedu:server1

4) Authorized Client Access

/> iscsi/iqn.2018-01.cn.tedu:server1/tpg1/acls create iqn.2018-01.cn.tedu:client1

5) Bound Storage

6) Store the address of the binding service listener and save the configuration

/> iscsi/iqn.2018-01.cn.tedu:server1/tpg1/portals/ create 0.0.0.0/> saveconfig /> exit

Step Three: Service management

1) Start the service

[[email protected] ~]# systemctl  {start|restart|stop|status} target[[email protected] ~]# systemctl enable target

2) View port information

[[email protected] ~]# ss -tlnp | grep :3260

3) Turn off firewall and SELinux

[[email protected] ~]# systemctl stop firewalld[[email protected] ~]# setenforce 0

Step Four: Client access

1) The client installs the software and starts the service

[[email protected] ~]# yum -y install iscsi-initiator-utils[[email protected] ~]# systemctl restrt iscsi

2) Set the IQN name of the machine

[[email protected] ~]# vim /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.2018-01.cn.tedu:client1注意:必须跟服务器上配置的ACL一致!

3) Discover the remote target storage

Tip: Refer to man iscsiadm!

[[email protected] ~]# iscsiadm --mode discoverydb --type sendtargets --portal 192.168.4.5 –discover[[email protected] ~]# iscsiadm --mode node --targetname iqn.2018-01.cn.tedu:server1 --portal 192.168.4.5:3260 --login

3) client Mount iSCSI Share

[[email protected] ~]# systemctl restart iscsi [[email protected] ~]# lsblk

4) Partitioning, formatting, mounting

[[email protected] ~]# parted /dev/sdb mklabel gpt[[email protected] ~]# parted /dev/sdb mkpart primary 1 800[[email protected] ~]# mount /dev/sdb1  /mnt

Mans Iscsiadm
Discover targets at a given IP address:

        iscsiadm --mode discoverydb --type sendtargets --portal 192.168.1.10 --discover

Discover devices
Login, must use a node record ID found by the discovery:

        iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --login=-l

Log in Device
Logout:

        iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --logout=-u

The logout device is equivalent to unloading

Device File Management methods

Devfs
The static management method used in Linux early
A large number of static files in the/dev directory
Kernel version 2.6.13 started to be completely superseded
Udev
Only devices connected to the system create device files in/dev
Independent of primary and secondary device numbers
Provide persistent, consistent names for the device

Udev
Display device information for the system
Udevadm Monitor--property
How to obtain information about a hardware device that is already on the device
Iqn
How to write a udev rule configuration file
vim/etc/udev/rules.d/name. Rules
Name of parameter
Numbers between vim/etc/udev/rules.d/1-99-names. Rules

subsystem== "Block", attr{size}== "10481664", size attrs{model}== "DISKB", attrs{vendor}== "lio-org" Manufacturer

NIC configuration file
/etc/sysconfig/network-scripts/

Type=ethernet
Name=eth1
Device=eth1
Onboot=no
ipaddr=192.168.2.51

Multi-Path

Clustering and storage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.