[Transfer] The relationship and difference between block storage, file storage, and object storage

[Block storage]
Typical equipment: disk array, hard disk
block storage mainly maps the entire raw disk space to the host for use, that is, for example, there are 5 hard disks in the disk array (for the convenience of description, assuming that each hard disk is 1G), then you can N logical hard disks are logically divided by various methods such as partitioning logical disks, doing Raid, or LVM (logical volumes). (Assume that the divided logical disks are also 5, each of which is 1G, but these 5 1G logical disks have completely different meanings from the original 5 physical hard disks. For example, in the first logical disk A, the first logical disk may be the first one. 200M is from physical hard disk 1, and the second 200M is from physical hard disk 2, so logical hard disk A is a hard disk logically created by multiple physical hard disks.)
Then block storage will use mapping to map these logical disks to The host, the operating system on the host will recognize that there are 5 hard disks, but the operating system cannot distinguish whether it is logical or physical. There is no difference to the operating system, at least there is no difference in the perception of the operating system.
In this way, the operating system also needs to partition and format the mounted bare hard disk before it can be used, which is completely the same as the way of the built-in hard disk of the ordinary host.
Advantages:
1. The advantage of this method is, of course, that data is protected by means of Raid and LVM.
2. In addition, multiple cheap hard disks can be combined to form a large-capacity logical disk to provide external services and increase the capacity.
3. When writing data, since it is a logical disk composed of multiple disks, several disks can be written in parallel, which improves the read and write efficiency.
4. In many cases, the block storage adopts the SAN architecture for networking, and the transmission rate and the encapsulation protocol cause the transmission speed and the read and write rate to be improved.
Disadvantages:
1. When using SAN architecture for networking, it is necessary to purchase additional Fibre Channel cards for the host, as well as fibre switches, which are costly.
2. Data between hosts cannot be shared. When the server is not clustered, the block storage bare disk is mapped to the host. After formatting and using, it is equivalent to a local disk for the host, so the local disk of host A cannot be used at all. It is used by host B and cannot share data.
3. It is not conducive to data sharing between hosts of different operating systems: Another reason is that because the operating systems use different file systems, after formatting, the data between different file systems cannot be shared. For example, one installed WIN7/XP, the file system is FAT32/NTFS, and Linux is EXT4, EXT4 cannot recognize the NTFS file system. Just like an NTFS-formatted USB flash drive, inserted into a Linux notebook, it cannot be recognized at all. So not conducive to file sharing.
[File storage]
Typical devices: FTP and NFS servers
have file storage in order to overcome the above-mentioned problem that files cannot be shared.
There are also software and hardware integrated devices for file storage, but in fact, if you take a server/laptop, as long as you install the appropriate operating system and software, you can set up FTP and NFS services. After such services are installed, the server is the file. kind of storage.
Host A can directly upload and download files to the file storage. Unlike block storage, host A does not need to format the file storage, because the file management function is already handled by the file storage itself.
Advantages:
1. Low cost: just one machine is enough, and ordinary Ethernet is enough, no dedicated SAN network is needed at all, so the cost is low.
2. Convenient file sharing: For example, host A (WIN7, NTFS file system), host B (Linux, EXT4 file system), if you want to copy a movie to each other, it is not possible. Add a host C (NFS server), then you can first copy A to C, and then copy C to B and it will be OK. (The example is superficial, please forgive me...)
Disadvantages:
Low read and write rate, slow transfer rate: Ethernet, the upload and download speed is slow, and all read and write needs to be undertaken by a hard disk in a server. Compared with the disk array, dozens of hard disks are read and written at the same time The rate is much slower.
[Object storage]
Typical equipment: Distributed servers with built-in large-capacity hard disks The
most commonly used solution for object storage is that multiple servers have built-in large-capacity hard disks, and then install the object storage software, and then create a few additional services as management nodes. object storage management software. The management node can manage other servers to provide read and write access to the outside world.
The reason for the emergence of object storage is to overcome the shortcomings of block storage and file storage, and to promote their respective advantages. In short, block storage is fast to read and write, which is not conducive to sharing, and file storage is slow to read and write, which is conducive to sharing. Can you get a fast read and write, which is beneficial to sharing. Hence the object storage.

Finally, why does object storage have the benefits of both block storage and file storage, yet use block storage or file storage?
1. There is a class of applications that need to store direct bare disk mapping, such as databases. Because the database needs to store the bare disk and map it to itself, and then format the bare disk according to its own database file system, other storage that has been formatted as a certain file system cannot be used. Such applications are better suited to use block storage.
2. The cost of object storage is still higher than that of ordinary file storage, and special object storage software and large-capacity hard disks need to be purchased. If the data volume requirements are not massive, but only for file sharing, it is better to use the form of file storage directly, which is cost-effective.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325298159&siteId=291194637