3. OS이야기/ 01. Administration

linux에서 raw device 구성하기

OSSW(Open Source System SoftWare 2014. 6. 18. 10:15

1. fdisk

 

fdisk /dev/sddlma000

- Command : n

- p primary partition (1-4) : p

- partition number (1-4) : 1

- First cylinder : 1

- Last synlinder : 마지막숫자

- t 파티션 ID : 83 (boot - 82)

- wq : 저장 후 종료

 

 

 

2. raw device 구성

/etc/sysconfig/rawdevices

 

/dev/raw/raw1 /dev/sddlmae1

/dev/raw/raw2 /dev/sddlmaf1

/dev/raw/raw3 /dev/sddlmag1

/dev/raw/raw4 /dev/sddlmah1

/dev/raw/raw5 /dev/sddlmai1

/dev/raw/raw6 /dev/sddlmaj1

/dev/raw/raw7 /dev/sddlmak1

 

 

 

 

3. raw device 권한 설정

/etc/udev/rules.d/60-raw.rules

 

ACTION=="add", KERNEL=="sddlmbh1", RUN+="/bin/raw /dev/raw/raw1 %N"

ACTION=="add", KERNEL=="sddlmbi1", RUN+="/bin/raw /dev/raw/raw2 %N"

ACTION=="add", KERNEL=="sddlmbj1", RUN+="/bin/raw /dev/raw/raw3 %N"

ACTION=="add", KERNEL=="sddlmbk1", RUN+="/bin/raw /dev/raw/raw4 %N"

ACTION=="add", KERNEL=="sddlmbl1", RUN+="/bin/raw /dev/raw/raw5 %N"

ACTION=="add", KERNEL=="sddlmbm1", RUN+="/bin/raw /dev/raw/raw6 %N"

ACTION=="add", KERNEL=="sddlmaa1", RUN+="/bin/raw /dev/raw/raw7 %N"

 

ACTION=="add", KERNEL=="raw1", OWNER=="oradms", GROUP=="dba", MODE="0660"

ACTION=="add", KERNEL=="raw2", OWNER=="oradms", GROUP=="dba", MODE="0660"

ACTION=="add", KERNEL=="raw3", OWNER=="oradms", GROUP=="dba", MODE="0660"

ACTION=="add", KERNEL=="raw4", OWNER=="oradms", GROUP=="dba", MODE="0660"

ACTION=="add", KERNEL=="raw5", OWNER=="oradms", GROUP=="dba", MODE="0660"

ACTION=="add", KERNEL=="raw6", OWNER=="oradms", GROUP=="dba", MODE="0660"

ACTION=="add", KERNEL=="raw7", OWNER=="oradms", GROUP=="dba", MODE="0660"

 

 

 

4. rawdevices 프로세스 재기동

/etc/init.d/rawdevices restart

 

by 이찬호