fdisk /dev/sdb pvcreate /dev/sdb1 vgcreate rac /dev/sdb1
[root@oraw1 ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x69a046cf. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-2610, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): Using default value 2610 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
[root@oraw1 ~]# pvcreate /dev/sdb1 Physical volume "/dev/sdb1" successfully created
[root@oraw1 ~]# vgcreate rac /dev/sdb1 Volume group "rac" successfully created
lvcreate -L 300M -n ocr01 rac lvcreate -L 300M -n ocr02 rac lvcreate -L 300M -n vote01 rac lvcreate -L 300M -n vote02 rac lvcreate -L 300M -n vote03 rac lvcreate -L 1024M -n system rac lvcreate -L 1024M -n sysaux rac lvcreate -L 1024M -n users rac lvcreate -L 700M -n temp rac lvcreate -L 1024M -n undotbs1 rac lvcreate -L 1024M -n undotbs2 rac lvcreate -L 100M -n control01 rac lvcreate -L 100M -n control02 rac lvcreate -L 200M -n redo01 rac lvcreate -L 200M -n redo02 rac lvcreate -L 200M -n redo03 rac lvcreate -L 200M -n redo04 rac lvcreate -L 200M -n redo05 rac lvcreate -L 200M -n redo06 rac lvcreate -L 200M -n spfile rac
[root@oraw1 ~]# lvcreate -L 300M -n ocr01 rac Logical volume "ocr01" created. [root@oraw1 ~]# lvcreate -L 300M -n ocr02 rac Logical volume "ocr02" created. [root@oraw1 ~]# lvcreate -L 300M -n vote01 rac Logical volume "vote01" created. [root@oraw1 ~]# lvcreate -L 300M -n vote02 rac Logical volume "vote02" created. [root@oraw1 ~]# lvcreate -L 300M -n vote03 rac Logical volume "vote03" created. [root@oraw1 ~]# lvcreate -L 1024M -n system rac Logical volume "system" created. [root@oraw1 ~]# lvcreate -L 1024M -n sysaux rac Logical volume "sysaux" created. [root@oraw1 ~]# lvcreate -L 1024M -n users rac Logical volume "users" created. [root@oraw1 ~]# lvcreate -L 700M -n temp rac Logical volume "temp" created. [root@oraw1 ~]# lvcreate -L 1024M -n undotbs1 rac Logical volume "undotbs1" created. [root@oraw1 ~]# lvcreate -L 1024M -n undotbs2 rac Logical volume "undotbs2" created. [root@oraw1 ~]# lvcreate -L 100M -n control01 rac Logical volume "control01" created. [root@oraw1 ~]# lvcreate -L 100M -n control02 rac Logical volume "control02" created. [root@oraw1 ~]# lvcreate -L 200M -n redo01 rac Logical volume "redo01" created. [root@oraw1 ~]# lvcreate -L 200M -n redo02 rac Logical volume "redo02" created. [root@oraw1 ~]# lvcreate -L 200M -n redo03 rac Logical volume "redo03" created. [root@oraw1 ~]# lvcreate -L 200M -n redo04 rac Logical volume "redo04" created. [root@oraw1 ~]# lvcreate -L 200M -n redo05 rac Logical volume "redo05" created. [root@oraw1 ~]# lvcreate -L 200M -n redo06 rac Logical volume "redo06" created. [root@oraw1 ~]# lvcreate -L 200M -n spfile rac Logical volume "spfile" created.
lvdisplay
[root@oraw1 ~]# lvdisplay --- Logical volume --- LV Path /dev/rac/ocr01 LV Name ocr01 VG Name rac LV UUID JrX0JK-aQ0J-673L-uMhB-CIYI-Fglk-KOilh7 LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:43 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:0 --- Logical volume --- LV Path /dev/rac/ocr02 LV Name ocr02 VG Name rac LV UUID uctLXU-VM5o-MIgL-sUs0-usJO-Fdfj-ioez02 LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:51 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:1 --- Logical volume --- LV Path /dev/rac/vote01 LV Name vote01 VG Name rac LV UUID 1FkVqH-yG0g-Xu2r-gjhm-wFQm-yJIU-yJbqJN LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:51 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:2 --- Logical volume --- LV Path /dev/rac/vote02 LV Name vote02 VG Name rac LV UUID 0Eh6pD-rLwr-k3BL-2xhZ-7dLC-jgHn-df2Ahw LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:52 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:3 --- Logical volume --- LV Path /dev/rac/vote03 LV Name vote03 VG Name rac LV UUID sezHGs-hOMP-lDhM-Sipw-ghFs-Tjca-o7qTL3 LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:52 +0900 LV Status available # open 0 LV Size 300.00 MiB Current LE 75 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:4 --- Logical volume --- LV Path /dev/rac/system LV Name system VG Name rac LV UUID 7YR7ol-2HW5-90l4-XRIY-1uj6-Lft6-9WoYgy LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:52 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:5 --- Logical volume --- LV Path /dev/rac/sysaux LV Name sysaux VG Name rac LV UUID cK4aKc-DnSw-xa2f-xEfC-Gz4X-U9HC-OM9bnK LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:52 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:6 --- Logical volume --- LV Path /dev/rac/users LV Name users VG Name rac LV UUID SJ49r2-0cw7-4tB1-C5yq-Bo0I-aq7Q-CZJ2pn LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:53 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:7 --- Logical volume --- LV Path /dev/rac/temp LV Name temp VG Name rac LV UUID 8kknqN-XGdH-usDJ-BunZ-A3FP-lef0-NgbyJ6 LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:53 +0900 LV Status available # open 0 LV Size 700.00 MiB Current LE 175 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:8 --- Logical volume --- LV Path /dev/rac/undotbs1 LV Name undotbs1 VG Name rac LV UUID s0Inp2-ouzY-wcJu-K8AX-6cGO-nSNA-eXieVO LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:53 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:9 --- Logical volume --- LV Path /dev/rac/undotbs2 LV Name undotbs2 VG Name rac LV UUID 8sgs3p-pd9V-PAOm-llFR-WFmR-QxBe-5HTj62 LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:54 +0900 LV Status available # open 0 LV Size 1.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:10 --- Logical volume --- LV Path /dev/rac/control01 LV Name control01 VG Name rac LV UUID ew3mMZ-ZKgw-UARd-Iiag-xzmF-yemz-pZZ9cR LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:54 +0900 LV Status available # open 0 LV Size 100.00 MiB Current LE 25 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:11 --- Logical volume --- LV Path /dev/rac/control02 LV Name control02 VG Name rac LV UUID plaxgN-GkEO-im1R-FiZ0-AENM-TZC1-XtBRmL LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:54 +0900 LV Status available # open 0 LV Size 100.00 MiB Current LE 25 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:12 --- Logical volume --- LV Path /dev/rac/redo01 LV Name redo01 VG Name rac LV UUID 4zcMme-Lnmp-AXr2-rSY0-6kms-nD7K-iPRI3j LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:55 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:13 --- Logical volume --- LV Path /dev/rac/redo02 LV Name redo02 VG Name rac LV UUID 5GMzKE-ieR1-zbCX-qMRp-fo5s-rPWE-6LbuQg LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:55 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:14 --- Logical volume --- LV Path /dev/rac/redo03 LV Name redo03 VG Name rac LV UUID ExRfn2-SUCD-JK2R-6bz1-L4nL-ti5v-jUWUb7 LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:55 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:15 --- Logical volume --- LV Path /dev/rac/redo04 LV Name redo04 VG Name rac LV UUID Km9UEL-DUwy-FQlv-38BJ-dxt8-LJvb-WryRAb LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:55 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:16 --- Logical volume --- LV Path /dev/rac/redo05 LV Name redo05 VG Name rac LV UUID AE6iEo-47bu-KWAr-wVXv-gJTv-BDgb-iWiMZR LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:56 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:17 --- Logical volume --- LV Path /dev/rac/redo06 LV Name redo06 VG Name rac LV UUID n4ZBH1-hHZW-SqTM-IBzR-IcGu-lknF-mC9ydr LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:56 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:18 --- Logical volume --- LV Path /dev/rac/spfile LV Name spfile VG Name rac LV UUID Ll5xTB-VGhs-wotZ-n5OG-Pidm-WbkK-ouQ73z LV Write Access read/write LV Creation host, time oraw1, 2019-04-04 09:21:56 +0900 LV Status available # open 0 LV Size 200.00 MiB Current LE 50 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 249:19
vi /etc/rc.d/rc.local
raw /dev/raw/raw1 /dev/rac/ocr01 raw /dev/raw/raw2 /dev/rac/ocr02 raw /dev/raw/raw3 /dev/rac/vote01 raw /dev/raw/raw4 /dev/rac/vote02 raw /dev/raw/raw5 /dev/rac/vote03 raw /dev/raw/raw6 /dev/rac/system raw /dev/raw/raw7 /dev/rac/sysaux raw /dev/raw/raw8 /dev/rac/users raw /dev/raw/raw9 /dev/rac/temp raw /dev/raw/raw10 /dev/rac/undotbs1 raw /dev/raw/raw11 /dev/rac/undotbs2 raw /dev/raw/raw12 /dev/rac/control01 raw /dev/raw/raw13 /dev/rac/control02 raw /dev/raw/raw14 /dev/rac/redo01 raw /dev/raw/raw15 /dev/rac/redo02 raw /dev/raw/raw16 /dev/rac/redo03 raw /dev/raw/raw17 /dev/rac/redo04 raw /dev/raw/raw18 /dev/rac/redo05 raw /dev/raw/raw19 /dev/rac/redo06 raw /dev/raw/raw20 /dev/rac/spfile # chown grid:dba /dev/raw/raw*
[root@oraw1 ~]# raw /dev/raw/raw1 /dev/rac/ocr01 /dev/raw/raw1: bound to major 249, minor 0 [root@oraw1 ~]# raw /dev/raw/raw2 /dev/rac/ocr02 /dev/raw/raw2: bound to major 249, minor 1 [root@oraw1 ~]# raw /dev/raw/raw3 /dev/rac/vote01 /dev/raw/raw3: bound to major 249, minor 2 [root@oraw1 ~]# raw /dev/raw/raw4 /dev/rac/vote02 /dev/raw/raw4: bound to major 249, minor 3 [root@oraw1 ~]# raw /dev/raw/raw5 /dev/rac/vote03 /dev/raw/raw5: bound to major 249, minor 4 [root@oraw1 ~]# raw /dev/raw/raw6 /dev/rac/system /dev/raw/raw6: bound to major 249, minor 5 [root@oraw1 ~]# raw /dev/raw/raw7 /dev/rac/sysaux /dev/raw/raw7: bound to major 249, minor 6 [root@oraw1 ~]# raw /dev/raw/raw8 /dev/rac/users /dev/raw/raw8: bound to major 249, minor 7 [root@oraw1 ~]# raw /dev/raw/raw9 /dev/rac/temp /dev/raw/raw9: bound to major 249, minor 8 [root@oraw1 ~]# raw /dev/raw/raw10 /dev/rac/undotbs1 /dev/raw/raw10: bound to major 249, minor 9 [root@oraw1 ~]# raw /dev/raw/raw11 /dev/rac/undotbs2 /dev/raw/raw11: bound to major 249, minor 10 [root@oraw1 ~]# raw /dev/raw/raw12 /dev/rac/control01 /dev/raw/raw12: bound to major 249, minor 11 [root@oraw1 ~]# raw /dev/raw/raw13 /dev/rac/control02 /dev/raw/raw13: bound to major 249, minor 12 [root@oraw1 ~]# raw /dev/raw/raw14 /dev/rac/redo01 /dev/raw/raw14: bound to major 249, minor 13 [root@oraw1 ~]# raw /dev/raw/raw15 /dev/rac/redo02 /dev/raw/raw15: bound to major 249, minor 14 [root@oraw1 ~]# raw /dev/raw/raw16 /dev/rac/redo03 /dev/raw/raw16: bound to major 249, minor 15 [root@oraw1 ~]# raw /dev/raw/raw17 /dev/rac/redo04 /dev/raw/raw17: bound to major 249, minor 16 [root@oraw1 ~]# raw /dev/raw/raw18 /dev/rac/redo05 /dev/raw/raw18: bound to major 249, minor 17 [root@oraw1 ~]# raw /dev/raw/raw19 /dev/rac/redo06 /dev/raw/raw19: bound to major 249, minor 18 [root@oraw1 ~]# raw /dev/raw/raw20 /dev/rac/spfile /dev/raw/raw20: bound to major 249, minor 19
vi /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="raw*", OWNER=="grid", GROUP=="dba", MODE=="0660"