[Linux] sosreport 생성 경로 변경

[참고] Install sosreport Package [root@fastvm-centos-7-6-ext-50 ~]# yum -y install sos ... 중략 ... Installed: sos.noarch 0:3.6-19.el7.centos 위와 같이 sos Package 를 설치하면 sosreport 를 수집 할 수 있습니다. sosreport 생성 경로 변경 sosreport 는 기본적으로 아래와 같이 /var/tmp/sosreport-XXXX.tar.xz 로 생셩이 됩니다. /var 경로에 용량이 부족하거나 sosreport 로 수집된 파일의 크기가 큰 경우, 생성 위치를 변경 할 수 있습니다. sosreport 기본 경로 생성 로그 [root@fastvm-centos-7-6-ext-50 ~]# sosreport sosreport (version 3....

August 1, 2019 · chhanz

[Linux] CentOS7 PPC 설치 on PowerVM

CentOS 7 PPC 설치 on PowerVM 설치 환경 IBM Power7 P750 IBM PowerVM 2.4 CentOS7(1804) VM 설정 VIOS 에서 VM LPAR 를 생성하고 vCD-ROM 을 이용하여 ISO 를 Mount 하여 OS 설치 준비를 합니다. $ loadopt -disk CentOS-7-ppc64-Everything-1804.iso -vtd vtopt0 lsrep $ lsrep Size(mb) Free(mb) Parent Pool Parent Size Parent Free 10198 2958 rootvg 279552 220416 Name File Size Optical Access CentOS-7-ppc64-Everything-1804.iso 7240 vtopt0 rw $ lsmap -vadapter vhost25 SVSA Physloc Client Partition ID --------------- -------------------------------------------- ------------------ vhost25 U8233....

May 10, 2019 · chhanz

[Linux] grubby 사용법

GRUBBY COMMAND 활용  grubby 라는 명령을 통해 GRUB2 부트로더를 손쉽게 수정 할 수 있습니다. grubby –help [root@fastvm-centos-7-6-21 ~]# grubby --help Usage: grubby [OPTION...] --add-kernel=kernel-path add an entry for the specified kernel --add-multiboot=STRING add an entry for the specified multiboot kernel --args=args default arguments for the new kernel or new arguments for kernel being updated --mbargs=STRING default arguments for the new multiboot kernel or new arguments for multiboot kernel being updated --bad-image-okay don`t sanity check images in boot entries (for testing only) --boot-filesystem=bootfs filesystem which contains /boot directory (for testing only) --bootloader-probe check which bootloader is installed on boot sector -c, --config-file=path path to grub config file to update ("-" for stdin) --copy-default use the default boot entry as a template for the new entry being added; if the default is not a linux image, or if the kernel referenced by the default image does not exist, the first linux entry whose kernel does exist is used as the template --debug print debugging information for failures --default-kernel display the path of the default kernel --default-index display the index of the default kernel --default-title display the title of the default kernel --elilo configure elilo bootloader --efi force grub2 stanzas to use efi --env=path path for environment data --extlinux configure extlinux bootloader (from syslinux) --grub configure grub bootloader --grub2 configure grub2 bootloader --info=kernel-path display boot information for specified kernel --initrd=initrd-path initrd image for the new kernel -i, --extra-initrd=initrd-path auxiliary initrd image for things other than the new kernel --lilo configure lilo bootloader --make-default make the newly added entry the default boot entry -o, --output-file=path path to output updated config file ("-" for stdout) --remove-args=STRING remove kernel arguments --remove-mbargs=STRING remove multiboot kernel arguments --remove-kernel=kernel-path remove all entries for the specified kernel --remove-multiboot=STRING remove all entries for the specified multiboot kernel --set-default=kernel-path make the first entry referencing the specified kernel the default --set-default-index=entry-index make the given entry index the default entry --set-index=entry-index use the given index when creating a new entry --silo configure silo bootloader --title=entry-title title to use for the new kernel entry --update-kernel=kernel-path updated information for the specified kernel -v, --version print the version of this program and exit --yaboot configure yaboot bootloader --zipl configure zipl bootloader Help options: -?...

April 17, 2019 · chhanz

[GPFS] CentOS 7 - IBM GPFS Hands on Tranining

[GPFS] CentOS 7 - IBM GPFS Hands on Tranining 목표 Hands-on 구성도 Hands-on 환경 OS Version : CentOS 7.3 Kernel Version : 3.10.0-514.el7.x86_64 GPFS Version : gpfs v4.2.2-3 OS Configuration : SSH Key Copy 완료 Hands-on Lab Cluster 구성 [root@gpfs1 desc]# mmcrcluster -N node_desc --ccr-disable -p gpfs1 -s gpfs2 -r /usr/bin/ssh -R /usr/bin/scp -C gpfscluster mmcrcluster: Performing preliminary node verification ... mmcrcluster: Processing quorum and other critical nodes ....

April 5, 2019 · chhanz

[Linux] CentOS 7 HP SSACLI Command 사용법

[Linux] CentOS 7 HP SSACLI Command 사용법 벤더(IBM,HP,Dell 등) 의 x86 하드웨어에서는 Linux 운영체제 상에서 하드웨어 레이드 컨트롤러의 상태를 확인 할 수 있는 도구들을 제공하고 있습니다. HP의 경우, Smart Storage Adminstrator 관리 명령어를 제공하고 있습니다. (예전에는 hpssacli, hpasucil 와 같은 명령어였습니다.) 현재는 ssacli 로 변경 되었으며, Linux 운영체제상에서 하드웨어 RAID 구성, 상태 확인, 변경등이 가능하도록 지원하는 HP 에서 제공되는 관리 도구 입니다. SSACLI 설치 Download : HP Support Link...

April 1, 2019 · chhanz

[Linux] CentOS 7 raw device 자동 생성 스크립트

[Linux] CentOS 7 raw device 자동 생성 스크립트 고객사에서 Multipath 로 생성된 mpath device 를 raw device 로 생성하는 작업이 있었습니다. 너무 많은 mpath device 를 raw device 로 생성을 하다보니, 오타도 발생되고 작업 환경을 콘솔에서 하다보니 불편함도 있다보니 해당 스크립트를 만들었습니다. Download Link GitHubRaw Script 사용 방법 Multipath Device 의 mpath 를 기준으로 해당 DM_UUID 값을 생성하여 60-raw.rules.$DATE 파일로 생성합니다. Multipath List 확인 # multipath -ll | grep mpath mpathb (3600c0ff00011e91abe3a475901000000) dm-3 HP ,P2000 G3 FC mpatha (3600c0ff00011e91a3e3b475901000000) dm-2 HP ,P2000 G3 FC 스크립트 Download # wget https://raw....

March 31, 2019 · chhanz

[Linux] logger 를 이용한 로그 관리

[Linux] logger 를 이용한 로그 관리 /var/log/messages 는 syslogd 를 이용하여 로그를 기록합니다. 주로 시스템의 핵심 로그가 작성되고, 해당 파일을 모니터링하여 시스템의 장애에 대해 파악하기가 좋습니다. 시스템을 운영하면서 특별히 /var/log/messages 에 별도의 메시지를 기록하기 위해서는 logger 라는 명령을 사용하면 쉽게 적용이 가능합니다. 아래는 이번 포스팅을 위해 httpd Web 서비스가 정상인지 체크하는 간단하게 제작된 스크립트입니다. 해당 스크립트에서 발생되는 메시지를 /var/log/messages 에 기록 하도록 하겠습니다. Check Web #!/bin/bash echo -e " " echo -e " Service Check : httpd " WEBSTAT=`systemctl status httpd | grep "Active:" | grep running | wc -l` echo -e " " if [[ "$WEBSTAT" -eq "0" ]]; then echo -e " ########### Web Service Stop ###########" echo -e " ########### RESTART HTTPD SERVER ########### " systemctl start httpd sleep 5 echo -e " ########### CHECK HTTPD SERVER ########### " systemctl -l status httpd fi echo -e " ########### CHECK HTTPD SERVER ########### " echo -e " * * * * Web Server : Running * * * * " logger 를 이용하여 messages 에 등록 아래 명령어를 통해 /var/log/messages 에 로그를 기록합니다....

January 19, 2019 · chhanz

[Linux] systemd 에 Service 등록

[Linux][RHEL/CentOS] systemd 에 Service 등록 Systemd 에 사용자가 자주 사용하는 Service 를 등록하고 Systemd 를 통해 관리 할 수 있습니다. 아래는 Systemd 에 등록할 Service Script 입니다. Systemd test 용 Script #!/bin/bash echo -e " Start Systemd Test " | logger -t Testsystemd while : do echo -e "Running systemd" sleep 30 done systemd 에 Service 등록 systemd 에 서비스를 등록하기 위해 아래 경로에 아래와 같이 설정을 합니다....

January 18, 2019 · chhanz

[Linux] CentOS 6 Python 2.7 설치

[Linux] CentOS 6 Python 2.7 설치 CentOS 6 의 기본 Python 버전은 v2.6 입니다. CentOS 의 응용프로그램들은 Python 2.6 과 호환되도록 설정되어있고, 이를 Update 를 할 경우 다수의 응용프로그램들이 문제가 발생 할 수 있습니다. 하지만 일부 시스템은 몇몇 소프트웨어를 사용하기위해, 최신 버전의 Python 을 사용하기 원합니다. 위와 같은 일부 시스템에 최신 버전의 Python 을 설치하기 위해서는 다음과 같은 절차로 설치를 진행하면 됩니다. SCL Repository 연결 yum 명령을 통해 SCL Repository 를 연결합니다....

January 9, 2019 · chhanz

[Linux] Default boot kernel 변경 방법

RHEL / CentOS 7 - Default boot kernel 변경 방법 시스템을 부팅을 하면서 GRUB Menu 에서 Kernel 을 특정 버전으로 선택하여, 부팅을 할 수 있습니다. 하지만 시스템을 물리적으로 접근이 불가능하거나, 원격으로만 작업이 가능할 경우에는 아래와 같은 방법으로 Default boot Kernel 을 변경해서 특정 버전으로 선택하여 부팅을 할 수 있습니다. 주로 Kernel Update 이후, Kernel Version 원복 등으로 사용 할 수 있습니다. Kernel Entry 확인 GRUB Menu 에서 Kernel Entry 가 어떻게 나올지 확인을 합니다....

December 14, 2018 · chhanz