October 2025
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

October 2025
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Missing fonts in VNC Centos Redhat

Symptoms

xauth: (stdin):1: bad display name “rhel:1? in “add” command

WARNING: The first attempt to start Xvnc failed, possibly because the font catalog is not properly configured. Attempting to determine an appropriate font path for this system and restart Xvnc using that font path … Could not start Xvnc.

/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol:
pixman_composite_trapezoids
/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol:
pixman_composite_trapezoids

Solution

#yum install pixman pixman-devel libXfont -y –nogpgcheck

forcefully unmount a Linux disk partition

Understanding device error busy error:

What happens basically, is that Linux / UNIX will not allow you to unmount a device that is busy. There are many reasons for this (such as program accessing partition or open file) , but the most important one is to prevent data loss.

 

Try the following command to find out what processes have activities on the device/partition. If your device name is /dev/sdb1, enter the following command as root user:


# lsof | grep '/dev/sda1'

Output:

vi 4453       vivek    3u      BLK        8,1                 8167 /dev/sda1

Above output tells that user vivek has a vi process running that is using /dev/sda1. All you have to do is stop vi process and run umount again. As soon as that program terminates its task, the device will no longer be busy and you can unmount it with the following command:

# umount /dev/sda1

Following disussion allows you to unmout device and partition forcefully using Linux commands.

Linux fuser command to forcefully unmount a disk partition:

Suppose you have /dev/sda1 mounted on /mnt directory then you can use fuser command as follows:

Type the command to unmount /mnt forcefully:

# fuser -km /mnt

Where,

  • -k : Kill processes accessing the file.
  • -m : Name specifies a file on a mounted file system or a block device that is mounted. In above example you are using /mnt

Linux umount command to unmount a disk partition You can also try umount command with –l option:

# umount -l /mnt

Where,

  • -l : Also known as Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. This option works with kernel version 2.4.11+ and above only.

If you would like to unmount a NFS mount point then try following command:

# umount -f /mnt

Where,
  • -f: Force unmount in case of an unreachable NFS system
Caution: Using these commands or option can cause data loss for open files; programs which access files after the file system has been unmounted will get an error.

Sar , mpstat , vmstat , iostat

[root@localhost optback]# sar -b 1
Linux 3.10.0-54.0.1.el7.x86_64 (localhost.localdomain) 17/03/14 _x86_64_ (1 CPU)

23:02:44 tps rtps wtps bread/s bwrtn/s
23:02:45 0.00 0.00 0.00 0.00 0.00
23:02:46 0.00 0.00 0.00 0.00 0.00
23:02:47 0.00 0.00 0.00 0.00 0.00
23:02:48 0.00 0.00 0.00 0.00 0.00
23:02:49 0.00 0.00 0.00 0.00 0.00
23:02:50 0.00 0.00 0.00 0.00 0.00
23:02:51 0.00 0.00 0.00 0.00 0.00
23:02:52 0.00 0.00 0.00 0.00 0.00
23:02:53 0.00 0.00 0.00 0.00 0.00
23:02:54 0.00 0.00 0.00 0.00 0.00
23:02:55 0.00 0.00 0.00 0.00 0.00
23:02:56 1.00 0.00 1.00 0.00 16.00
^C

23:02:57 0.00 0.00 0.00 0.00 0.00
Average: 0.08 0.00 0.08 0.00 1.27
[root@localhost optback]# sar -P 0 1
Linux 3.10.0-54.0.1.el7.x86_64 (localhost.localdomain) 17/03/14 _x86_64_ (1 CPU)

23:03:08 CPU %user %nice %system %iowait %steal %idle
23:03:09 0 0.00 0.00 1.98 0.00 0.00 98.02
23:03:10 0 0.00 0.00 0.00 0.00 0.00 100.00
23:03:11 0 1.00 0.00 1.00 0.00 0.00 98.00
23:03:12 0 0.00 0.00 1.00 0.00 0.00 99.00
23:03:13 0 0.00 0.00 1.02 0.00 0.00 98.98
23:03:14 0 0.00 0.00 0.00 0.00 0.00 100.00
23:03:15 0 0.00 0.00 0.00 0.00 0.00 100.00
23:03:16 0 0.00 0.00 1.00 0.00 0.00 99.00
^C

23:03:17 0 0.00 0.00 0.00 0.00 0.00 100.00
Average: 0 0.11 0.00 0.68 0.00 0.00 99.21

 

 

[root@localhost optback]# mpstat 1 5
Linux 3.10.0-54.0.1.el7.x86_64 (localhost.localdomain) 17/03/14 _x86_64_ (1 CPU)

23:11:38 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
23:11:39 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
23:11:40 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
23:11:41 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
23:11:42 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
23:11:43 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
Average: all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00

 

 

[root@localhost optback]# mpstat -P ALL 2 1
Linux 3.10.0-54.0.1.el7.x86_64 (localhost.localdomain) 17/03/14 _x86_64_ (1 CPU)

23:12:10 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
23:12:12 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
23:12:12 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00

Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
Average: all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
Average: 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00

 

 

[root@localhost optback]# iostat -x sda 1 3
Linux 3.10.0-54.0.1.el7.x86_64 (localhost.localdomain) 17/03/14 _x86_64_ (1 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
0.53 0.01 0.36 0.00 0.00 99.09

Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.02 0.03 0.37 0.24 8.24 1.78 32.91 0.00 0.94 0.50 1.62 0.55 0.03

avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 1.00 0.00 0.00 99.00

Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 0.00 1.00 0.00 8.00 0.00 16.00 0.00 1.00 1.00 0.00 1.00 0.10

avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.00 0.00 0.00 100.00

Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

[root@localhost optback]# iostat -x sdb 1 3
Linux 3.10.0-54.0.1.el7.x86_64 (localhost.localdomain) 17/03/14 _x86_64_ (1 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
0.53 0.01 0.36 0.00 0.00 99.09

Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.02 0.00 0.02 0.00 0.06 0.79 87.45 0.00 0.20 0.14 0.43 0.18 0.00

avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.00 0.00 0.00 100.00

Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.99 0.00 0.00 99.01

Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

 

 

[root@localhost optback]# vmstat
procs ———–memory———- —swap– —–io—- -system– —-cpu—-
r b swpd free buff cache si so bi bo in cs us sy id wa
3 0 0 6534488 2376 565636 0 0 8 3 47 90 1 0 99 0
[root@localhost optback]# vmstat 1 10
procs ———–memory———- —swap– —–io—- -system– —-cpu—-
r b swpd free buff cache si so bi bo in cs us sy id wa
3 0 0 6534488 2376 565640 0 0 8 3 47 90 1 0 99 0
0 0 0 6534464 2376 565640 0 0 0 0 44 81 0 0 100 0
0 0 0 6534464 2376 565640 0 0 0 0 45 81 0 1 99 0
0 0 0 6534464 2376 565640 0 0 0 0 47 90 0 1 99 0
0 0 0 6534464 2376 565640 0 0 0 0 41 75 0 0 100 0
1 0 0 6534464 2376 565640 0 0 0 0 152 95 10 0 90 0
0 0 0 6534464 2376 565640 0 0 0 0 93 142 5 1 94 0
0 0 0 6534464 2376 565640 0 0 0 0 50 99 0 0 100 0
1 0 0 6534464 2376 565640 0 0 0 0 40 74 0 1 99 0
0 0 0 6534464 2376 565640 0 0 0 0 39 81 0 0 100 0
[root@localhost optback]# vmstat 1 -S M
procs ———–memory———- —swap– —–io—- -system– —-cpu—-
r b swpd free buff cache si so bi bo in cs us sy id wa
3 0 0 6381 2 552 0 0 8 3 47 90 1 0 99 0
0 0 0 6381 2 552 0 0 0 0 43 83 0 0 100 0
0 0 0 6381 2 552 0 0 0 0 48 91 0 0 100 0
0 0 0 6381 2 552 0 0 0 0 51 106 1 0 99 0
0 0 0 6381 2 552 0 0 0 0 40 71 0 0 100 0
0 0 0 6381 2 552 0 0 0 0 42 88 0 0 100 0
0 0 0 6381 2 552 0 0 0 18 48 83 0 1 99 0
0 0 0 6381 2 552 0 0 0 0 47 90 0 0 100 0
0 0 0 6381 2 552 0 0 0 0 58 99 0 1 99 0

RedHat Enterprise Linux 7.0 XFS File System

[root@localhost ~]# pvcreate /dev/sdb /dev/sdc /dev/sdd
Physical volume “/dev/sdb” successfully created
Physical volume “/dev/sdc” successfully created
Physical volume “/dev/sdd” successfully created

 
pvs
[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 rhel lvm2 a– 39.51g 0
/dev/sdb lvm2 a– 20.00g 20.00g
/dev/sdc lvm2 a– 20.00g 20.00g
/dev/sdd lvm2 a– 20.00g 20.00g

 

 

vgcreate backupvg /dev/sdb
[root@localhost ~]# vgcreate backupvg /dev/sdb
Volume group “backupvg” successfully created

 

vgs

[root@localhost ~]# vgs
VG #PV #LV #SN Attr VSize VFree
backupvg 1 0 0 wz–n- 20.00g 20.00g
rhel 1 2 0 wz–n- 39.51g 0

 

lvcreate -n lv_optback -L +5G backupvg

[root@localhost ~]# lvcreate -n lv_optback -L +5G backupvg
Logical volume “lv_optback” created

 
lvcreate -n lv_varback -L +5G backupvg

[root@localhost ~]# lvcreate -n lv_varback -L +5G backupvg
Logical volume “lv_varback” created
[root@localhost ~]# mkfs.xfs /dev/backupvg/lv_optback
meta-data=/dev/backupvg/lv_optback isize=256 agcount=4, agsize=327680 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0
data = bsize=4096 blocks=1310720, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=12800, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

 

[root@localhost ~]# mkdir /optback
root@localhost ~]# mount /dev/backupvg/lv_optback /optback/
[root@localhost ~]# df -TH
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 39G 4.1G 35G 11% /
devtmpfs devtmpfs 4.2G 0 4.2G 0% /dev
tmpfs tmpfs 4.2G 95k 4.2G 1% /dev/shm
tmpfs tmpfs 4.2G 39M 4.1G 1% /run
tmpfs tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup
/dev/sda1 xfs 507M 109M 398M 22% /boot
/dev/mapper/backupvg-lv_optback xfs 5.4G 34M 5.3G 1% /optback

 

[root@localhost ~]# lvextend -L +2G /dev/backupvg/lv_optback
Extending logical volume lv_optback to 7.00 GiB
Logical volume lv_optback successfully resized

 

root@localhost ~]# xfs_growfs /optback
meta-data=/dev/mapper/backupvg-lv_optback isize=256 agcount=4, agsize=327680 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0
data = bsize=4096 blocks=1310720, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=12800, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 1310720 to 1835008

 

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 36G 3.8G 32G 11% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 92K 3.9G 1% /dev/shm
tmpfs 3.9G 38M 3.8G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 484M 104M 380M 22% /boot
/dev/mapper/backupvg-lv_optback 7.0G 33M 7.0G 1% /optback

Create a local DVD repository for YUM

he software repositories created during the installation will point only the Red Hat online and will require your subscription code. Installing from the online repositories will always ensure that you are working with the latest software versions but for testing the beta in a non-live environment may not be required. We will use the DVD repository. To set this up login as root and create a file in the /etc/yum.repos.d/ directory, the file should end with the suffix .repo. We will create a file call dvd.repo:

[rhel7-dvd]
name=rhel7-dvd
baseurl=file:///mnt/dvd
enabled=1
gpgcheck=0

You can see from the baseurl entry that we point to /mnt/dvd for the yum to use. We must make sure that the install DVD is mounted to the location and can add an entry to the /etc/fstab file or setup the auto-mount service. We use the fstab file and the lab and have added this entry:

/dev/cdrom  /mnt/dvd  iso9660  ro  0 0

To display available repositories we can use the command

yum repolist all

From the output shown in the screen-shot we can see that the dvd repo is enabled but the standard repos are not enabled until we enable our subscription

Red Hat Enterprise Linux 7 BETA 1 Install Step by Step

 

Red Hat Enterprise Linux 7 BETA 1 Install and overview | A good thing even better
Red Hat is the leader in development, deployment, and management of Linux and open-source solutions for Internet infrastructure – ranging from embedded devices to secure web servers. The company was founded in 1994 by visionary entrepreneurs Bob Young and Marc Ewing. Open source is the foundation of its business model as it represents a fundamental shift in how software is created. The code that makes up the software is available to anyone and developers who use the software are free to improve it. The result: rapid innovation. Red Hat solutions combine Red Hat Linux, developer and embedded technologies, training, management services, technical support. The company is headquartered in Raleigh, North Carolina, USA.

Download
http://ftp.redhat.com/redhat/rhel/beta/7/

 

Install001 Install002 Install003 Install004 Install005 Install006 Install007 Install008 Install009 Install010 Install011 Install012 Install013 Install014 install015 install016 install017 install018 install019 install020 install021 install022 install023 install024 install025 install026 install027 install028 install029 install030 install031 install032 install033 install034 install035 install036

 

 

Red Hat Enterprise Linux (RHEL), the Linux vendor’s core platform, had its last major release with the debut of RHEL 6 in November of 2010. Red Hat has been releasing major new RHEL platforms every two to three years, and at its 2012 Summit event the company had hinted that 2013 could be the year in which RHEL 7 might be released.

As it turns out, the exact timing for the general availability of RHEL 7 is still in question. Ronald Pacheco, Senior Manager, Technology Product Management at Red Hat, said that his company has been working on RHEL 7 for a long time.

He stressed that RHEL 6 and 5 are still strong platforms and are being updated and iterated. RHEL 6.4 for example was recently released, providing new Microsoft interoperability capabilities.

XFS

In terms of features, RHEL 7 will mark a departure on a number of fronts from previous Red Hat releases.

Ric Wheeler, Kernel File and Storage Team Senior Manager and Architect at Red Hat, told the capacity crowd that the XFS filesystem will be the new default in RHEL 7 instead of EXT4.

Previously there had been some discussion that perhaps the Btrfs filesystem could play a big role in the upcoming Linux release, though Wheeler said the plan is now to make sure that Btrfs is in shape so it can be included as an option.

From a Linux kernel perspective, Wheeler hinted that from a timing perspective the Linux 3.11 kernel is likely the one that would power RHEL 7. The most recent generally available kernel right now in the upstream Linux community is Linux 3.9, with 3.10 set to debut in the coming weeks.

Secure Boot

From a hardware enablement perspective, Peter Martuccelli, Senior Engineering Manager for Platform Enablement at Red Hat, said that RHEL 7 will support UEFI and Secure Boot.

RHEL 7 will also include the Hardware Error Reporting Mechanism [HERM], which aims to improves server logging mechanisms by integration with various hardware error input methods.

Networking

One of the biggest areas of improvement in RHEL 7 is likely to be networking services.

Rashid Kahn, Senior Engineering Manager for networking services at Red Hat, joked with the audience that from his perspective RHEL 7 is in fact, “all about networking.”

One of the major new improvements is the addition of the Team Driver. Kahn explained that the driver combines multiple networking interfaces into a single interface. The goal of the driver is to provide improved throughput, networking redundancy and easier management.

The Precision Time Protocol (PTP) will also land in RHEL 7. PTP was available as a technology preview in RHEL 6.4 and is expected to be fully supported in RHEL 6.5.

“If time is money, you might want to try PTP precision time protocol,” Kahn said.

PTP can have a use-case in high-frequency trading as it ensures precise sub microsecond synchronization of distributed clocks over the network.

The other big addition set to land in RHEL 7 is the inclusion of Open vSwitch support. Open vSwitch is an open source virtual switch that initially became available in the upstream Linux kernel with the Linux 3.3 release in March of 2012.

Kahn said that Open vSwitch will be a tech preview in RHEL 6.5 and will be fully supported in RHEL 7.

 

Speaking of the biggest changes that the new file system – XFS will replace ext4 – The main reason for the XFS supports up to 500TB, and ext4 only supports 50TB.

As XFS file system performance when dealing with a large number of small files how, is still unclear, but administrators also need to learn how to manage it.

According to RHEL 7.0 release notes, this version includes major changes :

Contains Kernel 3.10 version supports swap memory compression can guarantee a significant reduction in I / O and improve performance, the use of NUMA (uniform memory access) scheduling and memory allocation, support for APIC (Advanced Programmable Interrupt Controller) virtualization, comprehensive DynTick support

The kernel module blacklisted, kpatch dynamic kernel patch (Technology Preview), and so on.
Storage and file systems, RHEL 7.0 kernel use LIO target subsystem that supports fast cache for the slower devices block devices, the introduction of the LVM cache (Technology Preview),
the XFS as the default file system.The introduction of a network packet technology as an alternate method of link aggregation bundles, extensive improvements for NetworkManager provides
dynamic firewall daemon firewalld, adding DNSSEC Domain Name System Security Extensions, with OpenLMI used to manage Linux systems provide common infrastructure, the introduction of credible Network connectivity (Technology Preview) and so on.

On KVM (Kernel-based virtualization) provides a number of improvements, such as using virtio-blk-data-plane to improve fast I / O performance (technology preview),
supports PCI bridge, QEMU sandbox, multi-queue NIC, USB 3.0 support ( Technology Preview) and so on.

Introducing Linux container Docker.

Compiler tool chain, RHEL 7.0 contains GCC 4.8.x, glibc 2.17, GDB 7.6.1.

Includes Performance Co-Pilot, SystemTap 2.4, Valgrind 3.9.0 and other performance tools.

Includes Ruby 2.0.0, Python 2.7.5, JAVA 7 other programming languages.

Includes Apache 2.4, MariaDB 5.5, PostgreSQL 9.2 and so on.

On systems and services, RHEL 7.0 using systemd replaced SysV.

Pacemaker cluster manager introduced while using keepalived and replace HAProxy load balancing procedures Piranha.

In addition, the Anaconda installation program has been redesigned and enhanced, and use the boot loader GRUB 2.

RHEL 7.0 supports 64-bit AMD / Intel, IBM POWER7/POWER8/System z and other architecture from its official website to download an evaluation version .
Red Hat ‘s source code directly RHEL7 released to the CentOS on site, in view of the fact Centos release of Red Hat is a community-funded,
Centos 7 should soon be released.

 

Netstat for windows

netstat -ano -p tcp | findstr  "18812"
netstat -ano -p tcp | findstr /R /C:"TCP[ ]*[0-9.]*:3099 "
netstat -ano -p tcp | findstr  ".*:18812.*"

DRBD

db1.rmohan.com 192.168.1.105
db2.rmohan.com 192.168.1.106
Add a hard disk

fdisk /dev/sdb
wget http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch
rpm -ivUh elrepo-release-6-4.el6.elrepo.noarch.rpm

vi /etc/yum.repos.d/elrepo.repo

Edit /etc/yum.repos.d/elrepo.repo ( change line #8 ‘enable=0′ )
yum –enablerepo=elrepo install drbd83-utils kmod-drbd83
yum -y install parted

partprobe /dev/sdb1

pvcreate /dev/sdb1

vgcreate vg_db /dev/sdb1
lvcreate -n lv_db -L +50G vg_db
lvcreate -n lv_meta -L +10G vg_db
groupadd haclient
chgrp haclient /sbin/drbdsetup
chmod o-x /sbin/drbdsetup
chmod u+s /sbin/drbdsetup
chgrp haclient /sbin/drbdmeta
chmod o-x /sbin/drbdmeta
chmod u+s /sbin/drbdmeta

 

global {
usage-count yes;
}

common {
syncer { rate 300M; }
}

resource r0 {
protocol C;
handlers {
pri-on-incon-degr “echo o > /proc/sysrq-trigger ; halt -f”;
pri-lost-after-sb “echo o > /proc/sysrq-trigger ; halt -f”;
local-io-error “echo o > /proc/sysrq-trigger ; halt -f”;
outdate-peer “/usr/lib/heartbeat/drbd-peer-outdater -t 5”;
}

startup {
}

disk {
on-io-error detach;
}

net {
after-sb-0pri disconnect;
after-sb-1pri disconnect;
after-sb-2pri disconnect;
rr-conflict disconnect;
}

syncer {
rate 300M;
al-extents 257;
}

on db1.rmohan.com {
device /dev/drbd0;
disk /dev/vg_db/lv_db;
address 192.168.1.105:7788;
meta-disk /dev/vg_db/lv_meta[1];
}

on db2.rmohan.com {
device /dev/drbd0;
disk /dev/vg_db/lv_db;
address 192.168.1.106:7788;
meta-disk /dev/vg_db/lv_meta[1];

GLUSTER ON CENTOS 6.5

cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.45 cluster1.rmohan.com cluster1
192.168.1.41 cluster2.rmohan.com cluster2
192.168.1.42 cluster3.rmohan.com cluster3

 

rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*

rpm –import https://fedoraproject.org/static/0608B895.txt
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install yum-priorities
vi /etc/yum.repos.d/epel.repo

priority=10
[epel]
name=Extra Packages for Enterprise Linux 6 – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=10
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

glusterfsd –version
gluster peer probe cluster2.rmohan.com
gluster peer status
mkdir /data
gluster volume create testvol replica 2 transport tcp cluster1.rmohan.com:/data cluster2.rmohan.com:/data
gluster volume start testvol

netstat -tap | grep glusterfsd
gluster volume info
mkdir /data/test
mkdir /data/test1
mkdir /data/test2
mkdir /data/test3
gluster volume create testvol replica 2 transport tcp cluster1.rmohan.com:/data cluster2.rmohan.com:/data
gluster volume start testvol
gluster peer status

mkdir /data/test3
ls -la
cd /data/
vi test

 
Client
yum install glusterfs-client
mkdir /mnt/glusterfs
mount.glusterfs cluster1.rmohan.com:/testvol /mnt/glusterfs/
mount
df -h
cd /mnt/glusterfs/
ls -la

vi /etc/fstab

server1.example.com:/testvol /mnt/glusterfs glusterfs defaults,_netdev 0 0

DDOS attack on Windows Server Netstat

 check tcp/ip number of connection, run following commands in command prompt.===================
netstat -ano | find /i /c “:80″netstat -ano | find /i “80”
===================C:\>netstat -ano | find /i /c “:80”
14126

C:\>netstat -ano | find /i “80”
TCP [::]:49154 [::]:0 LISTENING 980
UDP 0.0.0.0:500 *:* 980
UDP 0.0.0.0:4500 *:* 980
UDP [::]:500 *:* 980

To find on which IP the ddos is targeted.

==============================
netstat -ano | find /i /c “IP Address”
==============================

C:\>netstat -ano | find /i /c “192.168.1.1”
15000

netstat -a | find /c “TCP”

netstat -a | find /c “UDP”
netstat -an |find /i "listening" > c:'openports.txt
netstat -ao |find /i "listening"


netstat -na 1 | find “{Remote_Host_IP_Address}”

C:\Users\kcordero>netstat -na 1 | find "10.101.2.101"
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED

Running this command shows TCP and UDP port activity.

-n = Lists Numbers
-a = ALL Connections and Listening Ports
1 = Runs every second, repeatedly dumping the output

NOTE:
The 1 second outputs help because a 3-Way Handshake or an actual connection will most likely last more than 1 second. When troubleshooting, we always want to see if there’s a 3-Way Handshake happening.

TO SEE WHAT PORT A PROCESS IS USING TO A REMOTE HOST:

This command is just like the one above except it shows the PID being used.

netstat -nao 1 | find “{Remote_Host_IP_Address}”

C:\Users\kcordero>netstat -nao 1 | find "10.101.2.101"
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED     1452
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED     1452
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED     1452
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED     1452
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED     1452

-o = Displays the owning process ID associated with each connection.

Since -o was added, a PID will be listed. In my case PID 1452. To see what PID 1452 is associated with, use the command below.

tasklist /fi “PID eq 1452?

C:\Users\kcordero>tasklist /fi "PID eq 1452"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
SecureCRT.exe                 1452 Console                    1     19,224 K

If you want to see a list of PIDs being used on the PC/Server, you can use these commands: “tasklist” and “wmic process list brief”. If you want to use a GUI then use Task Manager. For me “tasklist” is the easiest and it has great Parameters to use. In the command above, I’m using the “FilterName” Parameter. To see more on this command go here: http://technet.microsoft.com/en-us/library/bb491010.aspx

TO SHOW A CONNECTION USING PORT 22:

netstat -na 1 | find “{PORT}”

C:\Users\kcordero>netstat -na 1 | find "22"
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED

NOTE:
Nothing will show up until there’s an ESTABLISHED connection on port 22.

TO SHOW AN ESTABLISHED CONNECTION USING PORT 22:

netstat -na 1 | find “{PORT}” | find “ESTABLISHED”

C:\Users\kcordero>netstat -na 1 | find "22" | find "ESTABLISHED"
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED

TO SEE ALL LISTENING CONNECTIONS:

netstat -an |find /i “listening”

C:\Users\kcordero>netstat -an |find /i "listening"
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:623            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:8192           0.0.0.0:0              LISTENING

TO SEE ALL ESTABLISHED CONNECTIONS:

netstat -an |find /i “established”

C:\Users\kcordero>netstat -an |find /i "established"
  TCP    172.16.40.79:53719     170.12.10.154:8194     ESTABLISHED
  TCP    172.16.40.79:53728     170.12.14.119:8522     ESTABLISHED
  TCP    172.16.40.79:53740     170.12.144.198:443     ESTABLISHED
  TCP    172.16.40.79:53741     170.12.144.198:443     ESTABLISHED
  TCP    172.16.40.79:56964     10.101.2.101:22         ESTABLISHED

TO SEE ALL STATES:

netstat -a

C:\Users\kcordero>netstat -a

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:135            Z123574W:0             LISTENING
  TCP    127.0.0.1:9535         Z123574W:63556         ESTABLISHED
  TCP    127.0.0.1:63484        Z123574W:53739         TIME_WAIT
  TCP    127.0.0.1:63484        Z123574W:53742         TIME_WAIT
  TCP    127.0.0.1:63486        Z123574W:0             LISTENING

Here’s a list of all the states with an explanation:

State Explanation
———— ——————————————————–
SYN_SEND Indicates active open.

SYN_RECEIVED Server just received SYN from the client.

ESTABLISHED Client received server’s SYN and session is established.

LISTEN Server is ready to accept connection.

FIN_WAIT_1 Indicates active close.

TIMED_WAIT Client enters this state after active close.

CLOSE_WAIT Indicates passive close. Server just received first FIN from a client.

FIN_WAIT_2 Client just received acknowledgment of its first FIN from the server.

LAST_ACK Server is in this state when it sends its own FIN.

CLOSED Server received ACK from client and connection is closed.