日期:2014-05-16  浏览次数:20515 次

LVM上实施ASM

    环境:RHEL-5.8     oracle _10gR2

 

    绑定裸设备

[root@localhost ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1288    10241437+  83  Linux
/dev/sda4            1289        3916    21109410    5  Extended
/dev/sda5            1289        1301      104391   8e  Linux LVM
/dev/sda6            1302        1314      104391   8e  Linux LVM
/dev/sda7            1315        1327      104391   8e  Linux LVM
/dev/sda8            1328        1340      104391   8e  Linux LVM
/dev/sda9            1341        1353      104391   8e  Linux LVM
/dev/sda10           1354        1366      104391   8e  Linux LVM
/dev/sda11           1367        1379      104391   8e  Linux LVM
/dev/sda12           1380        1392      104391   8e  Linux LVM


    ②  在 /etc/sysconfig/rawdevices、添加:

/dev/raw/raw5    /dev/sda5
/dev/raw/raw6    /dev/sda6
/dev/raw/raw7    /dev/sda7
/dev/raw/raw8    /dev/sda8
/dev/raw/raw9    /dev/sda9
/dev/raw/raw10   /dev/sda10
/dev/raw/raw11   /dev/sda11
/dev/raw/raw12   /dev/sda12


    ③  在 /etc/rc.d/init.d/rawdevices的start处的assign_raw下、添加:

sleep 3
chown -R oracle:oinstall /dev/raw/


    ④  校验裸设备

[root@localhost init.d]# chkconfig rawdevices on
[root@localhost init.d]# partprobe
[root@localhost init.d]# service rawdevices restart
Assigning devices: 
           /dev/raw/raw5  -->   /dev/sda5
/dev/raw/raw5:  bound to major 8, minor 5
           /dev/raw/raw6  -->   /dev/sda6
/dev/raw/raw6:  bound to major 8, minor 6
           /dev/raw/raw7  -->   /dev/sda7
/dev/raw/raw7:  bound to major 8, minor 7
           /dev/raw/raw8  -->   /dev/sda8
/dev/raw/raw8:  bound to major 8, minor 8
           /dev/raw/raw9  -->   /dev/sda9
/dev/raw/raw9:  bound to major 8, minor 9
           /dev/raw/raw10  -->   /dev/sda10
/dev/raw/raw10: bound to major 8, minor 10
           /dev/raw/raw11  -->   /dev/sda11
/dev/raw/raw11: bound to major 8, minor 11
           /dev/raw/raw12  -->   /dev/sda12
/dev/raw/raw12: bound to major 8, minor 12
done
[root@localhost init.d]# raw -qa
/dev/raw/raw5:  bound to major 8, minor 5
/dev/raw/raw6:  bound to major 8, minor 6
/dev/raw/raw7:  bound to major 8, minor 7
/dev/raw/raw8:  bound to major 8, minor 8
/dev/raw/raw9:  bound to major 8, minor 9
/dev/raw/raw10: bound to major 8, minor 10
/dev/raw/raw11: bound to major 8, minor 11
/dev/raw/raw12: bound to major 8, minor 12


    ⑤  增加权限

[root@localhost init.d]# cd /dev/raw/
[root@localhost raw]# ls -l
总计 0
crw------- 1 oracle oinstall 162, 10 10-31 23:35 raw10
crw------- 1 oracle oinstall 162, 11 10-31 23:35 raw11
crw------- 1 oracle oinstall 162, 12 10-31 23:35 raw12
crw------- 1 oracle oinstall 162,  5 10-31 23:35 raw5
crw------- 1 oracle oinstall 162,  6 10-31 23:35 raw6
crw------- 1 oracle oinstall 162,  7 10-31 23:35 raw7
crw------- 1 oracle oinstall 162,  8 10-31 23:35 raw8
crw------- 1 oracle oinstall 162,  9 10-31 23:35 raw9
[root@localhost raw]# chmod 660 *
[root@localhost raw]# ls -l
总计 0
crw-rw---- 1 oracle oinstall 162, 10 10-31 23:35 raw10
crw-rw---- 1 oracle oinstall 162, 11 10-31 23:35 raw11
crw-rw---- 1 oracle oinstall 162, 12 10-31 23:35 raw