Tuesday, June 25, 2013

Difference between Linux and Unix


Linux vs Unix


Linux
 is an open source, free to use operating system widely used for computer hardware and software, game development, tablet PCS, mainframes etc. Unix is an operating system commonly used in internet servers, workstations and PCs by Solaris, Intel, HP etc.


Linux
Unix3


What is it?:Linux is an example of Open Source software development and Free Operating System (OS).Unix is an operating system that is very popular in universities, companies, big enterprises etc.
Cost:Linux can be freely distributed, downloaded freely, distributed through magazines, Books etc. There are priced versions for Linux also, but they are normally cheaper than Windows.Different flavors of Unix have different cost structures according to vendors
User:Everyone. From home users to developers and computer enthusiasts alike.Unix operating systems were developed mainly for mainframes, servers and workstations. The Unix environment and the client-server program model were essential elements in the development of the Internet
Manufacturer:Linux kernel is developed by the community. Linus Torvalds oversees things.Three bigest distributions are Solaris (Oracle), AIX (IBM) & HP-UX Hewlett Packard.
Price:Free but support is available for a price.Some free for development use (Solaris) but support is available for a price.
Usage:Linux can be installed on a wide variety of computer hardware, ranging from mobile phones, tablet computers and video game consoles, to mainframes and supercomputers.The UNIX operating system is used in internet servers, workstations & PCs. Backbone of the majority of finance infastructure and many 24x365 high availability solutions.
Processors:Dozens of different kinds.x86/x64, Sparc, Power, Itanium, PA-RISC and many others.
Development and Distribution:Linux is developed by Open Source development i.e. through sharing and collaboration of code and features through forums etc and it is distributed by various vendors such as Debian, Red Hat, SUSE, Ubuntu, GentuX etc.Unix systems are divided into various other flavors, mostly developed by AT&T as well as various commercial vendors and non-profit organizations.
Architectures:Originally developed for Intel's x86 hardware, ports available for over two dozen CPU types including ARMis available on PA-RISC and Itanium machines. Solaris also available for x86/x64 based systems.
GUI:Linux typically provides two GUIs, KDE and Gnome. But Linux GUI is optional.Initially Unix was a command based OS, but later a GUI was created called Common Desktop Environment. Most distributions now ship with Gnome.
File system support:Ext2, Ext3, Ext4, Jfs, ReiserFS, Xfs, Btrfs, FAT, FAT32, NTFSjfs,gpfs,hfs,ufs,xfs,zfs format
Text mode interface:BASH (Bourne Again SHell) is the Linux default shell. It can support multiple command interpreters.Originally the Bourne Shell. Now it's compatible with many others including BASH, Korn & C.
Security:Linux has had about 60-100 viruses listed till date. None of them actively spreading nowadays.A rough estimate of UNIX viruses is between 85 -120 viruses reported till date.
Killer features:Ksplice - kernel update without rebootZFS - Next generation filesystem Dtrace - dynamic kernel tracing
Threat detection and solution:In case of Linux, threat detection and solution is very fast, as Linux is mainly community driven and whenever any Linux user posts any kind of threat, several developers start working on it from different parts of the worldBecause of the proprietary nature of the original Unix, users have to wait for a while, to get the proper bug fixing patch. But these are not as common.
Inception:Inspired by MINIX (a Unix-like system) and eventually after adding many features of GUI, Drivers etc, Linus Torvalds developed the framework of the OS that became LINUX in 1992. The LINUX kernel was released on 17th September, 1991In 1969, it was developed by a group of AT&T employees at Bell Labs and Dennis Ritchie. It was written in “C” language and was designed to be a portable, multi-tasking and multi-user system in a time-sharing configuration.

Saturday, June 22, 2013

All the folder in my pendrive become shortcut with extension .lnk and pendrive shows used space

If you did not format your flash drive or pendrive then,

Delete any .lnk files from the drive then,

Click on "Start" -->Run-->type cmd and click on OK. 
(i.e go to command prompt)

Here I assume your pendrive as K: 

Enter this command. 

attrib -h -r -s /s /d K:\*.* 

Note : Replace the letter K with your pen drive or flash drive letter. 

Now check for your files in Pen Drive. 

Please Give your comments.

Good Luck.

Wednesday, June 5, 2013

What is the Difference between a Storage Area Network (SAN) Network Attached Storage (NAS)


At first glance Network Attached storage, also called  NAS is not much different from a Storage Area Network (SAN).  They both attach to a network, they both provide storage to computers on their network.  There are some major differences between the two storage roles.  However, these two things are becoming more and more the same thing.

Differences in Appearance

The first thing to look at when debating if you are using a SAN or a NAS is how the operating system sees the storage.  Does the operating system see the storage as being on a remote computer?  Or does the operating system see the storage as being local?  If the operating system and/or programs knows the storage is not local, you are probably working with a NAS.

A good example of this is with Microsoft Windows network drives.  If you map a network drive in windows you get a drive letter, but windows shows this drive as a network drive.  Only the one user has access to it, and windows will not let you use this drive for many functions.

If you connect to a SAN Windows can’t tell the storage is actually somewhere on the network.  It treats the storage as if it was connected directly to the server.  It is accessible to any user logged into the system; and you can use it just like any other drive.

NAS Protocols

When working with a SAN vs a NAS there are different protocols involved.  When you connect to a NAS you will typically be working with Network Attached File Systems (NFS) or Common Internet File Systems (CIFS).  In Windows, if you map a network drive to an NFS or CIFS volume, it will be treated as I have stated above, it is usable by the one user, and you are limited in what you can do.

In Linux/Unix network drives are treated differently.  When you mount an NFS or CIFS volume it is treated much like it was a local disk and is available to all users on the system unless the file system permissions do not allow it.

SAN Protocols

When working with a SAN the most common protocols are iSCSI and Fiber Channel.  Typically when working with the iSCSI protocol you will operate over an Ethernet network, and when working with Fiber Channel you will operate over a fiber optic network.  However, this is not always the case.  There is another protocol calledFiber Channel over Ethernet (FCOE).  And there is nothing stopping you from using iSCSI over a fiber optic network.

FCOE operates a lot like iSCSI.  iSCSI  is an implementation of the SCSI protocol where the SCSI operations are wrapped in a TCP Packet and sent over the network.   When the storage system receives the TCPpacket, it extracts the SCSI command and executes it on the local storage.  It then takes the result, wraps it in another TCP packet it sends it back to the client machine.  FCOE does the same thing, only it uses the Fiber Channel protocol instead of the SCSI protocol.

How do they Operate?

When working with NAS storage, the client machine operates at the file level.  This means when you want to access mycoolpicture.jpg your computer sends a message the NAS over the network asking for mycoolpicture.jpg, then the NAS responds by sending the file.  When using a SAN you are operating at the block level.  

This means the client machine can’t simply ask for mycoolpicture.jpg.  The client machine needs to actually tell the SAN where on the volume the file is.  The operating system will send a message to the SAN asking for specific blocks on the file system.  For example, if the picture is stored in blocks 5555 - 5577, then the client system would ask for blocks 5555 - 5577, the SAN would read those blocks, then send them over the network.  The SAN does not know what it is reading, it is simply following orders.

Shared access to a SAN or a NAS

Due to the nature of how a NAS works, it is not a problem to connect multiple servers to the same share on your NAS.  You have to be more careful when connecting the same volume on a SAN to more than one client system.

This limitation comes from the way the SAN operates.  Since a NAS shares files, the NAS device can handle things such as file locks and consistency checking.  A SAN operates at the block level, and just trusts the operating system to know what it is doing with the blocks.  Unless your file system is setup to allow for simultaneous access from more than one device you are asking for trouble.

For example, lets assume you have a SAN with a single volume, and you connect it to two servers runningWindows 2003 Standard.  Both systems see the volume and try to use it.  When the first server writes files to the system, everything works fine.  Then the other server modifies the files in some way, perhaps it just reads the files and updates the date accessed attribute on the file.  NTFS is looking at the blocks of the file system and see’s changes it did not expect.  NTFS at this point may think there is something wrong with that Block and take some corrective action.  At the same time the other server will see something strange happening and take the same action.  In the end, you have a corrupt file.

Some file systems are designed for simultaneous access to the same SAN volume, for example theVMWare File System (VMFS).  In a purely windows environment you want to make sure you never connect the same SAN volume to more than one server at a time unless you are using clustering.

When using Microsoft Clustering Services (MSCS) the cluster service knows you have a volume connected to more than one server and it ensures that the volume is only mounted on a single server within the cluster at any given time; assuming it is properly configured.  This does not protect you from mounting that volume on another server outside the cluster, which would be a bad idea.

Cluster Aware File Systems

As I expressed in the previous section, you have to be careful as to which file system you use when sharing storage using iSCSI or similar protocols with more than one server at a time.  A cluster Aware File System allows you to connect the file system to more than one server at a time.

Below is a list of a few cluster aware file systems:

OCFS2 - Oracle Cluster File system (Part of Linux Kernel)
VMFS - VMWare File System
CXFS - Clustered XFS

Below is a list of File systems which I know to not be cluster aware:

NTFS - NT File System
EXT2 - Linux
EXT3 - Linux
Fat 16/32 - File Allocation Table (Used in Dos and Windows)
XFS - Linux

The above lists by no means cover every file system, but does give a few examples of what you may be using.  In a future article I will go over some of the good and bad elements of different file systems.