The Problem On CentOS/RHEL 6, a disk has issue and mdadm command shows /dev/md5 was active, degraded state . # mdadm -Q --detail /dev/md5 /dev/md5: Version : 0.90 Creation Time : Wed Apr 12 09:50:21 2017 Raid Level : raid1 Array Size : 10485696 (10.00 GiB 10.74 GB) Used Dev Size : 10485696 (10.00 GiB 10.74 GB) Raid Devices : 2 Total Devices : 1 Preferred Minor : 5 Persistence : Superblock is persistent Update Time : Mon Jun 5 14:47:09 2017 State : active, degraded Active Devices … [Read more...] about mdadm Command Shows State : active, degraded
Archives for December 2018
How to Re-generate initramfs and vmlinuz for Rescue Kernel with Current Kernel in CentOS/RHEL 7
We want to re-generate initramfs and vmlinuz for the Rescue Kernel in our CentOS/RHEL 7 system. How can this be done using the current kernel from which the system is booted up? During the boot process, when the kernel image and initramfs image get loaded, initramfs starts the first process on the system, which is systemd with the process ID 1. This systemd process further takes over control in the final stages of system booting and performs the following operations: Reads the … [Read more...] about How to Re-generate initramfs and vmlinuz for Rescue Kernel with Current Kernel in CentOS/RHEL 7
Simple Steps to use LogMiner for finding high redo log generation
LogMiner is a tool that lets you use SQL statements to analyze events in the database log. With LogMiner, you can track transactions as they are processed or locate specific functions that result in data modifications. LogMiner was introduced with Oracle8i. LogMiner can be used, along with audit trails, to determine what has happened in your Oracle database. In this post, we will see simple steps for mining the redo logs, for instance, to troubleshoot excessive redo generation. 1. Enable … [Read more...] about Simple Steps to use LogMiner for finding high redo log generation
Beginners Guide to “journalctl” – How To Use Journalctl to View and Manipulate Systemd Logs
Using the system journal By default, newer systemd based linux systems now uses two logging services for the system logs: systemd-journald, which is configured to only keep logs in memory rsyslogd, which gets messages sent to it by systemd-journald (and others) and stores them on disk. To view messages in the system journal, a tool called journalctl can be used. If used without any parameters it will show the full contents of the system journal, presented in a pager (by default less is … [Read more...] about Beginners Guide to “journalctl” – How To Use Journalctl to View and Manipulate Systemd Logs
How to find the size of a MySQL database
The easiest method is to query the INFORMATION_SCHEMA. For Example: SELECT ENGINE, COUNT(*), SUM(DATA_LENGTH), SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE TABLE_SCHEMA='menagerie' GROUP BY ENGINE; Additionally here is a potentially faster example to estimate the db size (InnoDB only and if you do not use compressed tables) since it doesn't use INFORMATION_SCHEMA.TABLES : select sum( CLUST_INDEX_SIZE + OTHER_INDEX_SIZE)* @@innodb_page_size / 1024 / 1024 "Estimated size in Mb" … [Read more...] about How to find the size of a MySQL database
How To Automate The Opening Of Pluggable Databases After The CDB Starts Up in Oracle 12c
Here is a short note on how to automate the startup of PDBs after the CDB starts up in Oracle database 12c. You can start all the PDBs or selective PDBs using below steps. We will need to create a database startup trigger in order to automate the PDB startup. Follow the steps outlined below. 1. Login into the CDB as sysdba. $ sqlplus / as sysdba 2. Create a database startup trigger to open all pluggable databases. create or replace trigger open_all_pdbs after startup on … [Read more...] about How To Automate The Opening Of Pluggable Databases After The CDB Starts Up in Oracle 12c
LVM VG Metadata Corruption with ‘Checksum error’
The Problem "Checksum errors" are reported when running LVM commands on CentOS/RHEL server. # vgs /dev/mapper/cx0009_lun45: Checksum error /dev/mapper/cx0009_lun48: Checksum error VG #PV #LV #SN Attr VSize VFree vg00 1 7 0 wz--n- 279.12G 159.12G vgcommrmandb 1 6 0 wz--n- 20.00G 44.00M vgcotsoracle 1 1 0 wz--n- 20.00G 4.00M vgcotsorapit 1 1 0 wz--n- 50.00G 4.00M ... # lvs /dev/mapper/cx0009_lun45: Checksum error /dev/mapper/cx0009_lun48: Checksum error LV VG Attr LSize … [Read more...] about LVM VG Metadata Corruption with ‘Checksum error’
How to Rebuild the “initramfs” with Multipath in CentOS/RHEL 6 and 7
The initramfs contains kernel modules for all hardware that is required to boot, as well as the initial scripts required to proceed to the next stage of booting. On CentOS/RHEL system, the initramfs contains a complete operational system (which may be used for troubleshooting purposes). Occasionally, the initramfs image may get damaged as well. If this happens, you cannot boot your server into normal operational mode. To repair the initramfs image after booting into the rescue environment, … [Read more...] about How to Rebuild the “initramfs” with Multipath in CentOS/RHEL 6 and 7
After Reboot RAID1 Disk Gets Removed/Out of Sync (CentOS/RHEL)
The Problem A faulty disk was replaced in CentOS/RHEL 6 machine. RAID1 was rebuilt and the server was rebooted. After reboot, disk got removed/out of sync from RAID. RAID had to be rebuilt after every reboot. RAID rebuilt before reboot. # mdadm --detail /dev/md1 /dev/md1: Version : 0.90 Creation Time : Fri Feb 8 10:20:51 2013 Raid Level : raid1 Array Size : 488279488 (465.66 GiB 500.00 GB) Used Dev Size : 488279488 (465.66 GiB 500.00 GB) Raid Devices : 2 Total Devices : 2 Preferred … [Read more...] about After Reboot RAID1 Disk Gets Removed/Out of Sync (CentOS/RHEL)
How to Configure Proxy in CentOS/RHEL/Fedora
What is a Proxy Server A proxy server is a server that acts as an intermediary for requests from clients seeking resources on the internet or an external network. Think of it as a go-between who makes requests on behalf of the client, ensuring that anyone outside of your network does not know the details of the requesting host. Verify if proxy is set on the server This command will show if there is a proxy server configured on the system: # echo $http_proxy Setting Proxy for Command … [Read more...] about How to Configure Proxy in CentOS/RHEL/Fedora