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

ASM instance management

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

Share

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

1. Start and shut down

Execute under root account: / etc/init.d/init.ohasd run

Crs_start-all

Crs_stop-all

View the status of the instance: crs_stat-t

2. Relevant dynamic performance views:

V$asm_disk (_ stat)-View the disk and its status information

V$asm_diskgroup (_ stat)-- View disk groups and their status information

V$asm_operation-View the operation information of the current disk

V$asm_client-returns the client instance information of the current connection

V$asm_file-returns information about the asm file

V$asm_template-returns information about samples of asm files

V$asm_alias-returns the alias information of the asm file

3. View data files

Select * from v$datafile

Data file format:

1) fully qualified name:

+ group/dbname/file type/tag.file.incarnation

Group: disk group name; dbname is the database to which the file belongs; file type is the Oracle file type

Tag is information specific to the file type; file.incarnation ensures that the file is unique.

2) alias:

Alter diskgroup add alias''for''

Modify the alias:

Alter diskgroup add alias''to''

Delete alias

Alter diskgroup delete alias''

Delete a data file using an alias

Alter diskgroup drop file''

Delete data files using full name

Alter diskgroup drop file''

View alias information

Select * from v$asm_alias

4. Manage ASM disk groups

Create a new diskgroup

CREATE DISKGROUP diskgroup_name

[{HIGH | NORMAL | EXTERNAL} REDUNDANCY]

[FAILGROUP failgroup_name]

DISK [NAME disk_name] [SIZE size_clause] [FORCE | NOFORCE]...

1) create a disk before assigning a disk group

/ etc/init.d/oracleasm createdisk DATA4 / dev/sdc1

/ etc/init.d/oracleasm createdisk DATA5 / dev/sdc2

/ etc/init.d/oracleasm createdisk DATA6 / dev/sdc3

There are two ways to create:

2) Log in using SYSASM: [do not log in using SYSDBA]

Create diskgroup ASM1 normal redundancy

Failgroup DATA4 disk'/ dev/oracleasm/disks/DATA4' name DATA4

Failgroup DATA5 disk'/ dev/oracleasm/disks/DATA5' name DATA5

[will be reported to ORA-15014, ORA-15031 and cannot be modified using "alter system set asm_diskstring", report to ORA-15014]

Or

Create diskgroup ASM1 normal redundancy

Failgroup DATA4 disk 'ORCL:DATA4' name DATA4

The second method was used in the failgroup DATA5 disk 'ORCL:DATA5' name DATA5;-- test.

Delete diskgroup

Drop diskgroup [including contents] [force]

Drop diskgroup ASM1 including contents

Manual mount command

ALTER DISKGROUP ALL DISMOUNT

ALTER DISKGROUP ALL MOUNT

ALTER DISKGROUP DISMOUNT

ALTER DISKGROUP MOUNT

Disk member management

Add disk to diskgroup

Alter diskgroup DATA add disk'/ dev/oracleasm/DATA4' name DATA4,'/dev/oracleasm/DATA5' name DATA5

Or

Alter diskgroup DATA add disk 'ORCL:DATA4' name DATA4,'ORCL:DATA5' name DATA5;-the equivalent of adding failgroup

Remove disk from diskgroup

Alter diskgroup DATA drop disk DATA4;-after deletion, the status of the state in the v$asm_disk is that the dropping,ASM backend will move the information in the DATA4 to another disk, and after the information is moved, the state field will return to normal.

Cancel the command to delete disk, which is valid only when the above command is not completed.

ALTER DISKGROUP DATA UNDROP DISKS

Add a member to each fault group of DATA

Alter diskgroup DATA

Add failgroup DATA1 disk 'ORCL:DATA4'

Add failgroup DATA2 disk 'ORCL:DATA5'

5 、 Rebalance

Manual Rebalance

Alter diskgroup DATA rebalance power 3 wait

Add a directory to the disk group

Alter diskgroup DATA add directory'+ DATA/datafile'

Dynamic balance:

Alter diskgroup DATA add disk 'ORCL:DATA4' rebalance power 11

6 、 asmcmd

The asmcmd command provides access to the contents of the ASM disk group. You can use the asmcmd command by adding information about the instance to ~ / .bash_profile among grid users.

You can use help to view the asmcmd command. For specific usage, please refer to the function and usage of the command in help [command] .asmcmd is similar to that in Linux.

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