°Ô½Ã¹° 259°Ç
   
[RHEL6.3] LV RAW Device µî·Ï Çϱâ (LVM ±¸¼ºÀ϶§ Udev)
±Û¾´ÀÌ : theko ³¯Â¥ : 2014-09-24 (¼ö) 15:45 Á¶È¸ : 8043
1. Edit /etc/udev/rules.d/60-raw.rules and add lines similar to the following:

ACTION!="add|change", GOTO="raw_end" 

# Create raw character device mapping: 
ENV{DM_VG_NAME}=="vg_test", ENV{DM_LV_NAME}=="lv_test1", RUN+="/bin/raw /dev/raw/raw1 %N"
ENV{DM_VG_NAME}=="vg_test", ENV{DM_LV_NAME}=="lv_test2", RUN+="/bin/raw /dev/raw/raw2 %N"

# To set permissions: 
KERNEL=="raw*", OWNER:="testuser", GROUP:="testuser", MODE:="0660"

LABEL="raw_end"

2. Reload the rule to apply:

# udevadm control --reload-rules
# udevadm trigger --type=devices --action=change


3. ±âŸ ¹æ¹ý

 /etc/rc.local
/etc/rc.loca ¿¡ ÇØ´ç ³»¿ëÀ» Á÷Á¢ ÀÌ¿ëÇÏ´Â ¹æ¹ý


raw /dev/vg00/lv00 /dev/raw1
raw /dev/vg00/lv01 /dev/raw2
.
.
.
chown username.groupname /dev/raw*


theko 2014-09-24 (¼ö) 15:47
## ACTION À» ÀÏÀÏÀÌ Àû¾îÁáÀ»´ë ¹æ¹ý

ACTION=="add|change", ENV{DM_VG_NAME}=="VolGroup00", ENV{DM_LV_NAME}=="LogVol00", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add|change", ENV{DM_VG_NAME}=="VolGroup00", ENV{DM_LV_NAME}=="LogVol01", RUN+="/bin/raw /dev/raw/raw2 %N"
.
.
.
ACTION=="add|change", KERNEL=="raw*", OWNER="username", GROUP="groupname", MODE="0660"
À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com