暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

扩展Oracle10gR2 ASM磁盘空间

原创 eygle 2006-02-17
578

一个Linux AD4上的Oracle10gR2数据库,由于空间不足,扩展了一下硬盘,增加100G做为数据库存储.


在ASM中,可以使用如下类似步骤将存储加入到ASM磁盘组中.


1.确认候选磁盘


此处为/dev/cciss/c0d2p2


[root@danaly /]# fdisk /dev/cciss/c0d2
复制

The number of cylinders for this disk is set to 52299.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
复制

Command (m for help): p
复制

Disk /dev/cciss/c0d2: 218.5 GB, 218501038080 bytes
255 heads, 32 sectors/track, 52299 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
复制

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d2p1               1       26150   106691984   83  Linux
/dev/cciss/c0d2p2           26151       52299   106687920   83  Linux
复制

Command (m for help): q 
复制


2.使用ASM创建磁盘卷


[root@danaly /]# /etc/init.d/oracleasm createdisk VOL6 /dev/cciss/c0d2p2
Marking disk "/dev/cciss/c0d2p2" as an ASM disk: [  OK  ]
[root@danaly /]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4
VOL5
VOL6 
复制

3.在ASM实例中加入磁盘


SQL> select name,TOTAL_MB,FREE_MB from v$asm_diskgroup;
复制

NAME         TOTAL_MB    FREE_MB
---------- ---------- ----------
ORADG           69459      17384
复制

SQL> alter diskgroup ORADG add disk 'ORCL:VOL6' rebalance power 11;
复制

Diskgroup altered.
复制

SQL> select group_number,disk_number,mode_status,name from v$asm_disk;
复制

GROUP_NUMBER DISK_NUMBER MODE_STATUS    NAME
------------ ----------- -------------- ----------
           0           4 ONLINE
           1           0 ONLINE         VOL1
           1           1 ONLINE         VOL2
           1           2 ONLINE         VOL3
           1           3 ONLINE         VOL4
           1           4 ONLINE         VOL6
复制

6 rows selected.
复制

SQL> select name,TOTAL_MB,FREE_MB from v$asm_diskgroup;
复制

NAME         TOTAL_MB    FREE_MB
---------- ---------- ----------
ORADG          173646     121569 
复制

至此扩展完毕.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论