fdisk查看磁盘 [root@db11g ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.9 (Tikanga)[root@db11g ~]# [root@db11g ~]# [root@db11g ~]# fdisk -lDisk /dev/sda: 32.2 GB, 32212254720 bytes255 heads, 63 sectors/track, 3916 c
fdisk查看磁盘
[root@db11g ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.9 (Tikanga) [root@db11g ~]# [root@db11g ~]# [root@db11g ~]# fdisk -l Disk /dev/sda: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 3916 31350847+ 8e Linux LVM Disk /dev/sdb: 17.1 GB, 17179869184 bytes 255 heads, 63 sectors/track, 2088 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't contain a valid partition table Disk /dev/sdc: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table
获取scsi id
[root@db11g ~]# /sbin/scsi_id -g -u -s /block/sdb SATA_VBOX_HARDDISK_VB3c0bb909-10aab3a0_ [root@db11g ~]# /sbin/scsi_id -g -u -s /block/sdc SATA_VBOX_HARDDISK_VB3edd7dc1-fd831bf4_在RHEL6下使用以下命令
scsi_id --whitelisted --replace-whitespace –-device=/dev/sdb
安装multipath rpm包
[root@db11g ~]# yum install device-mapper* Loaded plugins: rhnplugin, security This system is not registered with ULN. You can use up2date --register to register. ULN support will be disabled. Setting up Install Process Package device-mapper-multipath-0.4.9-56.0.3.el5.x86_64 already installed and latest version Package device-mapper-multipath-libs-0.4.9-56.0.3.el5.x86_64 already installed and latest version Package device-mapper-event-1.02.67-2.el5.x86_64 already installed and latest version Package device-mapper-1.02.67-2.el5.x86_64 already installed and latest version Package device-mapper-1.02.67-2.el5.i386 already installed and latest version Nothing to do [root@db11g ~]# [root@db11g ~]# [root@db11g ~]# [root@db11g ~]# [root@db11g ~]# rpm -qa|grep device-mapper device-mapper-multipath-libs-0.4.9-56.0.3.el5 device-mapper-event-1.02.67-2.el5 device-mapper-1.02.67-2.el5 device-mapper-1.02.67-2.el5 device-mapper-multipath-0.4.9-56.0.3.el5
获取grid用户的uid和gid,这里的gid是asmadmin组的gid
[root@db11g ~]# cat /etc/passwd|grep grid grid:x:1100:1000:Grid Infrastructure Owner:/home/grid:/bin/bash [root@db11g ~]# cat /etc/group|grep asmadmin asmadmin:x:1200:grid,oracle [root@db11g ~]# id -a grid uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper),1300(dba)
配置/etc/multipath.conf
[root@db11g ~]# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/ [root@db11g ~]# cat /etc/multipath.conf defaults { user_friendly_names no queue_without_daemon no flush_on_last_del yes max_fds max } blacklist { devnode "^hd[a-z]" devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^cciss.*" } devices { device { vendor "OPNFILER " product "LUN" path_grouping_policy group_by_prio features "3 queue_if_no_path pg_init_retries 50" getuid_callout "/sbin/scsi_id -g -u -s /block/%n" path_checker tur path_selector "round-robin 0" hardware_handler "1 alua" failback immediate rr_weight uniform rr_min_io 128 } } multipaths { multipath { wwid SATA_VBOX_HARDDISK_VB3c0bb909-10aab3a0_ alias datadisk uid 1100 gid 1200 } multipath { wwid SATA_VBOX_HARDDISK_VB3edd7dc1-fd831bf4_ alias fradisk uid 1100 gid 1200 } }
启动multipath
[root@db11g ~]# modprobe dm-multipath [root@db11g ~]# modprobe dm-round-robin [root@db11g ~]# chkconfig multipathd start [root@db11g ~]# chkconfig multipathd on [root@db11g ~]# /etc/init.d/multipathd start Starting multipathd daemon: [ OK ] [root@db11g ~]# ps -ef|grep multipathd root 3084 1 0 13:16 ? 00:00:00 /sbin/multipathd root 3186 2877 0 13:16 pts/0 00:00:00 grep multipathd [root@db11g ~]# multipath -F [root@db11g ~]# multipath -v2 Jan 15 13:17:40 | SATA_VBOX_HARDDISK_VBa64c2685-cc2f3dd0_: ignoring map create: datadisk (SATA_VBOX_HARDDISK_VB3c0bb909-10aab3a0_) undef ATA,VBOX HARDDISK size=16G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef `- 1:0:0:0 sdb 8:16 undef ready running create: fradisk (SATA_VBOX_HARDDISK_VB3edd7dc1-fd831bf4_) undef ATA,VBOX HARDDISK size=10G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef `- 2:0:0:0 sdc 8:32 undef ready running [root@db11g ~]# [root@db11g ~]# multipath -ll fradisk (SATA_VBOX_HARDDISK_VB3edd7dc1-fd831bf4_) dm-3 ATA,VBOX HARDDISK size=10G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active `- 2:0:0:0 sdc 8:32 active ready running datadisk (SATA_VBOX_HARDDISK_VB3c0bb909-10aab3a0_) dm-2 ATA,VBOX HARDDISK size=16G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active `- 1:0:0:0 sdb 8:16 active ready running
[root@db11g ~]# ll /dev/mapper/*disk brw-rw---- 1 grid asmadmin 252, 2 Jan 15 13:17 /dev/mapper/datadisk brw-rw---- 1 grid asmadmin 252, 3 Jan 15 13:17 /dev/mapper/fradisk


InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version
Chinese version, very easy to use