IT기술/Linux

리눅스 raw device

dobbby 2023. 5. 26. 21:07
반응형

1) raw device 잡기 - 2번기에 잡혀있고, 1번기에 추가하는 과정
raw 조회 - 2번기에서
raw -qa
ls -la /dev/raw
cat /etc/udev/rules.d/61-oracleraw.rules

/etc/udev/rules.d
cat 61-oracleraw.rules
ACTION=="add", KERNEL=="emcpowerc", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="emcpowerd", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="emcpowere", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="emcpowerf", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="emcpowerg", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="emcpowera", RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="emcpowers", RUN+="/bin/raw /dev/raw/raw7 %N"
ACTION=="add", KERNEL=="emcpowerj", RUN+="/bin/raw /dev/raw/raw8 %N"
ACTION=="add", KERNEL=="emcpowerk", RUN+="/bin/raw /dev/raw/raw9 %N"
ACTION=="add", KERNEL=="emcpowerl", RUN+="/bin/raw /dev/raw/raw10 %N"
ACTION=="add", KERNEL=="emcpowerm", RUN+="/bin/raw /dev/raw/raw11 %N"
ACTION=="add", KERNEL=="emcpowern", RUN+="/bin/raw /dev/raw/raw12 %N"
ACTION=="add", KERNEL=="emcpowero", RUN+="/bin/raw /dev/raw/raw13 %N"
ACTION=="add", KERNEL=="emcpowerp", RUN+="/bin/raw /dev/raw/raw14 %N"
ACTION=="add", KERNEL=="emcpowerq", RUN+="/bin/raw /dev/raw/raw15 %N"
ACTION=="add", KERNEL=="emcpowerr", RUN+="/bin/raw /dev/raw/raw16 %N"


 powermt display dev=all | more
위 pseudo name 과 LUN 이 일치하는지 확인이 필요하다
raw /dev/raw/raw7 /dev/emcpowers
raw /dev/raw/raw7 /dev/emcpowers
/dev/raw/raw7:  bound to major 120, minor 288

재기동 후에도 접속되어 있또록 rules 수정 - 2번기 확인하여, 1번기에 복사
vi /etc/udev/rules.d/61-oracleraw.rules

raw 권한 변경
ls -la /dev/raw 2번기에서 수행
chown oracle:dba raw7 1번기에서 수행

18) swap 추가

메모리 확인

free -m 

 

스왑 확인
swapon -s 

 

2기가 생성

fallocate -l 2G /swapfile 

 

2기가 이상일 경우 2048 수정
dd if=/dev/zero of=/swapfile count=2048 bs=1M 

 

권한 설정
chmod 600 /swapfile 

 

포맷맞추기
mkswap /swapfile 

 

시스템 등록
swapon /swapfile 

[root@server ~]# vi /etc/fstab .....(fstab 내용으로 넘어감) (윗 내용 생략) ... /swapfile swap swap defaults 0 0

 

재기동 후에도 반영

삭제하려면
swapoff swapfile
rm /swapfile

반응형