oracleasm命令

oracleasm configure -i  --配置

oracleasm status  --狀態

oracleasm  ---LINUX 7手工加載,reboot之後仍然有效

[root@postgresql ~]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@postgresql ~]# 

oracleasm createdisk OCR_VOTE1 /dev/sdc1  --創建ASM磁盤

oracleasm createdisk OCR /dev/sdb1
oracleasm createdisk FRA  /dev/sdc1
oracleasm createdisk DATA  /dev/sdd1
oracleasm scandisks  --查看磁盤
oracleasm listdisks  --列出磁盤

 

例子:

[root@postgresql ~]# fdisk -l

Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x7fa6592e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     4196351     2097152   83  Linux
/dev/sdb2         4196352    10487807     3145728   83  Linux
/dev/sdb3        10487808    20971519     5241856   83  Linux

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000e0e42

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      616447      307200   83  Linux
/dev/sda2          616448     4810751     2097152   82  Linux swap / Solaris
/dev/sda3         4810752    41943039    18566144   83  Linux
[root@postgresql ~]# 

[root@postgresql ~]# oracleasm createdisk ocr01 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@postgresql ~]# oracleasm createdisk ocr02 /dev/sdb2
Writing disk header: done
Instantiating disk: done
[root@postgresql ~]# oracleasm createdisk ocr03 /dev/sdb3
Writing disk header: done
Instantiating disk: done
[root@postgresql ~]# oracleasm listdisks
OCR01
OCR02
OCR03
[root@postgresql ~]# cd /dev/oracleasm/
disks/ iid/   
[root@postgresql ~]# cd /dev/oracleasm/
[root@postgresql oracleasm]# ls
disks  iid
[root@postgresql oracleasm]# ls -lrt
total 0
drwxrwx---. 1 pgsql pgsql 0 Sep 10  2019 iid
drwxr-xr-x. 1 root  root  0 Sep 10  2019 disks
[root@postgresql oracleasm]# cd disks/
[root@postgresql disks]# ls
OCR01  OCR02  OCR03
[root@postgresql disks]# ls -lrt
total 0
brw-rw----. 1 pgsql pgsql 8, 17 Sep 10 20:13 OCR01
brw-rw----. 1 pgsql pgsql 8, 18 Sep 10 20:13 OCR02
brw-rw----. 1 pgsql pgsql 8, 19 Sep 10 20:13 OCR03
[root@postgresql disks]# cd /dev/oracleasm/disks/
[root@postgresql disks]# ls
OCR01  OCR02  OCR03
[root@postgresql disks]# ls -lrt
total 0
brw-rw----. 1 pgsql pgsql 8, 17 Sep 10 20:13 OCR01
brw-rw----. 1 pgsql pgsql 8, 18 Sep 10 20:13 OCR02
brw-rw----. 1 pgsql pgsql 8, 19 Sep 10 20:13 OCR03
[root@postgresql disks]# 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章