Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle storage methods compete with each other

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. File system

(the simplest way)

A portion of the space is allocated from local storage to provide storage for data.

1. Mode of use:

① formats the area (this is the name of windows. In Linux and Unix systems, it is called creating a file system. )

② mounts the disk (called drive letter in windows) # # an interface to the access area

two。 Features:

Advantages: data files are easy to access and easy to manage.

Disadvantages: access performance is affected, with an extra layer of file system in the middle

2. Bare equipment

The storage space is not formatted and the data is directly stored on the storage space.

Ordinary users cannot access it, and only database software can directly access it.

1. Characteristics

Advantages: less file system middle layer, faster access, and 20% better performance than file system.

Disadvantages: management is not convenient, can not cp,rf and other operations. But it can be handled with Oracle tools (dd, RMAN)

3. ASM disk

ASM:Automatic Storage Management (after 10g Oracle)

Provide OMF management:

When building the library manually: db_create_file_dest=+DISK1

Log file: db_create_logfile_dest=+DISK1

ASM disks, managed through asm instance. The database instance accesses the asm instance directly, which makes the access more compact and direct.

Allow interaction between operating system and ASM after Oracle 11g

4. Launch an example of managing ASM

1. Edit the contents of the ASM initialization parameter file $ORACLE_HOME/dbs/init+ASM.ora

* .background_dump_dest='/u01/app/oracle/admin/+ASM/bdump'

* .core_dump_dest='/u01/app/oracle/admin/+ASM/bdump'

* .instance_type='asm'

* .large_pool_size=12M

* .remote_login_passwordfile='SHARED'

* .user_dump_dest='/u01/app/oracle/admin/+ASM/bdump'

two。 Enable ASM instance

$export ORACLE_SID=+ASM

$sqlplus / as sysdba

SQL > startup nomount

ASM instance started

Total System Global Area 82736155 bytes

Fixed Size 6254372 byyes

Variable Size 73625362 bytes

ASM Cache 25173827 bytes

3. An error will be reported when starting (using ASM for the first time)

ORA-29701 unable to connect to Cluster Manager

The following needs to be done:

$cd $ORACLE_HOME/bin

$su root (executed as root, but does not change the environment variable)

$. / localconfig delete

$. / localconfig add

5. Bare device binding relationship

/ dev/raw/raw2: bound to major 58,minor 0

/ dev/raw/raw3: bound to major 58,minor 1

/ dev/raw/raw4: bound to major 58,minor 2

/ dev/raw/raw5: bound to major 58,minor 3

6. Create a disk group

Create diskgroup disk1 normal redundancy

Failgroup fg1 disk'/ dev/raw/raw1' name D1

Failgroup fg2 disk'/ dev/raw/raw2' name D2

Failgroup fg3 disk'/ dev/raw/raw3' name d3

Failgroup fg4 disk'/ dev/raw/raw4' name d4

Failgroup fg5 disk'/ dev/raw/raw5' name d5

Failgroup fg6 disk'/ dev/raw/raw6' name d6

Note: external redundancy (master) indicates that redundancy requires only one failure group, assuming that this disk is responsible for running database operations.

Normal redundancy standard redundancy provides two-way mirroring, which requires two failure groups on one disk.

High redundancy provides three-way mirroring, which requires three disk groups on one disk.

Create diskgroup disk1 external redundancy disk'/ dev/raw/raw3'

The files in each disk in a disk group are roughly or finely segmented, rough divided into 1m units distributed in all disks, suitable for data warehouse, fine divided into 128KB bit unit distribution files, suitable for OLTP.

7. View new available disk groups

SQL > select GROUP_NUMBER,name,type,total_mb,free_mb from v$asm_diskgroup

SQL > select group_number,disk_number,name,failgroup,create_date,path from v$asm_disk

8. Delete a disk group

Drop diskgroup disk1

Drop diskgroup disk1 including contents; (there are database objects in the disk group)

9. Add disks to a disk group

Alter diskgroup disk1 ass failgroup fg4 disk'/ dev/raw/raw4' name d4

10. Remove a disk member from a disk group

Alter diskgroup disk1 drop disk d4

11. DROP and ADD operations can be performed on the disk group at the same time, so that only one balancing operation occurs, reducing the CPU and Icano time.

Aletr diskgroup disk1 add failgroup fg4 disk'/ dev/raw/raw4' name d4 group disk d3

-end-

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report