oracle 裸设备划分 --centos6.5
2018-03-14 17:41 staryea-bigdata 阅读(1127) 评论(0) 编辑 收藏 举报
主题思想:物理卷PV->卷组VG->逻辑卷LV(类型:raw)->添加表空间 操作过程
vg_orcl 8g
一:划分
[root@cdn3 rules.d]# vi 60-raw.rules
# Enter raw device bindings here.
#
# An example would be:
# ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
ACTION=="add",KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add",KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add",KERNEL=="sde1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add",KERNEL=="sdf1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add",KERNEL=="sdf2",RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw7 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw8 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw9 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw10 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw11 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw12 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw13 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw14 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw15 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw16 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw17 %N"
KERNEL=="raw4", OWNER="root", GROUP="dba", MODE="640"
KERNEL=="raw5", OWNER="oracle", GROUP="dba", MODE="644"
KERNEL=="raw[1-3]", OWNER="oracle", GROUP="dba", MODE="660"
KERNEL=="raw[6-9]", OWNER="oracle", GROUP="dba", MODE="660"
KERNEL=="raw1[0-7]", OWNER="oracle", GROUP="dba", MODE="660"
三、将lvm 与raw 绑定
raw /dev/raw/raw6 /dev/vg_orcl/lv_600M_system
raw /dev/raw/raw7 /dev/vg_orcl/lv_500M_UNDOTBS1
raw /dev/raw/raw8 /dev/vg_orcl/lv_400M_SYSAUX
raw /dev/raw/raw9 /dev/vg_orcl/lv_500M_UNDOTBS2
raw /dev/raw/raw10 /dev/vg_orcl/lv_1g_USERS
raw /dev/raw/raw11 /dev/vg_orcl/lv_1g_TEMP
raw /dev/raw/raw12 /dev/vg_orcl/lv_controlfile_1
raw /dev/raw/raw13 /dev/vg_orcl/lv_controlfile_2
raw /dev/raw/raw14 /dev/vg_orcl/lv_controlfile_3
raw /dev/raw/raw15 /dev/vg_orcl/lv_500M_redo01
raw /dev/raw/raw16 /dev/vg_orcl/lv_500M_redo02
raw /dev/raw/raw17 /dev/vg_orcl/lv_500M_redo03
raw -aq 查看已经绑定的设备
执行下面命令生效
start_udev start
查看
ls -lrt /dev/raw
三 :清空裸设备
相当于格式化啦bs是快的大小,block size
count是快的数量,这两者相乘大于裸设备的容量即可
dd if=/dev/zero of=/dev/raw/raw4 bs=8192 count=128000
dd if=/dev/zero of=/dev/raw/raw4 bs=8192 count=128000