search
HomeDatabaseMysql Tutorial 2. DAS,NAS,SAN在数据库存储上的应用

一. 硬盘接口类型 1. 并行接口还是串行接口 (1) 并行接口,指的是并行传输的接口,比如有0~9十个数字,用10条传输线,那么每根线只需要传输一位数字,即可完成。 从理论上看,并行传输效率很高,但是由于线路上的物理原因,它的传输频率不能太高,所以实际的

一. 硬盘接口类型
1. 并行接口还是串行接口
(1) 并行接口,指的是并行传输的接口,比如有0~9十个数字,用10条传输线,那么每根线只需要传输一位数字,即可完成。
从理论上看,并行传输效率很高,但是由于线路上的物理原因,它的传输频率不能太高,所以实际的传输速度并不和并行度成正比,甚至可能更差。

(2) 串行接口,指的是串行传输的接口,同样是0~9十个数字,用1条传输线,那么需要传输10次,香港虚拟主机,才可以完成。
从理论上看,串行传输效率不高,但是由于它的数据准确性,高频率的支持,使得传输速度可以很高。

(3) 并行连接线和串行连接线(IDE/SATA)


目前,计算机的外部接口大多被串行接口取代,比如:USB,1394,COM等等,都是串行接口。而硬盘的外部接口也已经被串行接口(SATA/SAS)占领。

2. 硬盘接口类型
按硬盘接口协议/规范可以分为2类:ATA和SCSI。使用了某种接口的硬盘就称为XXX硬盘。

2.1 ATA接口协议
(1) IDE接口
IDE接口也称为PATA(Parallel ATA)接口,也就是并行ATA接口。以前的PC机大多用的这种接口的硬盘。

(2) SATA接口
SATA(Serial ATA)接口,串行ATA接口,这类硬盘,转速通常不太高,容量大,目前PC机或者IOPS要求不是太高的存储多使用这种接口的硬盘。

(3) IDE和SATA硬盘接口图示

 

2.2 SCSI接口协议
(1) SCSI接口
通常所说的SCSI,是一种并行接口,早期的计算机外设(打印机,扫描仪等等),也大多使用这种接口。现在使用这种接口的硬盘已经很少。


(2) SAS接口
SAS(Serial SCSI)接口,串行SCSI接口,这类硬盘,转速高,IOPS高,适用于OLTP系统的存储。
另外,SAS的接口技术已经可以兼容SATA,也就是说:如果主板上有个SAS接口,是可以接SATA硬盘的,但是反之不行。从图片上看,SAS和SATA接口有点相似。

二. 存储方案
所谓的存储方案,就是用单独的软硬件将磁盘/磁盘组管理起来,供主机使用。
目前的外挂存储解决方案主要分为三种:
(1) 直连式存储 (DAS:Direct Attached Storage)
(2) 网络存储设备 (NAS:Network Attached Storage)
(3) 存储网络 (SAN:Storage Area Network)
存储方案内部使用的硬盘,多为SATA/SAS,经过串联/RAID之后,对主机提供访问接口。

1. DAS
直接连接存储 (DAS:Direct Attached Storage),是指将存储设备通过SCSI接口或FC接口直接连接到一台计算机上。DAS不算是网络存储,美国空间,因为只有它所挂载的主机才可访问它。
也就是说,服务器发生故障时,连接在服务器上的DAS存储设备中的数据暂时不能被存取。



DAS设备示例:

2. NAS
网络连接存储 (NAS:Network Attached Storage),是指将存储设备通过标准的网络拓扑结构(例如以太网),连接到一群计算机上。NAS有文件系统和IP地址,可以类似的理解为网上邻居的共享磁盘。



NAS设备示例:

3. SAN
存储区域网络(SAN:Storage Area Network),目前的SAN存储有2种:一是基于光纤通道的FC SAN;二是基于以太网的IP SCAN(也就常说的iSCSI)。
FC SAN通过光纤交换机连接到主机(HBA卡),也就是说可以连接到光纤交换机的主机都可以访问这个存储;
iSCSI作为共享于以太网络上的存储则更类似于NAS。



FC SAN设备示例:

IP SAN 设备示例:

三. 在数据库存储上的应用
三种存储方案的比较,如图:

1. DAS
可作为本机的外挂硬盘,不过现在单块磁盘的空间已经很大,如果几个T的空间,直接在主机里插硬盘就可以实现了,不需要外挂。

2. NAS
由于它的文件系统特性,加上以太网网线传输,更像是我的电脑-网上邻居-共享磁盘,香港空间,访问方式也是类似:\\NAS01\BACKUP\database_name.bak。更多的是作为文件共享、备份、归档所用,比如数据库的历史备份/异地备份文件。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How does MySQL handle data replication?How does MySQL handle data replication?Apr 28, 2025 am 12:25 AM

MySQL processes data replication through three modes: asynchronous, semi-synchronous and group replication. 1) Asynchronous replication performance is high but data may be lost. 2) Semi-synchronous replication improves data security but increases latency. 3) Group replication supports multi-master replication and failover, suitable for high availability requirements.

How can you use the EXPLAIN statement to analyze query performance?How can you use the EXPLAIN statement to analyze query performance?Apr 28, 2025 am 12:24 AM

The EXPLAIN statement can be used to analyze and improve SQL query performance. 1. Execute the EXPLAIN statement to view the query plan. 2. Analyze the output results, pay attention to access type, index usage and JOIN order. 3. Create or adjust indexes based on the analysis results, optimize JOIN operations, and avoid full table scanning to improve query efficiency.

How do you back up and restore a MySQL database?How do you back up and restore a MySQL database?Apr 28, 2025 am 12:23 AM

Using mysqldump for logical backup and MySQLEnterpriseBackup for hot backup are effective ways to back up MySQL databases. 1. Use mysqldump to back up the database: mysqldump-uroot-pmydatabase>mydatabase_backup.sql. 2. Use MySQLEnterpriseBackup for hot backup: mysqlbackup--user=root-password=password--backup-dir=/path/to/backupbackup. When recovering, use the corresponding life

What are some common causes of slow queries in MySQL?What are some common causes of slow queries in MySQL?Apr 28, 2025 am 12:18 AM

The main reasons for slow MySQL query include missing or improper use of indexes, query complexity, excessive data volume and insufficient hardware resources. Optimization suggestions include: 1. Create appropriate indexes; 2. Optimize query statements; 3. Use table partitioning technology; 4. Appropriately upgrade hardware.

What are views in MySQL?What are views in MySQL?Apr 28, 2025 am 12:04 AM

MySQL view is a virtual table based on SQL query results and does not store data. 1) Views simplify complex queries, 2) Enhance data security, and 3) Maintain data consistency. Views are stored queries in databases that can be used like tables, but data is generated dynamically.

What are the differences in syntax between MySQL and other SQL dialects?What are the differences in syntax between MySQL and other SQL dialects?Apr 27, 2025 am 12:26 AM

MySQLdiffersfromotherSQLdialectsinsyntaxforLIMIT,auto-increment,stringcomparison,subqueries,andperformanceanalysis.1)MySQLusesLIMIT,whileSQLServerusesTOPandOracleusesROWNUM.2)MySQL'sAUTO_INCREMENTcontrastswithPostgreSQL'sSERIALandOracle'ssequenceandt

What is MySQL partitioning?What is MySQL partitioning?Apr 27, 2025 am 12:23 AM

MySQL partitioning improves performance and simplifies maintenance. 1) Divide large tables into small pieces by specific criteria (such as date ranges), 2) physically divide data into independent files, 3) MySQL can focus on related partitions when querying, 4) Query optimizer can skip unrelated partitions, 5) Choosing the right partition strategy and maintaining it regularly is key.

How do you grant and revoke privileges in MySQL?How do you grant and revoke privileges in MySQL?Apr 27, 2025 am 12:21 AM

How to grant and revoke permissions in MySQL? 1. Use the GRANT statement to grant permissions, such as GRANTALLPRIVILEGESONdatabase_name.TO'username'@'host'; 2. Use the REVOKE statement to revoke permissions, such as REVOKEALLPRIVILEGESONdatabase_name.FROM'username'@'host' to ensure timely communication of permission changes.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor