solaris 10_oracle10g asm_create_alter_diskgroup相關命令
SQL> create diskgroup dg2 external redundancy disk '/dev/rdsk/c0d1s5';---建立磁碟組,如果不加name選項,系統會自動生成一個值,對應v$asm_disk的name
Diskgroup created.
SQL> alter diskgroup dg2 add disk '/dev/rdsk/c0d1s0' name dg2_new_disk; ---向磁碟組新增磁碟(報這個錯可能這個磁碟已被使用)
alter diskgroup dg2 add disk '/dev/rdsk/c0d1s0' name dg2_new_disk
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15201: disk /dev/rdsk/c0d1s0 contains a valid RDBMS file
SQL> alter diskgroup dg2 add disk '/dev/rdsk/c0d1s6' name dg2_new_disk;---新增磁碟到磁碟組成功,注意name後跟有的v$asm_disk的name值,不是實際對應的format分割槽
Diskgroup altered.
SQL> select a.name,a.path from v$asm_disk a where a.group_number in(select b.group_number from v$asm_diskgroup b where b.name='DG2');
---檢視以上磁碟組的磁碟資訊(path就是磁碟對應的format分割槽資訊)
NAME
------------------------------
PATH
--------------------------------------------------------------------------------
DG2_0001
/dev/rdsk/c0d1s3
DG2_0000
/dev/rdsk/c0d1s5
DG2_NEW_DISK
/dev/rdsk/c0d1s6
SQL> alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6'; ---此處報錯是disk後跟v$asm_disk的name值,而非format分割槽
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S6" does not exist in diskgroup "DG2"
SQL> /
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S6" does not exist in diskgroup "DG2"
SQL> alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6' force;
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6' force
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S6" does not exist in diskgroup "DG2"
SQL> alter diskgroup dg2 drop diskalter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5';
alter diskgroup dg2 drop diskalter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5'
*
ERROR at line 1:
ORA-00905: missing keyword
SQL> alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5';
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S5" does not exist in diskgroup "DG2"
SQL> select a.name,a.path from v$asm_disk a where a.group_number in(select b.group_number from v$asm_diskgroup b where b.name='DG2');
NAME
------------------------------
PATH
--------------------------------------------------------------------------------
DG2_0001
/dev/rdsk/c0d1s3
DG2_0000
/dev/rdsk/c0d1s5
DG2_NEW_DISK
/dev/rdsk/c0d1s6
SQL> alter diskgroup dg2 drop disk dg2_new_disk;--成功刪除從磁碟組中去除一個磁碟
Diskgroup altered.
SQL> select a.name,a.path from v$asm_disk a where a.group_number in(select b.group_number from v$asm_diskgroup b where b.name='DG2');
NAME
------------------------------
PATH
--------------------------------------------------------------------------------
DG2_0001
/dev/rdsk/c0d1s3
DG2_0000
/dev/rdsk/c0d1s5
SQL> drop diskgroup dg2 including contents;---刪除磁碟組
Diskgroup dropped.
Diskgroup created.
SQL> alter diskgroup dg2 add disk '/dev/rdsk/c0d1s0' name dg2_new_disk; ---向磁碟組新增磁碟(報這個錯可能這個磁碟已被使用)
alter diskgroup dg2 add disk '/dev/rdsk/c0d1s0' name dg2_new_disk
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15201: disk /dev/rdsk/c0d1s0 contains a valid RDBMS file
SQL> alter diskgroup dg2 add disk '/dev/rdsk/c0d1s6' name dg2_new_disk;---新增磁碟到磁碟組成功,注意name後跟有的v$asm_disk的name值,不是實際對應的format分割槽
Diskgroup altered.
SQL> select a.name,a.path from v$asm_disk a where a.group_number in(select b.group_number from v$asm_diskgroup b where b.name='DG2');
---檢視以上磁碟組的磁碟資訊(path就是磁碟對應的format分割槽資訊)
NAME
------------------------------
PATH
--------------------------------------------------------------------------------
DG2_0001
/dev/rdsk/c0d1s3
DG2_0000
/dev/rdsk/c0d1s5
DG2_NEW_DISK
/dev/rdsk/c0d1s6
SQL> alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6'; ---此處報錯是disk後跟v$asm_disk的name值,而非format分割槽
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S6" does not exist in diskgroup "DG2"
SQL> /
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S6" does not exist in diskgroup "DG2"
SQL> alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6' force;
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s6' force
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S6" does not exist in diskgroup "DG2"
SQL> alter diskgroup dg2 drop diskalter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5';
alter diskgroup dg2 drop diskalter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5'
*
ERROR at line 1:
ORA-00905: missing keyword
SQL> alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5';
alter diskgroup dg2 drop disk '/dev/rdsk/c0d1s5'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C0D1S5" does not exist in diskgroup "DG2"
SQL> select a.name,a.path from v$asm_disk a where a.group_number in(select b.group_number from v$asm_diskgroup b where b.name='DG2');
NAME
------------------------------
PATH
--------------------------------------------------------------------------------
DG2_0001
/dev/rdsk/c0d1s3
DG2_0000
/dev/rdsk/c0d1s5
DG2_NEW_DISK
/dev/rdsk/c0d1s6
SQL> alter diskgroup dg2 drop disk dg2_new_disk;--成功刪除從磁碟組中去除一個磁碟
Diskgroup altered.
SQL> select a.name,a.path from v$asm_disk a where a.group_number in(select b.group_number from v$asm_diskgroup b where b.name='DG2');
NAME
------------------------------
PATH
--------------------------------------------------------------------------------
DG2_0001
/dev/rdsk/c0d1s3
DG2_0000
/dev/rdsk/c0d1s5
SQL> drop diskgroup dg2 including contents;---刪除磁碟組
Diskgroup dropped.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-620561/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- solaris10_相關命令_處理器_相關
- solaris 10_相關命令_quota_
- Solaris的硬體相關命令(轉)
- solaris 10_相關命令_ps_pgrep_pkill_pstop_pstart
- Solaris 10 網路卡相關配置
- solaris 10的ftp相關配置FTP
- solaris10_audit_相關_轉載
- Oracle相關命令Oracle
- vagrant 相關命令
- Vim相關命令
- oem相關命令
- RMAN命令相關
- BGP相關命令
- Solaris關機重啟命令小結
- solaris 10_oracle asm_diskgroup_failgroup_相關OracleASMAI
- Composer 相關命令
- AIX相關管理命令AI
- gpfs 相關命令大全
- pip 相關命令操作
- 相關dos命令合集
- Solaris 命令大全
- Linux 相關scsi命令Linux
- AIX系統相關命令AI
- linux 安全相關命令Linux
- 【hadoop/Spark】相關命令HadoopSpark
- Linux 核心相關命令Linux
- mvn 相關命令彙總
- 利用echo把內容寫入相關solaris 檔案
- Solaris 與系統資訊有關的操作命令(轉)
- solaris10_oracle10g asm_相關基本概念OracleASM
- Linux 、docker 、nginx 相關命令LinuxDockerNginx
- 【linux】命令-網路相關Linux
- adb Gradle相關命令Gradle
- 5-Docker映象相關命令Docker
- vi編輯器相關命令
- 資料卷的相關命令
- mvn相關介紹和命令
- Linux網路相關命令Linux