1.ISCSI Brief Introduction
?
iSCSI leverages Port 860 and 3260 for TCP/IP as a channel of communication. The iSCSI protocol is used to exchange SCSI commands across two computers, allowing the computer to emulate a SAN as a local storage device through fast LAN hubs.
?
?
Although ISCSI can communicate with a random type of SCSI device, system administrators almost always use it to connect to server computers (for example, database server) and to storage arrays on disk volumes. The purpose of using an iSCSI SAN is usually the following two:
Storage Consolidation companies want to move different storage resources from servers that are scattered across the network to a unified location (often a data center), which makes storage allocations more efficient. Servers in a SAN environment can obtain newly allocated disk volumes without any change in hardware or cable connections.
Disaster RecoveryThe company wants to mirror storage resources from a data center to a remote data center, which can be used as a hot backup in the event of a prolonged outage. In particular, ISCSI sans allow us to migrate entire disk arrays over the WAN with minimal configuration changes, essentially by turning storage into "routable", just like normal network traffic.
?
Here we can give an example, Ali's server has very many accounts, assuming that the account and password are really on a single server, then when the server hangs, the information is lost. That's a disastrous result for Ali and the users. Therefore, use a network device instead of a local hard disk on the server:
?
?
?
? As described in the illustration, the client is only visiting the device in the disk enclosure, not the server providing the service. The enclosure is managed by a separate server, which only provides tasks like out-of-the-box allocation, which enables the storage separation technology to single the functionality of each server to make the entire architecture more secure.
?
?Implementation of the 2.ISCSI
?
?Having understood the fundamentals of iSCSI, we are implementing an iSCSI model.
?
? (1) Preparatory work
?
? To have two hosts,one to provide network equipment (equivalent to the effect of the enclosure), and the other to use a network device (equivalent to UNIX server)。
?
(2) Formal configuration
?
?1.first look at the server:
?
? 1). First of all, to create a device to share outward;
? 2). Install iSCSI server;
? 3). Open service after setting up the service configuration;
?
? 1). Production Equipment:
?
?
?
?
?
After the build, we run the following operation, and the second one runs two times:
?
?
?
? 2. Install iSCSI Server:
?
?
? 3). Set the main configuration file:
?
?
To share the device, the server is named Westos.example.com.
?
?
? Open service:
?
?
?
? 2.client
?
? At this point our server has shared a piece of equipment, the client is to get it, first we install iSCSI client:
?
?
?
? Very fortunate that we have installed it.
?
To find a shared network device for a given IP, you can see that we have found:
?
?
? Turn on this network device:
?
?
? Open success!
?
? We list the currently available devices for this server, and find that in addition to the local/DEV/VDA device, another network device is/DEV/SDA. This was not before, Is our westos.example.com shared network equipment, we can operate on it, the real change is the westos.example.com inside of the device, when the server hangs, shared the device's server also retains data, which is very safe. Does not affect the conduct of the business.
?
?
?
?
?
? We are able to operate it like a local hard drive, to use it to generate new devices, and to mount them.
?
?
?
?
?
? then be able to format the mount:
?
?
?
?
?
If you want to mount permanently, you need to write to the file/etc/fstab:
?
?
?
Note: Here to pay attention to a detail, after defaults to add _netdev, otherwise it is not available.
?
3. The above mentioned is how to use this network device, then we do not want to use it also need to do a series of operations:
?
? 1) First to unload, assuming/etc/fstab write to delete;
2) exit the device from iSCSI;
?
? 1) Uninstall First:
?
2) exit the device from iSCSI:
?
? Uninstall the device:
?
?
Delete and exit, and find that the network device is really missing:
?
?
?
Summary
?
? The entire set of iSCSI storage is the most important of the settings, think of this idea will be very extensive application, in the future when it comes to clustering and load balancing will meet it. It's time to explain. Today's two more good!
?