The first problem when working with SCSI devices might be to map informations you got from /proc/scsi/scsi to the device names the kernel uses like /dev/sda and so on.
# lsscsi [0:0:0:0] disk ATA SEAGATE ST31000N SU0E /dev/sda [0:0:1:0] disk ATA SEAGATE ST31000N SU0E /dev/sdb ... [1:0:1:0] disk ATA SEAGATE ST31000N SU0E /dev/sdj [1:0:2:0] disk ATA SEAGATE ST31000N SU0E /dev/sdk [1:0:3:0] disk ATA HITACHI H7210CA3 A3CB /dev/sdl [1:0:4:0] disk ATA HITACHI HUA7210S AC5A /dev/sdm ... [5:0:7:0] disk ATA SEAGATE ST31000N SU0D /dev/sdav [6:0:0:0] mediumx IBM TS3500 0104 /dev/sch0 [6:0:1:0] tape IBM ULT3580-TD5 0104 /dev/st0 [6:0:2:0] tape IBM ULT3580-TD5 0104 /dev/st1
You can find same info by checking /proc/scsi/scsi
Host: scsi0 Channel: 00 Id: 01 Lun: 00 is the same device of [0:0:0:0] in the output of lsscsi
Where the output
h == hostadapter id (first one being 0) c == SCSI channel on hostadapter (first one being 0) t == ID l == LUN (first one being 0)
Rescan of a SCSI bus
Surely reboot a server will let the scsi device get rescanned. But this is not the prefered way. The easiest way is to rescan the whole SCSI bus which will enable the Linux kernel to detect new devices!
To issue a SCSI bus rescan you must know on which bus you've added the device. If you don't know which bus and if there are mutliple buses on the system you can rescan each bus which will be somehow annoying but will not interrupt the system. To initiate a SCSI bus rescan type
echo "- - -" > /sys/class/scsi_host/host<H>/scan
where H stands for the SCSI bus you want to scan.
# lsscsi ... [1:0:0:7] disk IBM 1814 FAStT 1060 /dev/sdb [1:0:0:8] disk IBM 1814 FAStT 1060 /dev/sdc [1:0:0:10] disk IBM 1814 FAStT 1060 /dev/sde # echo "- - -" > /sys/class/scsi_host/host1/scan # lsscsi ... [1:0:0:7] disk IBM 1814 FAStT 1060 /dev/sdb [1:0:0:8] disk IBM 1814 FAStT 1060 /dev/sdc [1:0:0:9] disk IBM 1814 FAStT 1060 /dev/sdd [1:0:0:10] disk IBM 1814 FAStT 1060 /dev/sde
Well done, we got /dev/sdd back.
By the way this does not only work for disks but also for SCSI CD/DVD devices.
This information is provided for your convenience. Use of the third party Nvidia graphics driver is outside of the Production Support Scope of Coverage
1. Acquire the Nvidia driver:
Download the appropriate driver for your graphics controller from http://www.nvidia.com
Ensure that this driver is saved to the local disk of the target system. Installing from an external device, such as a flash drive, has been known to cause issues up to and including installation failure.
2. Edit Grub2 to blacklist the Nouveau driver:
Edit /etc/default/grub and add the following to the GRUB_CMDLINE_LINUX line:
Sometimes even after following the above steps to blacklist nouveau module, it is seen loaded at boot. # lsmod | grep -i nouveau . Most likely, this gets loaded from initramfs. In such cases, follow How to blacklist nouveau module on Red Hat Enterprise Linux 7?
The driver can not be installed if the X server running on system. So make sure the system is started in text mode(runlevel 3).
This article may need some revision. On case 01635125, the steps had to be slightly modified in order for the customer to successfully install the drivers:
What are the steps required to uninstall proprietary Nvidia module and switch back to Red Hat shipped Nouveau module ?
How to set correct screen resolution with Nouveau driver ?
해결
Note: Before replacing nVIDIA proprietary driver with nouveau driver ensure that hardware is certified to run RHEL-6.X. The xorg-x11-drv-nouveau package shipped with RHEL-6.X doesn't support some nVIDIA Graphics chip that are too old. Use hardware certification link to check all certified hardware's.
Step 2: Installation of NVIDIA proprietary driver blacklists nouveau driver hence during post un-installation of NVIDIA driver go through the following check list.
a1) (RHEL 6 and prior)Remove kernel parameters "rdblacklist=nouveau nomodset=0" from /boot/grub/grub.conf file - Basically remove any commands that blacklist or disable nouveau and set modeset to "0" or "off" a2)(RHEL7) Remove the kernel parameters "rd.blacklist.nouveau" "nouveau.modeset=0" and similar arguments from the GRUB_CMDLINE_LINUX line in /etc/default/grub - Rebuild your grub.cfg file with the command: grub2-mkconfig -o /boot/grub2/grub.cfg on legacy installations, or grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg for EFI installations
b) Remove or comment the line "blacklist nouveau" from /etc/modprobe.d/blacklist.conf file.
b) If nouveau module is not present in the result of lsmod command output then load it manually. - You may also have to reinstall the 'xort-x11-drv-nouveau' package. Please ensure that you are installing the version of this package that corresponds to the version of your xorg server and kernel version.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
How to remove Nvidia drivers and switch back to nouveau for Red Hat Enterprise Linux 7?
How to remove Nvidia drivers and switch back to nouveau for Red Hat Enterprise Linux 7?
환경
Red Hat Enterprise Linux 7
Nvidia
문제
How to remove nvidia drivers?
해결
Remove nouveau related parameters from grub cmd line:- Edit /etc/default/grub and remove the following from the GRUB_CMDLINE_LINUX line
Note:- Remove any configuration you have to block the nouveau from /etc/modprobe.d
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
$ nmcli c
NAME UUID TYPE DEVICE
enp8s0f0 86b340dd-08f8-4067-95da-64e5d065c9e2 802-3-ethernet enp8s0f0
enp8s0f1 5ddd53ce-04fc-4def-8c28-142c5c1e3f4a 802-3-ethernet --
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp8s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether a8:0c:0d:xx:xx:xxe brd ff:ff:ff:ff:ff:ff
inet 192.168.0.100/24 brd 192.168.0.255 scope global enp8s0f0
valid_lft forever preferred_lft forever
inet6 fe80::aa0c:dff:xxxx:xxxx/64 scope link
valid_lft forever preferred_lft forever
3: enp8s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether a8:0c:0d:xx:xx:xx brd ff:ff:ff:ff:ff:ff
본딩을 추가하는
$ sudo nmcli connection add type bond autoconnect no con-name jamesbond ifname jamesbond mode active-backup
Connection 'jamesbond' (3f972a86-feaf-4fd3-89c0-0b781d76aa18) successfully added.
$ nmcli c
NAME UUID TYPE DEVICE
enp8s0f0 86b340dd-08f8-4067-95da-64e5d065c9e2 802-3-ethernet enp8s0f0
jamesbond 3f972a86-feaf-4fd3-89c0-0b781d76aa18 bond --
enp8s0f1 5ddd53ce-04fc-4def-8c28-142c5c1e3f4a 802-3-ethernet --
노예를 추가하는 것
한마디로 사용하지 않는 인터페이스를 노예로 추가
$ sudo nmcli connection add type bond-slave autoconnect no ifname enp8s0f1 master jamesbond
Connection 'bond-slave-enp8s0f1' (30170a37-4157-44be-99dd-9e99442839ff) successfully added.
$ nmcli c
NAME UUID TYPE DEVICE
jamesbond 3f972a86-feaf-4fd3-89c0-0b781d76aa18 bond --
enp8s0f0 86b340dd-08f8-4067-95da-64e5d065c9e2 802-3-ethernet enp8s0f0
bond-slave-enp8s0f1 30170a37-4157-44be-99dd-9e99442839ff 802-3-ethernet --
enp8s0f1 5ddd53ce-04fc-4def-8c28-142c5c1e3f4a 802-3-ethernet --
연결. *을 확인하고 jamesbond의 노예 같은 것 그것이가 우리에게 있습니다
$ nmcli -f connection c s bond-slave-enp8s0f1
connection.id: bond-slave-enp8s0f1
connection.uuid: 30170a37-4157-44be-99dd-9e99442839ff
connection.interface-name: enp8s0f1
connection.type: 802-3-ethernet
connection.autoconnect: no
connection.timestamp: 0
connection.read-only: no
connection.permissions:
connection.zone: --
connection.master: jamesbond
connection.slave-type: bond
connection.secondaries:
connection.gateway-ping-timeout: 0
자동 연결이 유효 할 때 DHCP 서버가 사용하는 것과이 시점에서 IP 주소가 진동 된 경우가 있습니다.
본딩 휄로우에 IP 주소 등을 설정하는 것
설정 전
$ nmcli -f ipv4 c s jamesbond
ipv4.method: auto
ipv4.dns:
ipv4.dns-search:
ipv4.addresses:
ipv4.routes:
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.never-default: no
ipv4.may-fail: yes
설정
$ sudo nmcli c e jamesbond
nmcli> set ipv4.method manual
nmcli> set ipv4.dns 192.168.0.5,192.168.0.6
nmcli> set ipv4.dns-search example.com
nmcli> set ipv4.addresses 192.168.0.100/24 192.168.0.1
nmcli> p ipv4
['ipv4' setting values]
ipv4.method: manual
ipv4.dns: 192.168.0.5, 192.168.0.6
ipv4.dns-search: example.com
ipv4.addresses: { ip = 192.168.0.100/24, gw = 192.168.0.1 }
ipv4.routes:
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.never-default: no
ipv4.may-fail: yes
nmcli> verify
Verify connection: OK
nmcli> save
Connection 'jamesbond' (3f972a86-feaf-4fd3-89c0-0b781d76aa18) successfully updated.
nmcli> quit
재시작에서 자동 연결을 조정할 것
sudo sed -i -e 's/ONBOOT=no/ONBOOT=yes/' /etc/sysconfig/network-scripts/ifcfg-bond-slave-enp8s0f1
sudo sed -i -e 's/ONBOOT=no/ONBOOT=yes/' /etc/sysconfig/network-scripts/ifcfg-jamesbond
sudo nmcli c m enp8s0f0 connection.autoconnect no
재시작
$ sudo service network restart; sudo nmcli c up bond-slave-enp8s0f1
1 행으로 입력하지 않아도 노예가 올라갔습니다. 그런데 네트워크 액세스가 눈에 띄지 않게 낫습니다.도, OS에서 다시 부팅 할 때까지 할 수 있습니다. 에 걸레가 없다는 것.
bonding 인터 페이스가 자동으로 작동하지 않는 것처럼, enp8s0f0이 작동하는 것처럼
$ sudo nmcli c m jamesbond connection.autoconnect no
$ sudo nmcli c m bond-slave-enp8s0f1 connection.autoconnect no
$ sudo nmcli c m enp8s0f0 connection.autoconnect yes
네트워크 서비스 재시작
$ sudo service network restart
본딩을 掃除
$ sudo nmcli c del bond-slave-enp8s0f1
$ sudo nmcli c del jamesbond
$ nmcli c
NAME UUID TYPE DEVICE
enp8s0f1 5ddd53ce-04fc-4def-8c28-142c5c1e3f4a 802-3-ethernet --
enp8s0f0 86b340dd-08f8-4067-95da-64e5d065c9e2 802-3-ethernet enp8s0f0
To view the maximum number of semaphores and semaphore sets which can be created, type:
cat /proc/sys/kernel/sem
File description: /proc/sys/kernel/sem
This file contains 4 numbers defining limits for System V IPC semaphores. These fields are, in order:
SEMMSL - The maximum number of semaphores in a sempahore set. SEMMNS - A system-wide limit on the number of semaphores in all semaphore sets. The maximum number of sempahores in the system.
SEMOPM - The maximum number of operations in a single semop call
SEMMNI - A system-widerff limit on the maximum number of semaphore identifiers (sempahore sets)
How to change the semaphore values on Linux
# echo 250 32000 256 256 > /proc/sys/kernel/sem
# cat /proc/sys/kernel/sem 250 32000 256 256
To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.
# more /etc/sysctl.conf # Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and # sysctl.conf(5) for more details.
# Controls IP packet forwarding net.ipv4.ip_forward = 0
alias bond0 bonding options bond0 mode=1 miimon=100 /* mode 0 - balance-rr : (Round Robin)Load Balancing, 송신할 패킷마다 사용하는 NIC 변경 mode 1 - active-backup : Failover, bond 내에서 한 개의 Slave만 사용, 포트 문제 발상시 다른 Slave가 Enable mode 2 - blance-xor : Load Balancing, 소스와 목적지의 MAC을 XOR 연사을 통해 사용할 NIC을 결정하여 분배 mode 3 - Broadcast : Fault-Tolerance, 모든 Slave로 데이터 전송(failover), 일반적으로 잘 사용 안 함. mode 4 - 802.3ad : Dynamic Link Aggregation, IEEE 802.3ad 프로토콜을 이용하여 동적 Aggregation 작성 대역폭 상승, 부하 분산, Failover 지원 mode 5 - blance-tlb(TLB) : 적응형 송신 부하 분산, 송신패킷 로드밸런싱, 송신 시 부하가 낮은 NIC 이용 mode 6 - blance-alb(ALB) : 적응형 부하 분산, 송수신 패킷 로드 밸런싱, 송수신시 부하가 낮은 NIC를 사용
miimon : 네트워크 인터페이스가 살아있는지 확인하는데 사용, 단위 0.001초, 기본 값은 0, 0으로 설정 시 failover 비활성화
7. network 수정
- vi /etc/sysconfig/network
NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=자기호스트 이름 GATEWAYDEV=bond0 기타 있는 문구는 그냥 둠.
8. 본딩 모듈 적용
- #modprobe bonding
9. 네트워크 서비스 재시작
- #service network restart
10. bond0 인터페이스 Master 확인, 나머지 NIC Slave 확인 - #ifconfig