Disk Management Part asm
[root @ localhost init.d] # fdisk / dev / sdd
rn
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
rn
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
rn
Command (m for help): w
The partition table has been altered!
rn
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
rn
Device Boot Start End Blocks Id System
/ dev/sdd1 130 261 1060 290 83 Linux
/ dev/sdd2 1 129 1036161 83 Linux
rn
Partition table entries are not in disk order
[root @ localhost init.d] #
Create asm disk
rn
[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]
rn
Create a disk group
[root @ localhost init.d] # su - oracle
[oracle @ localhost ~] $ export ORACLE_SID = + ASM
[oracle @ localhost ~] $ sqlplus "/ as sysdba"
rn
SQL * Plus: Release 10.2.0.1.0 - Production on Tue Jun 30 10:31:42 2009
rn
Copyright (c) 1982, 2005, Oracle. All rights reserved.
rn
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
rn
SQL> create diskgroup disk_group_3 normal redundancy
2 failgroup VOL6 disk 'ORCL: VOL6' name VOL6
3 failgroup VOL5 disk 'ORCL: VOL5' name vol5;
rn
Diskgroup created.
rn
SQL> drop diskgroup disk_group_3 including contents; to delete the disk group
rn
Diskgroup dropped.
rn
SQL>
rn
- Add to asm disk into the disk group already exists, the
rn
SQL> l
1 * alter diskgroup disk_group_1 add disk 'ORCL: VOL5'
SQL> /
rn
Diskgroup altered.
rn
Add to delete the disk
rn
SQL> l
1 select group_number, disk_number, name, label, path from v $ asm_disk
2 *
SQL> /
rn
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;
rn
Diskgroup altered.
rn
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 in vol5 which can be reduced to 4MB;
Can also write a resize, if small, will be the following error
rn
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
rn
SQL> c / 3 / 4
1 * alter diskgroup disk_group_1 resize disk VOL5 size 4M
SQL> /
rn
Diskgroup altered.
rn
The second group are 41MB, so the first set to 50MB;
rn
SQL> alter diskgroup disk_group_2 resize all size 50M;
rn
Diskgroup altered.
rn
rn
Related Posts of Disk Management Part asm
-
ORACLE10G full version centos5 installed (the installation has passed)
ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...
-
SGA extended the principle of 32bit oracle
SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...
-
High Availability Oracle Flashback
Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...
-
An example of the use of TKPROF
First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE
-
Diagnosis and principles of order
SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...
-
ORACLE 10G dataguard configuration Step by Step
oracle dataguard













Leave a Reply