Skip to main content

Posts

How To Create a Linux Cluster in Red Hat/Centos 7

By  Nneko Branche   During the OS upgrade cycle to version 7 the team over at Red Hat made some changes under the hood that affected not only the basic packages but also how clustering is done in Linux. These changes resulted from the migration to the new  Pacemaker/Corosync  engine that powers the tokens and heartbeats needed to maintain quorum as well as the consolidation of the  userspace  programs used to configure and monitor the cluster services behind the newly introduced  pcs  utility. Fortunately, the basics and scenarios behind our  previous linux clustering tutorials  are sound and they can still be followed with only a few modifications. Rather than making the changes directly to  Part 1 ,  Part 2 and  Part 3  we will leave those articles unmodified as they are accurate and can be followed verbatim when on  Red Hat Enterprise Linux 6  or  CentOS Linux  6. Instead, what is produc...

DNS client configuration steps in Oracle Solaris 11

This guide covers Quick how to configure DNS client on Solaris 11.   DNS client configuration in Solaris 11 is based on SMF service rather than file based. When you configure a system as DNS client, you will be performing the following two configurations. I. DNS client setup II. Configure Name service switch to use DNS I.  DNS client setup 1. Configure using SMF service network/dns/client # svccfg -s network/dns/client svc:/network/dns/client> setprop config/search = astring: ("test.com" "service.test.com") svc:/network/dns/client> setprop config/nameserver = net_address: (192.168.10.10 192.168.10.11) svc:/network/dns/client> exit 2.   Enable the DNS client service (when you configure it for the first time) #svccfg enable -r dns/client 3.  Restart/Refresh DNS client service   (It is done when there is any update to the configuration) #svcadm refresh dns/client #svcadm restart dns/client 4.  Verify /etc/resolv.conf if...

Couldn't resolve host 'pkg.oracle.com' Solaris 11

If you met the same problem when you try to get responce from pkg install on Solaris 11 and getting error Unable to contact valid package repository Encountered the following error(s): Unable to contact any configured publishers. This is likely a network configuration problem. Framework error: code: 6 reason: Couldn't resolve host 'pkg.oracle.com' URL: 'https://pkg.oracle.com/solaris/support' (happened 4 times) Here is a procedure that helped me  1 Checking DNS  root# svcs |grep dns online         Apr_06   svc:/network/dns/client:default root# s vccfg -s network/dns/client svc:/network/dns/client> setprop config/search = astring: ("test.com" "service.test.com") svc:/network/dns/client> setprop config/nameserver = net_address: (8.8.8.8 8.8.4.4) svc:/network/dns/client> exit root# svcadm refresh dns/client root# svcadm restart dns/client looking for result root# more /etc/resolv.conf  # # _AUTOGENERATED_FROM...

Solaris. remove unusable scsi lun

Solaris remove unusable or failing scsi lun 1. The removed devices show up as drive not available in the output of the format command: # format Searching for disks...done ................      255. c1t50000974082CCD5Cd249 <drive not available>           /pci@3,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd5c,f9 ................      529. c3t50000974082CCD58d249 <drive not available>           /pci@7,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd58,f9 2. After the LUNs are unmapped Solaris displays the devices as either unusable or failing. # cfgadm -al -o show_SCSI_LUN | grep -i unusable # # cfgadm -al -o show_SCSI_LUN | grep -i failing c1::50000974082ccd5c,249       disk         connected    configured   failing c3::50000974082ccd58,249 ...

NTP SERVER RedHat

Server Configuration Install the ntp package: [root@host ~]# yum install ntp Ensure the following entries are in /etc/ntp.conf: The below example functions as a NTP server to the 192.168. network. [root@ntp.server.com ~]# cat /etc/ntp.conf restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server stratum2.ntp.com server stratum2.ntp2.com restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap driftfile /var/lib/ntp/drift keys /etc/ntp/keys Note: The public stratum 2 servers for your network's NTP server can be found on ntp.org. Start the ntpd service: [root@ntp.server.com ~]# service ntpd start Client Configuration Ensure the following entries are in /etc/ntp.conf: [root@ntp.client.com ~]# cat /etc/ntp.conf restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server ntp.se...

Linux. Orphaned connections in CLOSE_WAIT state ( a lot of connections are in CLOSE_WAIT state )

Usually dealing with web servers we have a lot of connections in CLOSE_WAIT state. These connections hold web server threads and also consume our  nofile, nproc  resources described in /etc/security/limits.conf. To prevent such situation we need to adjust some kernel variables: net.ipv4.tcp_keepalive_time  -   the interval between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe; after the connection is marked to need keepalive, this counter is not used any further. net.ipv4.tcp_keepalive_intvl  -  the interval between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime. net.ipv4.tcp_keepalive_probes  -  the number of unacknowledged probes to send before considering the connection dead and notifying the application layer. The first two parameters are expressed in seconds, and the last is the pure number.  This means that the keepaliv...

Expanding LUN size in Sun Cluster (Oracle Solaris Cluster) Environment

We have Oracle database in Sun Cluster HA configuration with two mount point /u01,/u02. Our task is to expand LUN in /u02 mountpoint. Current configuration  metaset configuration root@sc01-n1:~ # metaset  Set name = testdb-disk, Set number = 1 Host                Owner   sc01-n1            Yes   sc01-n2             Drive Dbase d12   Yes   d13   Yes   d16   Yes   d17   Yes   meta device configuration root@sc01-n1:~ # metastat -s testdb-disk -p testdb-disk/d20 -m testdb-disk/d21 testdb-disk/d22 1 testdb-disk/d21 1 1 /dev/did/rdsk/d16s0 testdb-disk/d22 1 1 /dev/did/rdsk/d17s0 testdb-disk/d10 -m testdb-disk/d11 1 testdb-disk/d11 2 1 /dev/did/rdsk/d12s0 \          1 /dev/did/rdsk/d13s0 did device configuration root@sc01-n2:~ # scdidadm -L ...