Thursday, May 29, 2014

How to set timezone on Redhat Linux

Tips & Tricks: Changing timezone


How do I change my system timezone from the command line without using redhat-config-date?

In order to change the timezone of your system you will need to access the file /etc/sysconfig/clock directly:
 
#ZONE="America/New_York"
ZONE="GMT"
UTC=false
ARC=false
Note: If your system's BIOS has UTC set to true, then set UTC to true. If it has it set to false, set it to false. UTC in the configuration file must always reflect your BIOS settings.
In order to get the particular zone you wish to use you must associate ZONE with a file located in /usr/share/zoneinfo. It is wise to note the directory structure because if you need to set the timezone to that of Shanghai which is located in the Asia directory you will then have to set your ZONE variable to the following :
ZONE="Asia/Shanghai"
Or perhaps you need to set the timezone to that of East Brazil :
ZONE="Brazil/East"
Finally save the file /etc/sysconfig/clock and on next reboot the system will be set to the defined timezone.

For the time on the machine to reflect the change timezone we need to link the zoneinfo file to /etc/localtime. This can be done as follows :

If you are setting your timezone to "Brazil/East" link the following file to /etc/localtime :
# ln -sf /usr/share/zoneinfo/Brazil/East /etc/localtime
Now by typing the date command to display the time you should see if reflect the newly linked timezone :
# date
Thu Sep 30 10:06:23 BRT 2004

Ref: Redhat 

SAN Basic


How to find wwn in Redhat Linux? 



HBA= HOST BUS ADAPTER  
           
HBA is the device which is inserted in the server and storage  mother board PCI slot.
Fibre channel(FC) cable connected in HBA ports.
HBA that interconnects with servers, switches and storage devices on the fabric switch.
FC HBA have (world wide port number WWPN and WWNN (world wide node name) like MAC address

To get the WWNN (World Wide Node Number) in Linux:
#cat /sys/class/fc_host/host3/node_name
 0x500143802427eb2d


To get the WWPN (World Wide Port Number) in Linux:
WWPN is a unique 64-bit identifier that is assigned to a fibre channel node port, called an N_port. The storage area network (SAN) administrator assigns storage to a WWPN. This scheme provides security limiting access to storage on the SAN


# cat /sys/class/fc_host/host3/port_name
0x500143802427eb2c





a.    Below is the simple command to find WWN on Redhat servers.

systool -c fc_host –v

systool -c fc_host -v
Class = "fc_host"

  Class Device = "host3"
  Class Device path = "/sys/class/fc_host/host3"
    fabric_name         = "0x10000027f896ae84"
    issue_lip           = <store method only>
    node_name           = "0x500143802428e171"
    port_id             = "0x010200"
    port_name           = "0x500143802428e170"
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "8 Gbit"
    supported_classes   = "Class 3"
    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "HPAJ764A FW:v5.03.02 DVR:v8.03.01.05.05.06-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              = <store method only>

    Device = "host3"
    Device path = "/sys/devices/pci0000:00/0000:00:01.0/0000:04:00.0/host3"
      ct                  =
      edc                 = <store method only>
      els                 =
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          = <store method only>
      optrom              =
      reset               = <store method only>
      sfp                 = ""
      uevent              = <store method only>
      vpd                 = "$"


  Class Device = "host4"
  Class Device path = "/sys/class/fc_host/host4"
    fabric_name         = "0x10000027f8badc86"
    issue_lip           = <store method only>
    node_name           = "0x500143802428e173"
    port_id             = "0x010200"
    port_name           = "0x500143892428e172"
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "8 Gbit"
    supported_classes   = "Class 3"
    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "HPAJ764A FW:v5.03.02 DVR:v8.03.01.05.05.06-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              = <store method only>

    Device = "host4"
    Device path = "/sys/devices/pci0000:00/0000:00:01.0/0000:04:00.1/host4"
      ct                  =
      edc                 = <store method only>
      els                 =
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          = <store method only>
      optrom              =
      reset               = <store method only>
      sfp                 = ""
      uevent              = <store method only>
      vpd                 = "$"


b.    Below is the simple steps to find WWN in Linux.

Step 1:  cd /sys/class/fc_host
Step 2:  cd to the host3# Host directory.
Step 3: cat node_name
0x500143802428e171


Useful command to find to list the FC Adapter 

# lspci | grep -i Fibre


04:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)

04:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)

How DNS Wors


Thursday, May 8, 2014

RHEL 5 vs RHEL6

RHEL 5 Vs RHEL 6
  • Virtualization: In RHEL 6 KVM (Kernel based Virtual Machine) was used as a hypervisor but in the earlier releases of RHEL XEN was used as a hypervisor. The main advantage of KVM is that it supports the installation of many virtual machines/operating systems like Windows, Linux, Solaris and also it is very easy to manage those virtual machines.
  • Security: RHEL6 has an enhanced version of SELinux(Security Enhanced Linux) now, Basically now the features are more improved and there are various new set of rules which are added to SELinux one of such rule/feature is of SVirt which provides security to virtual machines from hackers.
  • EXT4: It stands for Extended 4, It has various new advantages then EXT2/3 which were used in earlier version(s) of RHEL. EXT4 is comparatively more faster and easy to manage then previous file systems.
  • IPv6: RHEL6 supports IPv6.
  • NFS4: It uses NFSv4 (Network File Transfer) the latest version of NFS for the sharing of files in the network rather than NFSv3.
  • GUI: It has a far better GUI(Graphical User Interface) then RHE5 or any of its prior version(s).