vg export/import

linux 2022. 9. 6. 11:03

vgchange -a n [VG Name]

vgexport [VG Name]

disk split

 

disk add

vgimport [VG Name]

vgchange -a y [VG Name]

'linux' 카테고리의 다른 글

cache 초기화  (0) 2020.02.11
linux 에서 WWN 확인  (0) 2017.01.19
RHEL VG rename 후 작업  (0) 2016.12.21
yum url 에 DVD 추가  (0) 2016.12.14
bash if 비교연산자  (0) 2016.06.27
Posted by efrit
,

cr/lf 변환

linux/Tip 2022. 5. 12. 14:00

vi 로 열어볼때

:set fileformat=unix

 

노트패드로 볼때

:set fileformat=dos

Posted by efrit
,

cache 초기화

linux 2020. 2. 11. 13:50

## drop cache
echo 1 > /proc/sys/vm/drop_caches
## drop inode/dentry
echo 2 > /proc/sys/vm/drop_caches

### reclaim cache
echo 1000~10000 > /proc/sys/vm/vfs_cache_pressure

vi /etc/sysctl.conf
  vm.vfs_cache_pressure=1000~10000
sysctl -p

'linux' 카테고리의 다른 글

vg export/import  (0) 2022.09.06
linux 에서 WWN 확인  (0) 2017.01.19
RHEL VG rename 후 작업  (0) 2016.12.21
yum url 에 DVD 추가  (0) 2016.12.14
bash if 비교연산자  (0) 2016.06.27
Posted by efrit
,

#vi /etc/profile

function history_to_syslog {

declare CMD

CMD=$(history 1)

USER=`who am i`' : '$LOGNAME

logger -p local6.notice -- SESSION = $$, WHO = $USER, CMD = $CMD

}

trap history_to_syslog DEBUG

 

#vi /etc/rsyslog.conf

local6.notice        /var/log/history_cmd.log

 

#systemctl restart rsyslog

 

#vi /etc/logrotate.d/history_cmd

/vat/log/history_cmd.log

{

monthly

rotate 12

missingok

notifempty

create

postrotate

   systemctl restart rsyslog

endscript

}

 

#logrotate -f /etc/logrotate.d/history_cmd

 

참조 :  https://lklingling.tistory.com/106

Posted by efrit
,

쉘 스크립트 수행시 다음 오류 발생

/bin/bash^M: bad interpreter: no such file or directory

 

 

sed -i s/ctrl+VM// [file]

'linux > Tip' 카테고리의 다른 글

cr/lf 변환  (0) 2022.05.12
로그인 사용자 명령 저장  (0) 2019.12.17
SSH Tunneling을 이용한 방화벽 우회  (0) 2007.11.27
rc.local 에 특정유저로 작업 시작하기  (0) 2007.11.19
putty saved session 을 REG 으로 만들기.  (0) 2007.10.30
Posted by efrit
,