In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what is the creation and expansion method of ASM disk group". In daily operation, I believe many people have doubts about the creation and expansion method of ASM disk group. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "what is the creation and expansion method of ASM disk group". Next, please follow the editor to study!
Mount the shared storage to all nodes and confirm the drive letter. Note that the drive letter of the same disk may be different on different nodes. Labeling the disk can only be operated on one of the nodes. The host cannot be restarted before the disk is tagged. There is no effect when the drive letter of the host is restarted after the disk is tagged.
1. Check the disk partition on Node 1.
In order to avoid allocating reused disks as new storage, be sure to confirm that there are no partitions on the newly added disks before operation, and immediately check with the storage administrator if there are already partitions.
[root@pgylinux01-or ~] # fdisk-l | grep / dev/sdd
Disk / dev/sdd: 5368 MB, 5368709120 bytes
[root@pgylinux01-or ~] # fdisk-l | grep / dev/sde
Disk / dev/sde: 5368 MB, 5368709120 bytes
There is no partition information in the output result, which indicates that it is an unused disk and can be safely used.
2. Disk partition
Partition the new disk, each disk is divided into one zone
[root@pgylinux01-or ~] # fdisk-l | grep / dev/sdd
Disk / dev/sdd: 5368 MB, 5368709120 bytes
/ dev/sdd1 1 652 5237158 + 83 Linux
[root@pgylinux01-or ~] # fdisk-l | grep / dev/sde
Disk / dev/sde: 5368 MB, 5368709120 bytes
/ dev/sde1 1 652 5237158 + 83 Linux
3. Tagging
[root@pgylinux01-or] # / etc/init.d/oracleasm createdisk DATA_03 / dev/sdd1
Marking disk "DATA_03" as an ASM disk: [OK]
[root@pgylinux01-or] # / etc/init.d/oracleasm createdisk DATA_04 / dev/sde1
Marking disk "DATA_04" as an ASM disk: [OK]
4. Scan the disk on all nodes, otherwise the disk cannot be added
[root@pgylinux02-or ~] # / etc/init.d/oracleasm listdisks
DATA_01
DATA_02
[root@pgylinux02-or ~] # / etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [OK]
[root@pgylinux02-or ~] # / etc/init.d/oracleasm listdisks
DATA_01
DATA_02
DATA_03
DATA_04
5. Add disk
You can use either ASMCA or sqlplus to add disks, here using sqlplus.
1) enter asmcmd to view alternate disks and their path
ASMCMD > lsdsk-- candidate
Path
ORCL:DATA_03
ORCL:DATA_04
2) Log in with sqlplus as as sysasm to create a disk group
# View existing disk group information
SQL > SELECT GROUP_NUMBER,NAME,STATE,TYPE FROM V$ASM_DISKGROUP
GROUP_NUMBER NAME STATE TYPE
-
1 DATA MOUNTED EXTERN
2 OCR MOUNTED EXTERN
# add a disk group
SQL > CREATE DISKGROUP GRID EXTERNAL REDUNDANCY DISK 'ORCL:DATA_03'
Diskgroup created.
# check the disk group information again and see that the new disk group has been created
SQL > SELECT GROUP_NUMBER,NAME,STATE,TYPE FROM V$ASM_DISKGROUP
GROUP_NUMBER NAME STATE TYPE
-
1 DATA MOUNTED EXTERN
2 OCR MOUNTED EXTERN
3 GRID MOUNTED EXTERN
Note: disk groups added in sqlplus mode do not automatically MOUNT on other nodes and need to be manually MOUNT.
If the disk group is created using the ASMCA graphical tool, the compatible.asm default setting is 11.2. If created using the SQL command CREATE DISKGROUP, the default setting is 10.1, which needs to be manually modified. Therefore, you need to set the version manually first, with the following instructions:
SQL > ALTER DISKGROUP GRID SET ATTRIBUTE 'COMPATIBLE.ASM'='11.2'
Diskgroup altered.
3) expand the disk group
Here we only add one disk when we CREATE DISKGROUP GRID, and then we add another disk to the GRID disk group, which is also operated under sqlplus
SQL > ALTER DISKGROUP GRID ADD DISK 'ORCL:DATA_04'
Diskgroup altered.
At this point, the study on "what is the method of creating and expanding ASM disk groups" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.