You are on page 1of 5

Filesystem creation steps:

================================
1. Create the LVM physical volume.
pvcreate /dev/sdd

2. Create the clustered LVM volume group.


vgcreate -c y mysqlvg /dev/sdd

3. Activate the volume group exclusively on the node.


vgchange -a ey mysqlvg

4. Create the LVM logical volume.


lvcreate -n mysqllv -L size mysqlvg

4.1 command to created stripe lv.

lvcreate -L 15G -i4 -n productlv oraclevg

5. Add a file system to the LVM logical volume.


mkfs -t ext3 /dev/mysqlvg/mysqllv [fs_options]

6. Create a mount point for the logical volume.


mkdir /mnt/mysql
You must also create this path on each node in the cluster.

7. Mount the LVM logical volume.


mount -t ext3 /dev/mysqlvg/mysqllv /mnt/mysql

8. Create the directory structure for the MySQL database files on the mounted
logical volume.
cd /mnt/mysql
mkdir /mnt/mysql/var
mkdir /mnt/mysql/var/lib
mkdir /mnt/mysql/var/lib/mysql

9. Modify the file ownership of the mount point and subdirectories.


chown -R mysql:mysql /mnt/mysql

10. Deactivate the LVM logical volume.


vgchange -a n mysqlvg

Check stripelv
===========================
lvs -a -o segtype,devices,lv_name,vg_name

lvdisplay --maps /dev/oraclevg/productlv

lvs --segments

Set up of Timezone
============================

vi /etc/sysconfig/clock and update file as below

ZONE="Asia/Calcutta"
UTC="true"

vi /etc/profile
TZ=�Asia/Calcutta�
export TZ

make a link

ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

=========================================================

Set up bonding in OEL


--------------------------------
cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.242.160.227
GATEWAY=10.242.161.250
DNS1=10.255.251.1
NETMASK=255.255.254.0
USECTL=no
BONDING_OPTS="mode=active-backup arp_interval=1000
arp_ip_target=10.242.161.250,10.242.161.251,10.242.161.252"
HOSTNAME="bomfadbu0002.in.db.com"

cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

cat /etc/sysconfig/network-scripts/ifcfg-eth4
DEVICE=eth4
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

cat /etc/modprobe.d/network.conf
alias bond0 bonding
options bond0 arp_interval=1000
arp_ip_target=10.242.161.250,10.242.161.251,10.242.161.252 mode=1 primary=eth4

restart network service


=============================
/etc/init.d/network restart

following entries should be as follows to enable arp setting to bond

echo 0 > /sys/class/net/bond0/bonding/miimon ----to disable miimon setting

echo 1 > /sys/class/net/bond0/bonding/arp_validate ---to enable arp setting on bond

echo 1000 > /sys/class/net/bond0/bonding/arp_interval ---to enable arp interval


========================================
command to check wwn no.

cat /sys/class/fc_host/host6/port_name

command to check fc link status


----------------------------------
cat /sys/class/fc_host/host3/port_state
===========================================

Command to scan a new lun


===========================================

echo "- - -" > /sys/class/scsi_host/host3/scan

steps to create swap space on linux


============================================
dd if=/dev/zero of=/root/myswapfile bs=1M count=1024

mkswap /root/myswapfile

swapon /root/myswapfile

second way
=====================================
swapoff /dev/vg_rhel6/lv_swap

lvextend -L +3GB /dev/vg_rhel6/lv_swap

mkswap /dev/vg_rhel6/lv_swap

swapon /dev/vg_rhel6/lv_swap
=========================================

Extending Lv
===============
lvextend -L +20G /dev/mapper/dbpaysvg-dbpays5data01lv
resize2fs /dev/mapper/dbpaysvg-dbpays5data01lv

Reduce Lv
===============

umount /home/
e2fsck -f /dev/mapper/vg_cloud-LogVol00
resize2fs /dev/mapper/vg_cloud-LogVol00 10G
lvreduce -L 10G /dev/mapper/vg_cloud-LogVol00
e2fsck -f /dev/mapper/vg_cloud-LogVol00
mount /home/

Ftp issue on server


================================
check vsftpd service is running

service vsftpd status

start vsftpd service on the server


service vsftpd start

To change duplex mode


================================
# ethtool -s eth0 speed 100 duplex full
# ethtool -s eth0 speed 10 duplex half
# ethtool -s eth0 speed 100 duplex full
# ethtool -s eth0 autoneg off/on

Add route on linux server


==============================
route add -net 233.1.2.6 netmask 255.255.255.255 dev bond1

=============================================================
OEL HBA.

/usr/sbin/hbacmd listhbas | grep Model


/usr/sbin/hbacmd listhbas | grep Port.WWN

==========================================================
Assign MAC address to NIC

/etc/init.d/networking stop
ifconfig eth0 hw ether 02:01:02:03:04:08
/etc/init.d/networking start
========================================================

To change ILO ip from running server

=========================================
hponcfg -w ILO.xml --------> will captrue all ILO information
cat ILO.xml --------> modifying the file to contain the IP and configuration

hponcfg -f ILO.xml --------> will update new configuration of ILO

======================================================================
command to add UDP in linux server.

iptables -A INPUT -p udp --dport 514 -j ACCEPT

=======================================
PORT status.

nmap -p T:60010 -O localhost


=============================================
If you found error as below

mmbbkcmdadhp01:~ # passwd cyberadm


Changing password for cyberadm.
passwd: User account has expired

solution for above error:


usermod -f -1 cyberadm
====================================================
Regenrate /etc/mtab file if file corrupted.

cp -p /etc/mtab /etc/mtab_backup

"grep -v rootfs /proc/mounts > /etc/mtab"

You might also like