Monday, June 7, 2010

Fun with FreeNAS – iSCSI

source : http://frrl.wordpress.com/2009/08/25/fun-with-freenas-iscsi-when-a-local-disk-is-not-local/

Read our related posting first -

NAS for Clunkers: How to turn that old PC into a high tech Network Storage, Web Server, and Torrent Server

“iSCSI uses TCP/IP (typically TCP ports 860 and 3260). In essence, iSCSI simply allows two hosts to negotiate and then exchange SCSI commands using IP networks.

By doing this iSCSI takes a popular high-performance local storage bus and emulates it over wide-area networks, creating a storage area network (SAN). Unlike some SAN protocols, iSCSI requires no dedicated cabling; it can be run over existing switching and IP infrastructure.

As a result, iSCSI is often seen as a low-cost alternative to Fibre Channel, which requires dedicated infrastructure.”

FreeNAS_Logo

The Further Adventures….

Further adventures with FreeNAS running on a PC Clunker tucked away in the basement…

I decided to try to get iSCSI to work in FreeNAS. Both Windows Vista and Windows 7 has built-in support for iSCSI.

What is iSCSI?

What is iSCSI? In a few words, iSCSI is the SCSI protocol over an IP network.

And what is SCSI? SCSI is a protocol that a computer can use to talk to peripherals of all kinds.

The Apple Mac used SCSI a long time ago while PC people were fumbling with IRQ’s and DMA settings to get their peripherials to work.

SCSI is easy and Apple CEO Steve Jobs made a good choice to use SCSI attached peripherals for the Mac back in 1984.

What can iSCSI do for you?

So, enough of that. What can iSCSI and FreeNAS do for you? What it can do is make a chunk of storage on a network look like a local disk on your PC. Why would you want to do this? Keep reading.

In about 15 minutes of my copious free time I was able to get my Windows 7 PC linked up to a chunk of storage on FreeNAS using iSCSI. As a home user, using iSCSI and FreeNAS you are on your way to a SAN (Storage Area Networks) that are commonly used in large corporate data centers.

Why SAN ?

Why connect real disk to a PC or a server when you can connect storage from a storage pool on a network that looks like local disk to that PC or server? Here’s why. Because managing a large storage pool on a network is more cost effective than managing physical disks on a PC or a server.

Central storage can be backed up in a consistent manner. Storage allocated from a central pool can be dynamically re/allocated to PC”s and servers on demand. If you need more “local disk” on your PC then why mess with internal physical drives of fixed capacity? Using SAN you can dynamically allocate any size disk you need and then attach this to your PC or server and have it appear as local.

Attaching real physical disks of fixed size to a serer or PC is so “five minutes ago”. Storage Area Networks is sometimes a better solution.

Best thing is that FreeNAS and your Windows Vista/7 machine will let you easily mess with iSCSI and experiment with SAN for the cost of a “Clunker”.

FreeNAS and iSCSI

Here is my configuration in pictures – iSCSI to FreeNAS works like a charm.

Click to enlarge and take a good look at this. Disk 1 (volume name iSCSI) looks like real disk attached to my PC. It’s not a real disk in the sense of Disk 0 which is real hardware spinning around inside this laptop. Look over to the right. The volume iSCSI looks like a hard drive. It is not a network share like NAS40GB. FreeNAS is presenting both the network share (NAS4oGB) and the volume iSCSI via iSCSI over my home netowrk.

FreeNAS_iSCSI_1

This Microsoft web page will show you step by step how to connect to iSCSI storage. The window to the right is the configuration that shows Windows where to find the network storage. I took all the defaults.

FreeNAS_iSCSI_2

Here is the configuration in FreeNAS. The 1,000 MB (1GB) volume is just a blob of bits as a file under /mnt/NAS40GB/mySCSI.

FreeNAS_iSCSI_3

Conclusion

Go do.

Resources

http://en.wikipedia.org/wiki/IP_SAN

http://www.freenas.org/index.php?option=com_openwiki&Itemid=30&id=sug:en