Skip to content
Advertisements

Posts from the ‘Linux’ Category

reclaim reserved available free space on linux

reclaim reserved available free space

 

[root@dbs-xxx-4-131 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol01
65G 2.7G 59G 5% /
/dev/mapper/VolGroup01-LogVol00
679G 35G 609G 6% /u01
/dev/sda1 996M 46M 899M 5% /boot
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sdc1 886G 200M 841G 1% /Backup

 

 

[root@dbs-ruh-4-131 ~]# tune2fs -m 0 /dev/sdc1
tune2fs 1.39 (29-May-2006)
Setting reserved blocks percentage to 0% (0 blocks)

[root@dbs-xxx-4-131 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol01
65G 2.7G 59G 5% /
/dev/mapper/VolGroup01-LogVol00
679G 35G 609G 6% /u01
/dev/sda1 996M 46M 899M 5% /boot
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sdc1 886G 200M 886G 1% /Backup

Advertisements

Oracle Linux 7.6 black screen while boot from virtualbox

I am trying to boot my oracle linux 7.6 which is running under virtual box but black screen appear long time

 

Causes :

 

Network manager & network manager wait online service have a problem

Solution :

Boot as rescue mode like below

Edit mode (e)

end of line linux16, add below command

systemd.unit=target.rescue

control + x  –> enter

 

Maintenance mode will appear

Enter root password maintenance

Execute below command

systemctl mask systemd-NetworkManager-wait-online.service

reboot the machine

The network manager may have a problem after restarted the machine, so start the network manager like below

systemctl enable NetworkManager

systemctl unmask NetworkManager.service

systemctl start NetworkManager.service

 

In case selinux may also making issue for black screen appeared while booting. Please disable and reboot the machine.

Logical volume group partition inactive

We rebooted a one of our linux machine which is running a database, After rebooted We can’t able to start the database due to the one of partition of the logical volume group has missing.

[root@ezylebuat ~]# pvs
WARNING: Device for PV EiG4AR-8JDt-bzEj-5si7-Wf4z-xrYC-a8zXgu not found or rejected by a filter.
WARNING: Device for PV HfPGnn-1bgb-j1HH-7Xvd-6hvq-yk14-jMCrkM not found or rejected by a filter.
PV VG Fmt Attr PSize PFree
/dev/sda2 ol lvm2 a– <199.00g 0
[unknown] ol lvm2 a-m <50.00g 0
[unknown] ol lvm2 a-m <50.00g <50.00g

[root@ezylebuat ~]# lvscan
WARNING: Device for PV EiG4AR-8JDt-bzEj-5si7-Wf4z-xrYC-a8zXgu not found or rejected by a filter.
WARNING: Device for PV HfPGnn-1bgb-j1HH-7Xvd-6hvq-yk14-jMCrkM not found or rejected by a filter.
inactive ‘/dev/ol/u01’ [<167.00 GiB] inherit
ACTIVE ‘/dev/ol/swap’ [<32.00 GiB] inherit
ACTIVE ‘/dev/ol/home’ [25.00 GiB] inherit
ACTIVE ‘/dev/ol/root’ [25.00 GiB] inherit

 

Solution :

activate the volume group

 

[root@ezylebuat ~]# vgchange -a y –partial ol
PARTIAL MODE. Incomplete logical volumes will be processed.
WARNING: Device for PV EiG4AR-8JDt-bzEj-5si7-Wf4z-xrYC-a8zXgu not found or rejected by a filter.
WARNING: Device for PV HfPGnn-1bgb-j1HH-7Xvd-6hvq-yk14-jMCrkM not found or rejected by a filter.
4 logical volume(s) in volume group “ol” now active

 

[root@ezylebuat ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.7G 0 7.7G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 8.9M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/ol-root 25G 16G 9.5G 63% /
/dev/mapper/ol-home 25G 39M 25G 1% /home
tmpfs 1.6G 40K 1.6G 1% /run/user/0
/dev/sda1 1014M 266M 749M 27% /boot
/dev/sdb1 99G 31G 63G 34% /backup
/dev/mapper/ol-u01 117G 101G 17G 86% /u01

 

[root@ezylebuat ~]# lvdisplay
WARNING: Device for PV EiG4AR-8JDt-bzEj-5si7-Wf4z-xrYC-a8zXgu not found or rejected by a filter.
WARNING: Device for PV HfPGnn-1bgb-j1HH-7Xvd-6hvq-yk14-jMCrkM not found or rejected by a filter.
— Logical volume —
LV Path /dev/ol/u01
LV Name u01
VG Name ol
LV UUID OoQvh4-9PRs-zVY3-ZFbO-SGn9-qUng-iJR2wL
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2018-01-17 11:43:54 +0300
LV Status available
# open 1
LV Size <167.00 GiB
Current LE 42751
Segments 2
Allocation inherit
Read ahead sectors auto
– currently set to 8192
Block device 249:4

 

After volume group activated , I can able to start the database . Even though  I can see the some of the HDD server failure, So  I plan to migrate the database to other machine.

mailx sender address picks the OS user account instead of sender address

We’re trying to send email from redhat 7 terminal using with below command,

mailx -s “Test mail” mazar@xxxx.com -r ezylebdb@alerts.xxxx.net

But its sender by OS hostname

Solution :

Send by like below

mailx -r ezylebdb@alerts.xxxx.net -s “Test mail” mazar@xxxx.com

 

creating local repository yum install linux

Follow the below procedure

[root@ebs-app-xx-xx u01]# yum repolist

[root@ebs-app-xx-xx u01]# yum list installed | grep createrepo

createrepo.noarch                         0.9.9-28.el7             @anaconda/7.5

[root@ebs-app-xx-xx u01]# createrepo /u01/Packages/

 

[root@ebs-app-xx-xx u01]# cd /etc/yum.repos.d

[root@ebs-app-xx-xx yum.repos.d]# ls -tlr

total 4

-rw-r–r–. 1 root root 358 Nov  4 22:55 redhat.repo

Now, create custom repository

[root@ebs-app-xx-xx yum.repos.d]# cat custom.repo

[customrepo]

name=Custom Repository

baseurl=file:///u01/Packages/

enabled=1

gpgcheck=0

 

you can check how much packages in the repository

 

[root@ebs-app-xx-xx yum.repos.d]# yum repolist

Now, we can install the rpm packages from the repository

 

[root@ebs-app-xx-xx Packages]# yum install tigervnc-1.8.0-5.el7.x86_64.rpm

 

Issue faced :

 

if  repository giving below error message,then your repository is corrupted.

 

Error Downloading Packages:

InstallMedia: [Errno 256] No more mirrors to try.

 

Solution:

Refer

https://access.redhat.com/solutions/203603

 

Remove this file if there is no X server

Try to start VNC, you may get the below error

 

[root@fusiondev ~]# vncserver

Warning: fusiondev.xxxxx.com:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server fusiondev.xxxx.com:1

New ‘fusiondev.xxxxx.com:2 (root)’ desktop is fusiondev.xxxxx.com:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/fusiondev.xxxxx.com:2.log

 

Solution :

[root@fusiondev tmp]# rm -rf /tmp/.X1-lock

[root@fusiondev tmp]# rm -rf /tmp/.X11-unix/X1

[root@fusiondev tmp]# vncserver

New ‘fusiondev.xxxxxx.com:1 (root)’ desktop is fusiondev.xxxxxx.com:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/fusiondev.xxxxxx:1.log

Start and stop firewall OEL 7

Check the status

[root@ezylebuat ~]# systemctl status firewalld
● firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-01-17 06:37:59 EST; 24min ago

Stop the firewall

[root@ezylebuat ~]# systemctl  stop firewalld 

[root@ezylebuat ~]# systemctl status firewalld
● firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2018-01-17 07:04:09 EST; 3s ago
Docs: man:firewalld(1)

Disable the firewall( After reboot,It will not enable automatically)

[root@ezylebuat ~]# systemctl disable firewalld

Enable the firewall

[root@ezylebuat ~]# systemctl enable firewalld

Start the firewall

[root@ezylebuat ~]# systemctl  firewalld start

find the files older than 30 days in linux

cd /u01/app/12c/oracle/trace

find *.trc -maxdepth 1 -mtime +30 -type f -exec ls -l {} \;

 

 

Change hostname in OEL 7

Method 1 :  nmtui  tool on terminal

Method 2 : [root@EDB-LEB-4-53 ~]# hostnamectl status
Static hostname: EDB-LEB-4-53.ace-ins.com
Icon name: computer-vm
Chassis: vm
Machine ID: 11cc4d26c75c476db3fa89a66a0fcae9
Boot ID: afc4b181973e40b9ab46ca774e6130c4
Virtualization: vmware
Operating System: Oracle Linux Server 7.0
CPE OS Name: cpe:/o:oracle:oracle_linux:7.0:GA:server
Kernel: Linux 3.8.13-35.3.1.el7uek.x86_64
Architecture: x86_64

 

[root@EDB-LEB-4-53 ~]# hostnamectl set-hostname ezylebuatdb.damana.com
[root@EDB-LEB-4-53 ~]# hostnamectl status
Static hostname: ezylebuatdb.damana.com
Icon name: computer-vm
Chassis: vm
Machine ID: 11cc4d26c75c476db3fa89a66a0fcae9
Boot ID: afc4b181973e40b9ab46ca774e6130c4
Virtualization: vmware
Operating System: Oracle Linux Server 7.0
CPE OS Name: cpe:/o:oracle:oracle_linux:7.0:GA:server
Kernel: Linux 3.8.13-35.3.1.el7uek.x86_64
Architecture: x86_64

 

Diagnostic-Code: SMTP; 550 host unknown

When we’re trying to send mail to localdomain through mailx from linux box. It says “Diagnostic-Code: SMTP; 550 host unknown”  and mail not sent.

Solution :

Edit sendmail.cf

# “Smart” relay host (may be null)
DS[10.x.x.xx]

restart the sendmail service and send the mail is successful

10.x.x.xx — mailbox server