Thursday, April 17, 2008

How to make a NAS box in less than 2000 $ a.k.a "Cheap tension-free storage for SME's"

Part I



Storage, as we know, is one of the main troubles in the head of an IT dude taking care of his company’s infrastructure.

Especially if the company is a small one going large, and the CTO is screaming atya for every dollar being spend for IT goods.
Here's the story of a system administrator Mr X. (...and let's call his manager Mr. Pointy Hair - for obvious reasons...).
He was recruited by a startup company (let’s call it Conundrum exporters limited). His responsibility was to setup and lead the technical department (not that there will be lots of them to lead, tech department in a non tech SME will be around…1). When he joined, they were around 10 people in all the various departments. The company was projected to grow to around 100 people, and thereafter, maintain a slow rate of recruitment.

When you are a small company, you start small. With a population of only around 10 people, Mr. X thought, "Well, what do we need more than a RAID box and rsync backup to a 500GB local disk??? I love my simple life!"


Hmmm...Well, that happiness lasted about 20 days and 3 hours and 43 seconds. Then the enchanting moment came...and the RAID storage crashed. Not just one disk, but two. - great old Sir Murphy used Mr. X to prove his theory, as he regularly does to most of us.
After 14 cups of coffee, hours of fiddling around with rsync options and the backup drives, and running around the cubicles to ask people to restore whatever they had on their local machines, he got around 90% of the data restored. For the rest 10%, he was barbecued by management (without sauce!).
Mr. X knew now the time had come to get a proper storage infrastructure. He went to his boss:

Mr X: I need 10,000$ to build a good storage and backup system here.
Mr. Pointy Hair: I’ll give you 10 bucks!
Mr. X: Wha??...buta…10…dadda…mama…jaba…
Mr. Pointy Hair: Okay, now you are making no sense!

After hours of crying begging, pleading and signing a bond to stay in the company for a year more in return for the budget allocated for storage, Mr. X bargained up a low but decent sum – 3000$. Mr. X had to stop bargaining when his boss started to look something similar to this:


He knew it was time to escape. But what was he supposed to do with 3000$? He could not even build a chicken farm with that!
So Mr. X sat down, got his genius working, and set out to build something that is the gist of this entire post...he built a NAS box with his own hands; and mankind was never the same again!

But how did he do that the pocket money that Mr. Pointy Hair gave him? Read on…




Mr. X is just one of the hundreds system administrators in the emerging markets like India and China. There are a lot of SME’s who cannot afford enterprise class storage and backup solutions, but they need it all the same. And to top it, these organizations typically have multinational clients, and have to maintain high standards when it comes to data protection and reliability.
Struggling with all these issues at hand, a typical Mr. X would look for a solution which is as cost effective as possible to start with, and which is scalable in both size and speed to grow with the organization, all without compromising on reliability.
Mr. X have been reading a few tech journals, and once remembered reading an article on NAS. It was something about a black box which stores your files, was easy to setup and maintain, and it did the laundry and did cooking too! At least that is what Mr. X remembered. So he decided to do some digging, and found out more about NAS boxes. Let's do that too.

Well, what is NAS? The definition of NAS is very broad. It reminds me of p2p concept. There are a hundred ways to implement both, the concepts being so broad. Network Attached Storage – does it mean that anything that I can attach to the network and which serves files can be a NAS?
Frankly, I don’t know. And I don’t want to know. I have seen people sell NAS boxes which are nothing but extended ATX boxes with SATA disks attached to a RAID controller, running Windows Storage Server 2003. I have also seen better, more modular and highly extensible solutions, where an external storage array(s) will be attached to NAS controller(s), through an interconnection fabric, running embedded Linux. Let's just leave the definition at "A multi platform black box which exports various network filesystems, is easy to setup, and is supposed to run without much downtime or maintenance". Whatever comes beyond that is fancy stuff...desirable, but fancy (like Jeremy Jones).

So Mr. X finally settled on a NAS box as the solution to his burdens. No fancy stuff to start with…no clustering, no virtualization…just a plain vanilla NAS box. But for the money he has, he cannot get a good NAS box. He looked around some online shops and found out that a decent NAS box with the features that he needs will cost around 5000$. If he wants good returns for every penny he got, he’s got to build it on his own.
The main feature Mr. X focused was low cost, but he had to achieve those without compromising on those much talked about enterprise standards.

Most of us know that for a growing business, a scalable and extensible storage solution is needed. SAN would not make sense, because most of SME's (Small and Medium Enterprises) do not even grow to that kind of complexity, and more importantly the company would close down (because Mr. Pointy Hair boss got a stroke after reading the check for the FC switches). The ideal solution will be a NAS box. But again, not just "any" NAS box...

Mr. X sat down and did a small requirement analysis for his company. And finally, when the vending machine was out of coffee, and when the clock struck midnight, his notebook looked something like this:




1 . Bandwidth required
Mr. X’s company was a typical SME. They had a steadily increasing workforce, and most of the people works on spreadsheets, documents and some images. Some of them store movies on their home directories also, but such people are not accounted for (they will be hunted down and torched!). This means that bandwidth per user is not huge, and the IOP’s (I/O operations per second) not that demanding. We will talk later, about another guy - Mr. Y (ya, right) who works in a completely different scenario, a Visual Effects Studio, or a Geologic or weather research center, for example.

So in the end he tossed the coin around a couple of times, did some adjustments, and came up with a ballpark figure of about 8 Mbps (1 MBPS) per user. (Okay, it not a ballpark figure, he netstat-stalked a dozen of the pretty employees and averaged the results.)
100 Mbps backplane would be a congestion if everyone started using the network at the same time, because with hundred users, we have 1 MBps x 100 = 100 MBps total, and a 100 Mbps network practically gives only around 10 MBps. Even a 1 Gbps backplane will not be enough if not properly planned, because 1 Gbps = 125 MBps, and practically, 90 MBps). So Mr. X better think ahead in planning the network properly with separate VLANs, routings and gateways. Anyways, this is not a network tutorial, so we will concern more with storage. Since the prices were cheaper for 1Gbps nowadays, Mr. X decided ithat Gigabit would make a better option than 100 Mbps.


2. Reasonable Scalability
There are NAS boxes in the market which offer a scalability in the range of 2TB to 100’s of TB. A customer would want his storage to be as scalable as possible, so that it expands with the needs of the organization. Scalability is a feature on which most SME’s are ready to make a one time investment, because typically their data would not span more than a few dozens of terabytes, but they want to be adding the storage only when required.
But the box should be built such a way that, if tomorrow, by some wild stroke of luck, Mr. X’s company grows into a big enterprise; they can still reuse it. Most vendors today provide this by providing iSCSI support.


3. Sustained Availability

Usually, the most important component of a system fails when it is most needed. And it remains a headache to avoid or deal with the failures in equipment, especially storage. Typical levels of fault tolerance that we can provide include:
· different levels of RAID protection
· multiple standby power inputs
· redundant system components (multiple interconnect between NAS engine and storage arrays, redundant internal buses, etc).
Most of the SMBs will be having one or two run-of-the-mill general purpose system administrators who will not be experts in storage. So, if you give them a storage server, tell them to decide the RAID levels assign LUNs and trunk the network ports – all based on their needs; then even if you are a friendly sales guy, they will think you are hostiles from mars. So instead of attracting angry mob with torches, make the box as user friendly as possible, hiding most of the unnecessary complexities. Put in a few self healing abilities if possible, and some redundant failover hardware.


4. Performance

The performance of the system must be acceptable and scalable upto a certain threshold. And that means once you tell that the box gives x MBps bandwidth, it should always give x bandwidth, no matter what. Typically, the performance starts to drop when either the userbase increases, or when the available storage in the NAS reduces beyond a limit. We can define a limit on the number of users, iops and bandwidth attainable, but we should deliver the promised performance irrespective of the external factors.


5. Price

The price is one of the main deciding factors for an SMB customer. Especially with a non IT sector company, the management has to be convinced about the advantages in the investment made for storage and servers. The drive from the management will be most of the time to start with whatever is immediately necessary. You want 2 GB now, buy 2 GB now, and upgrade later if we have to. “Why should we invest in something which will not give us value for the next 1 year? “ - would one sensible question that management would ask most of the time.
Let’s see what Mr. X came up with!





No comments: