码迷,mamicode.com
首页 > 其他好文 > 详细

裸设备

时间:2014-06-26 06:15:55      阅读:272      评论:0      收藏:0      [点我收藏+]

标签:   设备   

  1. 新建LVM卷:

    #lvcreate -L 2048M-n lv_system oracledg

    #lvcreate -L 1024M-n lv_redo01 oracledg

    #lvcreate -L 1024M-n lv_redo02 oracledg

    # lvcreate -L 1024M -n lv_redo03 oracledg

    #lvcreate -L 2048M-n lv_tools01 oracledg

    #lvcreate -L 2048M-n lv_rbs oracledg

    #lvcreate -L 2048M-n lv_undotdbs01 oracledg

    #lvcreate -L 2048M-n lv_tmp01 oracledg

    #lvcreate -L 512M-n lv_users01 oracledg

    #lvcreate -L 2048M-n lv_index01 oracledg

    #lvcreate -L 256M-n lv_control01 oracledg

    #lvcreate -L 256M-n lv_control02 oracledg

    #lvcreate -L 256M-n lv_control03 oracledg

    #lvcreate -L 128M-n lv_spfile oracledg

    #lvcreate -L 1024M-n lv_xdb01 oracledg

    #lvcreate -L 1024M-n lv_drsys01oracledg

    #lvcreate -L 512M-n lv_example01 oracledg

    #lvcreate -L 2048M-n lv_oracledg01 oracledg

    #lvcreate -L 2048M-n lv_oracledg02 oracledg

    #lvcreate -L 2048M -n lv_oracledg03oracledg

    #lvcreate -L 2048M -n lv_oracledg04oracledg

    #lvcreate -L 2048M -n lv_oracledg05oracledg

    #lvcreate -L 2048M -n lv_oracledg06oracledg

    #lvcreate -L 2048M -n lv_oracledg07oracledg

  2. 检查系统是否创建过裸设备

    #cd /dev/raw

    #ls -al

    #raw -qa      //检查裸设备是否被占用,没占用则无信息输出

    备注:如果已有裸设备在使用,则新建裸设备不可与现有的裸设备序列号冲突

  3. 新建裸设备(我环境中没有创建过裸设备):

    # mknod /dev/raw/raw1  c 162 1 

    # mknod /dev/raw/raw2  c 162 2 

    # mknod /dev/raw/raw3  c 162 3 

    # mknod /dev/raw/raw4  c 162 4 

    # mknod /dev/raw/raw5  c 162 5 

    # mknod /dev/raw/raw6  c 162 6 

    # mknod /dev/raw/raw7  c 162 7 

    # mknod /dev/raw/raw8  c 162 8 

    # mknod /dev/raw/raw9  c 162 9 

    # mknod /dev/raw/raw10 c 162 10

    # mknod /dev/raw/raw11 c 162 11

    # mknod /dev/raw/raw12 c 162 12

    # mknod /dev/raw/raw13 c 162 13

    # mknod /dev/raw/raw14 c 162 14

    # mknod /dev/raw/raw15 c 162 15

    # mknod /dev/raw/raw16 c 162 16

    # mknod /dev/raw/raw17 c 162 17

    # mknod /dev/raw/raw18 c 162 18

    # mknod /dev/raw/raw19 c 162 19

    # mknod /dev/raw/raw20 c 162 20

    # mknod /dev/raw/raw21 c 162 21

    # mknod /dev/raw/raw22 c 162 22

    # mknod /dev/raw/raw23 c 162 23

    # mknod /dev/raw/raw24 c 162 24

  4. 修改裸设备文件节点属组(以数据库使用为例)

    # chown -R oracle:oinstall /dev/raw/raw1 

    # chown -R oracle:oinstall /dev/raw/raw2 

    # chown -R oracle:oinstall /dev/raw/raw3 

    # chown -R oracle:oinstall /dev/raw/raw4 

    # chown -R oracle:oinstall /dev/raw/raw5 

    # chown -R oracle:oinstall /dev/raw/raw6 

    # chown -R oracle:oinstall /dev/raw/raw7 

    # chown -R oracle:oinstall /dev/raw/raw8 

    # chown -R oracle:oinstall /dev/raw/raw9 

    # chown -R oracle:oinstall /dev/raw/raw10

    # chown -R oracle:oinstall /dev/raw/raw11

    # chown -R oracle:oinstall /dev/raw/raw12

    # chown -R oracle:oinstall /dev/raw/raw13

    # chown -R oracle:oinstall /dev/raw/raw14

    # chown -R oracle:oinstall /dev/raw/raw15

    # chown -R oracle:oinstall /dev/raw/raw16

    # chown -R oracle:oinstall /dev/raw/raw17

    # chown -R oracle:oinstall /dev/raw/raw18

    # chown -R oracle:oinstall /dev/raw/raw19

    # chown -R oracle:oinstall /dev/raw/raw20

    # chown -R oracle:oinstall /dev/raw/raw21

    # chown -R oracle:oinstall /dev/raw/raw22

    # chown -R oracle:oinstall /dev/raw/raw23

    # chown -R oracle:oinstall /dev/raw/raw24

  5. 绑定逻辑卷和裸设备:

    # raw /dev/raw/raw1 /dev/oracledg/lv_system

    # raw /dev/raw/raw2 /dev/oracledg/lv_redo01

    # raw /dev/raw/raw3 /dev/oracledg/lv_redo02

    # raw /dev/raw/raw4 /dev/oracledg/lv_redo03

    # raw /dev/raw/raw5 /dev/oracledg/lv_tools01

    # raw /dev/raw/raw6 /dev/oracledg/lv_rbs

    # raw /dev/raw/raw7 /dev/oracledg/lv_undotdbs01

    # raw /dev/raw/raw8 /dev/oracledg/lv_tmp01

    # raw /dev/raw/raw9 /dev/oracledg/lv_users01

    # raw /dev/raw/raw10 /dev/oracledg/lv_index01

    # raw /dev/raw/raw11 /dev/oracledg/lv_control01

    # raw /dev/raw/raw12 /dev/oracledg/lv_control02

    # raw /dev/raw/raw13 /dev/oracledg/lv_control03

    # raw /dev/raw/raw14 /dev/oracledg/lv_spfile

    # raw /dev/raw/raw15 /dev/oracledg/lv_xdb01

    # raw /dev/raw/raw16 /dev/oracledg/lv_drsys01

    # raw /dev/raw/raw17 /dev/oracledg/lv_example01

    # raw /dev/raw/raw18 /dev/oracledg/lv_oracledg01

    # raw /dev/raw/raw19 /dev/oracledg/lv_oracledg02

    # raw /dev/raw/raw20 /dev/oracledg/lv_oracledg03

    # raw /dev/raw/raw21 /dev/oracledg/lv_oracledg04

    # raw /dev/raw/raw22 /dev/oracledg/lv_oracledg05

    # raw /dev/raw/raw23 /dev/oracledg/lv_oracledg06

    # raw /dev/raw/raw24 /dev/oracledg/lv_oracledg07

本文出自 “精彩IT圈” 博客,转载请与作者联系!

裸设备,布布扣,bubuko.com

裸设备

标签:   设备   

原文地址:http://jiagd.blog.51cto.com/3915719/1430840

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!