How does DNS work step by step

 

Client enters a domain name (www.domainname.com) into his browser
The browser contacts the Client's ISP for the IP address of the domain name
The ISP first tries to answer by itself using "cached" data.
If the answer is found it is returned. Since the ISP isn't in charge of the DNS, and is just acting as a "dns relay", the answer is marked "non-authoritative"
If the answer isn't found, or it's too old (past the TTL), then the ISP DNS contacts the nameservers for the domain directly for the answer.
If the nameservers are not known, the ISP's looks for the information at the 'root servers', or 'registry servers'. For com/net/org, these start with a.gtld-servers.net.
NOTE: The 'whois' information is never used for DNS, and is often misleading and inaccurate 

For More Detaild Explanation Click Here

ZFS file system Step by Step


ZFS stands for Zettabyte File System .
It is designed by Sun Microsystems for the Solaris Operating.
The features of ZFS include support for high storage capacities, integration of the concepts of filesystem and volume management, snapshots and copy-on-write clones, continuous integrity checking and automatic repair, RAID-Z and native NFSv4 ACLs. ZFS is implemented as open-source software, licensed under the Common Development and Distribution License (CDDL).  

Some of the benefits of the ZFS file system:

  • Filesystem and Volumemanger in one system
  • Easy administration with only 2 commands - #zpool and #zfs
  • advanced raid level and functions
  • snapshots
  • automatic checksum over all data
  • 128 Bit
  • automatic shrinking and growing volumes
  • No RAID cards required, using ZFS built in RAID-Z redundancy. (reduces hardware cost drastically)
  • Effective and Optimal SnapShots
  • Compressed Zpools.
  • Built in NFS/ISCSI/SMB Sharing
  • Support PNFS for high speed interconnects. (Will use all the 6 GigE ports) 
Configuring ZFS 

 Permitted subcommands  are  listiostatstatus online,
       offline, scrub, import, and history.
 
Find version of ZFS
  # kextstat | grep zfs




zpool   - configuring zfs storage pools 

  # zpool create myzfs /disk1 /disk2

  # zpool create mypool mirror disk1s1 disk0s1 mirror disk1s2 disk0s2

# mkfile 100m disk1 disk2 disk3 disk5# mkfile 50m disk4
# ls -l disk*
-rw------T   1 root     root     104857600 Sep 11 12:15 disk1
-rw------T   1 root     root     104857600 Sep 11 12:15 disk2
-rw------T   1 root     root     104857600 Sep 11 12:15 disk3
-rw------T   1 root     root     52428800 Sep 11 12:15 disk4
-rw------T   1 root     root     104857600 Sep 11 12:15 disk5
 
Creating hot spares
 
when any disk goes down the disk marked as hotspare will 
automatically take its functionality after it gets replaced.
 
#  zpool create pool mirror disk0 disk1 spare disk2 disk3
 
These spares can be across multiple pools and can be added 
with zpool add  and removed with zpool remove
 

Automated Installation of MySQL without asking password

is your  the installation process  pops up a blue dialog asking for a root password ?? want to make automated

without the asking of password then

First give this two commands

echo "mysql-server mysql-server/root_password select (password omitted)" | debconf-set-selections 

echo "mysql-server mysql-server/root_password_again select (password omitted)" | debconf-set-selections 


Then the installation will not ask for passowrd then continue installation.

apt-get install mysql-client-5.1 mysql-server-5.1 -y

Virtualization Terminology

DataCenter  Its a logical entity defining a set or resources.these set of resources include collection of number of clusters of Virtual meachines ,  Network and Sotrage. The datacenter is highest level of containment of all these resources ( physical and logical )  managed in virtual environment

Storage Its a abstracted view of the physical storage assigned to a data center.It is either iSCSI, or Fiber Channel, or NFS

Cluster set of physical hosts that are treated as a resource pool.Hosts in a cluster share the same  network infrastructure and the same storage. When in a cluster virtual meachines can move  from host to host

Redhat Virutulization KVM Faq's and commands

Min configuration 6GB disk space, 2GB RAM
Recommended   6GB+ Guest OS size , 2GB + Ram required for Guest OS

Check Intel® VT virtualization extensions are enabled .

xm dmesg | grep VMX

example output

(XEN) VMXON is done
(XEN) VMXON is done


VMXON in the output tells that it is on.

Check AMD-V architectures

xm dmesg | grep SVM

example output

(XEN) AMD SVM Extension is enabled for cpu 0
(XEN) AMD SVM Extension is enabled for cpu 1


Installing Redhat Virtulization with yum
----------------------------------------------------------
install "xen" and "kernel-xen" packages

# yum install xen kernel-xen
# yum install virt-manager libvirt libvirt-python libvirt-python python-virtinst

Installing guest with virt-install
---------------------------------------------
# virt-install --name fedora9 --ram 512 --file=/var/lib/xen/images/fedora9.img \
 --file-size=3 --vnc --cdrom=/path=to/fedora9.iso

Giving location of ISO file

virt-install --name nare-Cmd-Ubuntu --ram 512 --file=/var/ns-ubuntu.img   --file-size=8  --cdrom /home/kvm/ubuntu-9.04-desktop-i386.iso 


# virt-install -n rhel5PV -r 500 -f /var/lib/xen/images/rhel5PV.dsk -s 3 --vnc -p

-l\ftp://10.1.1.1/trees/RHEL5-B2-Server-i386/

sudo virsh reboot rhel5PV


--vnc opens a GUI window installation

creating guests with virt-manager
-------------------------------------------------
$ sudo virt-manager &








Note : Use default location for Guest  which is "/var/lib/xen/images/. "
          if you choose different location make sure it is added to your SELinux policy and  relabeled before you  continue with the installation

Creating XML configuration for installed VM

virsh dumpxml NS-test-ubuntu> naresh.xml
Cat naresh.xml will give show the xml file
 
After creating xml file of a VM 
 
virsh --connect qemu:///system
to get connected to virsh prompt and then define the Virtual machine. 
virsh # define /var/lib/libvirt/images/naresh.xml
 
after defining the VM we can issue commands like
 
 
virsh # shutdown NS-test-ubuntuDomain NS-test-ubuntu is being shutdown
 
 
virsh # start NS-test-ubuntuDomain NS-test-ubuntu started
 
 
virsh # list
 Id Name                 State
----------------------------------
  1 storage              running
  8 NS-test-ubuntu       running 
 
nice link for virtulization with KVM on ubuntu-9.10

Why symbolic links can be created across filesystem boundaries ?

Symbolic links use pathname to establish a link and not the inode number.

Path names are also unique making it possible for link creation

ls -l  /home/user1/file1 /tmp/file2

check the inode of both "file1" and "file2" by using the command


ls -i /home/user1/file1
ls -i /tmp/file2


we can find different inode number for both these files.

Disable Root user to login SSH service step by step

1) Log-in as Root
2) Edit /etc/ssh/sshd_config

    There is a parameter

  PermitRootLogin=Yes
 change it to

  PermitRootLogin=No 

3) restart the sshd service and make sure its turned on

    service sshd restart        or 
    /etc/init.d/sshd restart
   
    chkconfig sshd on