Showing posts with label centos. Show all posts
Showing posts with label centos. Show all posts

Friday, August 18, 2017

auto dbstart stop in centos 7 (systemd)

a nice article, followed and works perfectly.

tested on 12.2c on centos 7.3 

Only place to replaced is the ORACLE_BASE AND ORACLE_HOME according to my env.



[root@hmc-P55A-UD3 system]# ps -ef |grep tns
root        28     2  0 06:53 ?        00:00:00 [netns]
root      5336  4752  0 07:20 pts/0    00:00:00 grep --color=auto tns
[root@hmc-P55A-UD3 system]# ps -ef |grep pmon
root      5435  4752  0 07:20 pts/0    00:00:00 grep --color=auto pmon

[root@hmc-P55A-UD3 system]# systemctl start oracle_network.service
[root@hmc-P55A-UD3 system]# ps -ef |grep tns
root        28     2  0 06:53 ?        00:00:00 [netns]
oracle    5449     1  0 07:20 ?        00:00:00 /app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit
root      5456  4752  0 07:20 pts/0    00:00:00 grep --color=auto tns

[root@hmc-P55A-UD3 system]# systemctl start oracledb

[root@hmc-P55A-UD3 system]# systemctl status oracledb
● oracledb.service - Oracle databases service
   Loaded: loaded (/usr/lib/systemd/system/oracledb.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2017-08-18 07:20:49 EDT; 16s ago
  Process: 5463 ExecStart=/app/oracle/product/12.2.0/dbhome_1/bin/dbstart /app/oracle/product/12.2.0/dbhome_1 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/oracledb.service
           ├─5564 ora_pmon_orcl
           ├─5566 ora_clmn_orcl
           ├─5568 ora_psp0_orcl
           ├─5570 ora_vktm_orcl
           ├─5574 ora_gen0_orcl
           ├─5576 ora_mman_orcl
           ├─5580 ora_gen1_orcl
           ├─5584 ora_diag_orcl
           ├─5586 ora_ofsd_orcl
           ├─5590 ora_dbrm_orcl
           ├─5592 ora_vkrm_orcl
           ├─5594 ora_svcb_orcl
           ├─5596 ora_pman_orcl
           ├─5598 ora_dia0_orcl
           ├─5600 ora_dbw0_orcl
           ├─5602 ora_lgwr_orcl
           ├─5604 ora_ckpt_orcl
           ├─5606 ora_lg00_orcl
           ├─5608 ora_smon_orcl
           ├─5610 ora_lg01_orcl
           ├─5612 ora_smco_orcl
           ├─5615 ora_reco_orcl
           ├─5617 ora_w000_orcl
           ├─5619 ora_lreg_orcl
           ├─5621 ora_w001_orcl
           ├─5623 ora_pxmn_orcl
           ├─5627 ora_mmon_orcl
           ├─5629 ora_mmnl_orcl
           ├─5631 ora_d000_orcl
           ├─5633 ora_s000_orcl
           ├─5635 ora_tmon_orcl
           ├─5645 ora_tt00_orcl
           ├─5647 ora_tt01_orcl
           ├─5649 ora_tt02_orcl
           ├─5653 ora_aqpc_orcl
           ├─5657 ora_p000_orcl
           ├─5659 ora_p001_orcl
           ├─5661 ora_p002_orcl
           ├─5663 ora_p003_orcl
           ├─5665 ora_p004_orcl
           ├─5667 ora_p005_orcl
           ├─5669 ora_p006_orcl
           ├─5671 ora_p007_orcl
           ├─5673 ora_p008_orcl
           ├─5675 ora_p009_orcl
           ├─5677 ora_p00a_orcl
           ├─5679 ora_p00b_orcl
           ├─5681 ora_p00c_orcl
           ├─5683 ora_p00d_orcl
           ├─5685 ora_p00e_orcl
           ├─5687 ora_p00f_orcl
           ├─5841 ora_cjq0_orcl
           ├─5962 ora_j000_orcl
           ├─5964 ora_j001_orcl
           ├─5966 ora_s001_orcl
           ├─5968 ora_qm02_orcl
           ├─5970 ora_qm03_orcl
           ├─5972 ora_q002_orcl
           ├─5974 ora_q003_orcl
           └─5976 ora_q004_orcl

Aug 18 07:20:38 hmc-P55A-UD3 systemd[1]: Starting Oracle databases service...
Aug 18 07:20:38 hmc-P55A-UD3 dbstart[5463]: Processing Database instance "orcl": log file /app/oracle/product/12.2.0/dbhome_1/startup.log
Aug 18 07:20:49 hmc-P55A-UD3 systemd[1]: Started Oracle databases service.
[root@hmc-P55A-UD3 system]# systemctl stop oracledb

[oracle@hmc-P55A-UD3 bin]$ ps -ef |grep pmon
oracle    6147  4949  0 07:22 pts/1    00:00:00 grep --color=auto pmon
[oracle@hmc-P55A-UD3 bin]$ ps -ef |grep tns
root        28     2  0 06:53 ?        00:00:00 [netns]
oracle    6152  4949  0 07:22 pts/1    00:00:00 grep --color=auto tns

Monday, September 21, 2015

Migrate Centos 5.11 in my dual boot system

2nd round to migrate this CentOS after I bought a 3TB HDD, on top of one 120GB SSD, one 1TB and one 2TB HDD.  Now I want to decommission the 1TB HDD to save energy.

First round the CentOS5 was migrated to the new HDD 3TB,but failed to boot even I re-generate its UUID. After one week's think and research, finally I found that my motherboard doesn't have UEFI support.  The error message is like below.



So the solution is to migrate it to the 2TB HDD.  The steps are simple.

1. create new partition for / and swap.
2. Use gparted to copy the partition from 1TB HDD to the 2TB HDD partition /dev/sdb2 as shown below.


Before the copy, I gave beautiful label to the partition /dev/sdb2 (CentOS5_Root) and /dev/dba5 (CentOS5_Swap). In fact, these two labels will create new problem for me.

3. regenerate UUID for /dev/sdb2

4. I use GURB2 of ubuntu 15.04 as boot loader installed in SSD, so after copy centos5 I don't need to take care of the grub on this disk /dev/sdb .  Was a doubt in my mind.  To recognize the centos5 in /dev/sdb2, just issue sudo update-grub2
in Ubuntu, after which I see the /dev/sdb2 entry in the boot menu.




However, because I changed the two partition's LABEL and I didn't remember Volume Group was created in CentOS, caused I hit subsequent errors and spent me another two hours in the midnight.


mount: could not find filesystem '/dev/root'

Notice here not able to find root location /dev/root. As original "LABEL=/" is updated to Ubuntu grub.cfg. This seems Ubuntu grub doesn't know the LABEL being created in gparted.


After I updated root to use "LABEL=/CentOS5_Root", the booting process moved one step further.



This time, I learned faster and revert the two partitions' LABEL to original value.  And finally it brings me the clean GUI.




References:

http://ubuntuforums.org/showthread.php?t=1786292
https://frankfzw.wordpress.com/2014/12/23/migrate-ubuntu-14-04-from-hdd-to-ssd/
http://frugaltech.happystoic.com/ssdlinux
https://help.ubuntu.com/community/UsingUUID
https://help.ubuntu.com/community/MovingLinuxPartition
https://www.centos.org/forums/viewtopic.php?t=11207
https://theguyonthe3rdfloor.wordpress.com/2013/02/28/how-to-install-grub-2/

Wednesday, November 17, 2010

CentOS: Unable to resume swap device SWAP-sda2

Last night, upgrade my AMD CPU to Intel CPU, everything works fine Ubuntu, but not able to boot Cent OS , with above error message .

Googled and got idea from http://fedoraforum.org/forum/printthread.php?t=120868



It seems vladak's message match to my case.
"I hit this problem while swapping motherboard+CPU (Athlon X2 instead of Sempron) for Fedora 10 box. After the hardware change (could be caused because the old motherboard had 2 IDE channels and the new one has only 1 ? the boot disk is connected via IDE.) the system reported the dreaded "Unable to access resume device" message. Booting from Fedora 10 install DVD into rescue mode, chroot to /mnt/sysimage and mkinitrd fixed the problem."

Fixed the problem with below steps.
1. Find the CentOS 5.5 install DVD and boot into rescue mode.
2. chroot /mnt/sysimage
3. cd /boot and move existing initrd*.img ./initrd_bak
[root@localhost boot]# ll initrd_bak
total 15648
-rw------- 1 root root 2663536 Aug 21 12:46 initrd-2.6.18-194.11.1.el5.img
-rw------- 1 root root 2663856 Aug 21 12:45 initrd-2.6.18-194.11.1.el5xen.img
-rw------- 1 root root 2663556 Sep 12 22:19 initrd-2.6.18-194.11.3.el5.img
-rw------- 1 root root 2663874 Sep 12 22:19 initrd-2.6.18-194.11.3.el5xen.img
-rw------- 1 root root 2663599 Sep 29 22:56 initrd-2.6.18-194.11.4.el5.img
-rw------- 1 root root 2663935 Sep 29 22:55 initrd-2.6.18-194.11.4.el5xen.img

4. invoke below command to initialize RAM disk

mkinitrd initrd-2.6.18-194.11.4.el5.img initrd-2.6.18-194.11.4.el5

5.  then I have below file, note tha the size is different with backup copy.
rw------- 1 root root 2672372 Nov 17  2010 initrd-2.6.18-194.11.4.el5.img

6. exit twice to boot up. cheers!

Wednesday, July 22, 2009

centos yum fastestmirror

installed fastestmirror plugin , but still slow at 10kb/s.

check my root@localhost pluginconf.d]# cat /var/cache/yum/timedhosts.txt
ftp.riken.jp 0.161697864532
ftp.yz.yamagata-u.ac.jp 0.213155031204
ftp.oss.eznetsols.org 99999999998
ftp.iij.ad.jp 0.18056511879
mirror.averse.net 0.159833192825
mirror.nus.edu.sg 0.244224071503
ftp.nara.wide.ad.jp 0.163350105286
rsync.atworks.co.jp 0.171188831329
ftp.jaist.ac.jp 0.156664848328
www.ftp.ne.jp 0.525522947311
mirror.usonyx.net 0.160475969315

many sites are from Japan, while I am in singapore.

decide to exclude .jp sites by set "exclude=.gov, facebook, .jp" in
[root@localhost pluginconf.d]# cat fastestmirror.conf
[main]
enabled=1
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=10
maxthreads=15
exclude=.gov, facebook, .jp


cheers, now can see at least 150kb/s. that is 15 times.

also notice one site is available , will exclude it also.

22:04:54 : Downloading Packages:
22:05:26 : Failure getting http://mirror.averse.net/centos/5.3/os/x86_64/CentOS/gnome-keyring-devel-0.6.0-1.fc6.i386.rpm:
22:05:26 : --> [Errno 12] Timeout:
22:05:26 : Trying other mirror.