日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux asm 磁盘管理,asm磁盘管理篇

發布時間:2024/9/3 linux 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux asm 磁盘管理,asm磁盘管理篇 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

linux上asm添加磁盤方法

劃分磁盤

[root@localhost init.d]# fdisk /dev/sdd

Command (m for help): n

Command action

e?? extended

p?? primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-261, default 1): 130

Last cylinder or +size or +sizeM or +sizeK (130-261, default 261):

Using default value 261

Command (m for help): n

Command action

e?? extended

p?? primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (1-261, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-129, default 129):

Using default value 129

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@localhost init.d]# fdisk -l

skiping................

Disk /dev/sdd: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot????? Start???????? End????? Blocks?? Id? System

/dev/sdd1???????????? 130???????? 261???? 1060290?? 83? Linux

/dev/sdd2?????????????? 1???????? 129???? 1036161?? 83? Linux

Partition table entries are not in disk order

[root@localhost init.d]#

創建為asm磁盤

[root@localhost init.d]# ./oracleasm createdisk VOL5 /dev/sdd1

Marking disk "VOL5" as an ASM disk: [? OK? ]

[root@localhost init.d]# ./oracleasm createdisk VOL6 /dev/sdd2

Marking disk "VOL6" as an ASM disk: [? OK? ]

創建磁盤組

[root@localhost init.d]# su - oracle

[oracle@localhost ~]$ export ORACLE_SID=+ASM

[oracle@localhost ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 30 10:31:42 2009

Copyright (c) 1982, 2005, Oracle.? All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

SQL> create diskgroup disk_group_3 normal redundancy

2? failgroup VOL6 disk 'ORCL:VOL6' name VOL6

3? failgroup VOL5 disk 'ORCL:VOL5' name vol5;

Diskgroup created.

SQL>? drop diskgroup disk_group_3 including contents;?????? 刪除磁盤組

Diskgroup dropped.

SQL>

--把asm劃分磁盤加到已經存在的磁盤組里,

SQL> l

1* alter diskgroup disk_group_1 add disk 'ORCL:VOL5'

SQL> /

Diskgroup altered.

刪除添加的磁盤

SQL> l

1? select group_number,disk_number,name,label,path from v$asm_disk

2*

SQL> /

GROUP_NUMBER DISK_NUMBER NAME? LABEL PATH

------------ ----------- ----- ----- ----------

0?????????? 0?????? VOL6? ORCL:VOL6

1?????????? 0 VOL1? VOL1? ORCL:VOL1

1?????????? 1 VOL2? VOL2? ORCL:VOL2

2?????????? 0 VOL3? VOL3? ORCL:VOL3

2?????????? 1 VOL4? VOL4? ORCL:VOL4

1?????????? 2 VOL5? VOL5? ORCL:VOL5

SQL> alter diskgroup disk_group_1 drop disk VOL5;

Diskgroup altered.

select group_number,disk_number,bytes_written/1024/1024 from v$asm_disk_stat

1?0?79.74072265625

1?1?77.85791015625

2?0?41.99072265625

2?1?41.99072265625

1?2?3.8515625

其中disk2中的vol5可以縮小到4MB;

也可以寫一個resize,如果太小,會報錯如下

SQL> alter diskgroup disk_group_1 resize disk VOL5 size 3M;

alter diskgroup disk_group_1 resize disk VOL5 size 3M

*

ERROR at line 1:

ORA-15032: not all alterations performed

ORA-15037: disk 'ORCL:VOL5' is smaller than mimimum of 4 MBs

SQL> c /3/4

1* alter diskgroup disk_group_1 resize disk VOL5 size 4M

SQL> /

Diskgroup altered.

其中第二組都是41MB,因此可以一次設置為50MB;

SQL> alter diskgroup disk_group_2 resize all size 50M;

Diskgroup altered.

總結

以上是生活随笔為你收集整理的linux asm 磁盘管理,asm磁盘管理篇的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。