Build for RHEL 8 local repository.

RHEL 8 부터 ODD media를 이용한 local repository 구성 방법이 일부 변경되었음을 알게되어...
이런 저런 삽질 후에 ... 기록 남기기 ...

1. mount point 생성
# mkdir -p /media/odd

2. media mount
# mount -o loop /dev/cdrom /media/odd

3. repository 정보 생성
# vim /etc/yum.repos.d/odd.repo

아래 형태로 기입

[RHEL8DVD_BaseOS]
name=RHEL8DVD_BaseOS
baseurl=file:///media/odd/BaseOS/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[RHEL8DVD_AppStream]
name=RHEL8DVD_AppStream
baseurl=file:///media/odd/AppStream/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

4. repository 정보 업데이트
# dnf clean all

or # yum clean all

 

# yum repolist

5. 필요 패키지 설치
# yum install <package_name>

참고
https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-create-local-yum-repository-on-rhel-8-using-dvd.html

 

 

 

 

 

반응형
Posted by 스쳐가는인연

댓글을 달아 주세요

[RHEL] Target 관리 (과거 runlevel의 대체 모드)

1. Default Target 정보 확인
# systemctl get-default
multi-user.target

2. 설정 가능한 정보 확인
# systemctl list-units --type target

Note. 모든 정보 확인
# systemctl list-units --type target --all

3. 원하는 모드로 Target 설정 (적용을 위해 리부팅 필요)
# systemctl set-default multi-user.target

Note. 즉시 적용 (현재 Target 변경)
# systemctl isolate multi-user.target

Runlevel Target Units Description
0 runlevel0.target, poweroff.target Shut down and power off the system.
- 시스템 중단(Halt)
1 runlevel1.target, rescue.target Set up a rescue shell.
- Single user mode
2 runlevel2.target, multi-user.target Set up a non-graphical multi-user system.
3 runlevel3.target, multi-user.target Set up a non-graphical multi-user system.
- CLI mode
4 runlevel4.target, multi-user.target Set up a non-graphical multi-user system.
5 runlevel5.target, graphical.target Set up a graphical multi-user system.
- GUI mode (X windows)
6 runlevel6.target, reboot.target Shut down and reboot the system.
- Reboot


참고자료:
CHAPTER 15. WORKING WITH SYSTEMD TARGETS
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/working-with-systemd-targets_configuring-basic-system-settings

Systemd Target 사용
https://hippogrammer.tistory.com/75

linux systemd(systemctl) 로 run level(target) 관리하기
https://www.lesstif.com/system-admin/linux-systemd-systemctl-run-level-target-98926803.html?selectedPageVersions=1&selectedPageVersions=2

 

 

 

 

반응형
Posted by 스쳐가는인연

댓글을 달아 주세요

FC (SAN) 장애 증상 조사를 위해 보다 많은 정보를 얻고자 할 때,

 

[Troubleshooting] How do I turn on additional qla2xxx or qla4xxx driver extended logging and what logging is available?
https://access.redhat.com/articles/337813

Issue
how do I setup up qlogic driver 'extended_error_logging'
what are the steps for doing this for boot time logging
how can I get additional debug information from the driver
How to enable extended logging on QLogic HBAs?
How to turn-on Fiber Channel HBA extended logging on ?
How to setup logging level for SAN driver ?
How to setup logging level of HBA SAN driver to get better error messages ?

Environment
Red Hat Enterprise Linux (RHEL) 4, 5, 6, 7
Qlogic qla2xxx or qla4xxx drivers

Selecting a $MASK value (which extended events to enable)
qla2xxxx
RHEL 4, 5, and 6.0-6.2, only values 0 or 1 supported/available:
off: $MASK=0
on : $MASK=1

RHEL 6.3+ (2.6.32-279.el6 and later) plus all RHEL 7 releases,

different classes of event messages can be separately turned on or off per the table below for qla2xxx only. If unsure which event classes are needed, use 0x1e400000 which is equivalent to setting 1 in RHEL 4, 5, or 6. See driver sources for exactly what is logged within each class. The above mask value typically will not cause any excessive logging issues except on very large configurations (100s-100s of LUNs).

 

qla4xxx
RHEL 4, 5, and 6.0-6.2, only values 0 or 1 supported/available:
off: $MASK=0
on : $MASK=1

RHEL 6.3+ (2.6.32-279.el6 and later) plus all RHEL 7 releases,

only on ($MASK=2, instead of a value of 1 previously) or off ($MASK=0).

qla2xxx driver RHEL 6.3+ (2.6.32-279.el6 and later including all RHEL 7 versions)
$MASK        Source
Value        Code            Description
----------   --------------  ----------------------------------------------------------------
0x00000000                   default, no logging
0x00001000   ql_dbg_tgt_tmr  Target mode TMF (Task Management Functions such as reset target)
0x00002000   ql_dbg_tgt_mgt  Target mode management 
0x00004000   ql_dbg_tgt      Target mode
0x00008000   ql_dbg_verbose  More verbosity, might not apply to all levels       
0x00010000   ql_dbg_misc     Miscellaneous, everything not covered by other categories
0x00020000   ql_dbg_buffer   Buffer/registers Dump   
0x00040000   ql_dbg_vport    Virtual port debug
0x00080000   ql_dbg_p3p      P3P Specific 
0x00100000   ql_dbg_multiq   MultiQ
0x00200000   ql_dbg_aer      AER/EEH      
0x00400000   ql_dbg_taskm    Task Management
0x00800000   ql_dbg_user     User space    
0x01000000   ql_dbg_timer    Timer routines
0x02000000   ql_dbg_async     Async events
0x04000000   ql_dbg_dpc       DPC Thread
0x08000000   ql_dbg_io        IO tracing   
0x10000000   ql_dbg_disc      Device Discovery
0x20000000   ql_dbg_mbx      Mailbox Cmnds
0x40000000   ql_dbg_init     Module Init & Probe

0x7fffffff - For enabling all logs, can be too many logs
0x1e400000 - Preferred value for capturing essential debug information

                  (equivalent to old ql2xextended_error_logging=1,

                   setting it to 1 in RHEL7 results in this mask value being used)

1) Enable/disable/view during run-time:
qla2xxx:
Enable:  # echo $MASK > /sys/module/qla2xxx/parameters/ql2xextended_error_logging
Disable: # echo 0     > /sys/module/qla2xxx/parameters/ql2xextended_error_logging
View:    # cat          /sys/module/qla2xxx/parameters/ql2xextended_error_logging

qla4xxx:
Enable:  # echo $MASK > /sys/module/qla4xxx/parameters/ql4xextended_error_logging
Disable: # echo 0     > /sys/module/qla4xxx/parameters/ql4xextended_error_logging
View:    # cat          /sys/module/qla4xxx/parameters/ql4xextended_error_logging

2) Enable at boot time, change the driver options after which you need to recreate the initrd image file on RHEL 5 or the initramfs image file on RHEL 6 and 7.

RHEL 4,5-5.5: in /etc/modprobe.conf, update the appropriate qla driver options line, add the line if necessary:
qla2xxx: options qla2xxx {extended-logging-parameter-name}=1
qla4xxx: options qla4xxx {extended-logging-parameter-name}=1

RHEL 5.6-5.*: in /etc/modprobe.conf, update the appropriate qla driver options line, add the line if necessary:
qla2xxx: options qla2xxx ql2xextended_error_logging=1
qla4xxx: options qla4xxx ql4xextended_error_logging=1

RHEL 6.0-6.2: in /etc/modprobe.d/qla*.conf, update the qla options line. If the file doesn't exist, create it.
qla2xxx: options qla2xxx ql2xextended_error_logging=1
qla4xxx: options qla4xxx ql4xextended_error_logging=1

RHEL 6.3+ : in /etc/modprobe.d/qla*.conf, update the qla options line. If the file doesn't exist, create it.
qla2xxx: options qla2xxx ql2xextended_error_logging=$MASK
qla4xxx: options qla4xxx ql4xextended_error_logging=2

RHEL 7.* : in /etc/modprobe.d/qla*.conf, update the qla options line. If the file doesn't exist, create it.
qla2xxx: options qla2xxx ql2xextended_error_logging=$MASK
qla4xxx: options qla4xxx ql4xextended_error_logging=2


Additional/Detailed information need to refer Red Hot Documents

 

 

 

 

반응형
Posted by 스쳐가는인연

댓글을 달아 주세요

고객사 방문하여 작업 중 접해서 당혹스러운 상황에 다행히도 도움을 받아 해결했지만, 잊지 않도록(?) 기록해두기 ...

1. Check
# vi -b <% file name %>

2. Remove
:%s/^M$//g
Note. '^M' = <Ctrl> + <V> + <M>
         Not! '^'+'M'


Windows/DOS : CRLF(Carriage return) 조합으로 줄바꿈을 정의 (커서의 위치를 앞으로 이동)
Unix/Linux/C : LF(Line Feed) 만으로 줄바꿈을 정의 (현재 위치에서 바로 아래로 이동)

이로 인해(개행 방식 차이), 윈도우에서 작성된 것을 Unix/Linux 계열로 올리면 vi로 편집시 ^M이 붙는 경우가 발생함.

- ftp를 통해 전송하면 방식이 텍스트/2진 중 어떤 것을 이용하는가에 따라 달라질 수 있음
-- 텍스트 방식으로 전송하면 데이터 변환이 생겨 '/r/n' > '/n' 으로 됨. 
-- 2진 모드로 전송하면 변환이 생기지 않아, 윈도우에서 작성된 파일이 컴파일이 안되거나 script작성 된것이 동작 안할 수 있음

vi:
:%s/^M//g

tr(translate):
tr -d ^M <% file %> <% newfile %>

sed(stream editor):
sed 's/^M//g' <% file %> >  <% newfile %>

 

 

참조자료:

server-engineer.tistory.com/482

jink1982.tistory.com/123

misctechmusings.com/remove-ctrl-m-characters-linux

 

 

 

 

반응형
Posted by 스쳐가는인연

댓글을 달아 주세요

tar 분할 압축 해제

 

Syntax: tar cvf(z) - 대상디렉토리or파일 | split -b 용량 - 분할압축파일명

# tar cvf - /tmp | split -b 3000m - ahs_dump.tar

ahs_dump.taraa
ahs_dump.tarab
ahs_dump.tarac
ahs_dump.tarad

 

# cat ahs_dump.tar* | tar zxvf -

출처: https://frody.tistory.com/5

반응형
Posted by 스쳐가는인연

댓글을 달아 주세요