Showing posts with label NAS. Show all posts
Showing posts with label NAS. Show all posts

Saturday, March 1, 2014

On the FileServer : The Disk Drives

In the first part of the series, I briefly touched on some of the hardware that are either necessary or good to have in order to build your own NAS. Right now, I'll go on to talk about the disk drives.

There are many types of disk drives (appreviated HDD from now on) and are mainly differentiated by the following parameters -

  • Form Factor. Either 3.5" or 2.5"
  • Interface Type. Either SATA or SAS.
  • Spindle Speed. How fast the disk platters spin.
  • Capacity. How much the disk can store.
Form Factor
This mainly tells you how big (or small) the disks physically are. Most desktops use the 3.5" form factor. If you opt for this, you don't have any other physical parameters to worry about. All 3.5" HDD comes in the same height of 1" today.

If, for some reason, you want to use 2.5" HDD, then you need to be aware that they comes in several different heights. The most common today will be 7mm and 9.5mm. A few high capacity ones come in 12.5mm height. Lastly, some enterprise drives, such as the Seagate Constellation 2 series comes in at 15mm height. You have to take note of the height, especially if you want to use a hot-swap cage.

You might have also heard of 1.8" HDD, primarily manufactured by Toshiba. I'll suggest you leave these alone.

Interface Type
This describes the interface the HDD supports when connecting to your computer. The mainstream today is Serial ATA (SATA). We are at its 3rd revision, supporting 6Gbps link speed. Version 2 supports 3Gbps and the first version does 1.5Gbps. The later versions are usually backward compatible with earlier versions.

HDD today are mostly SATA3, supporting 6Gbps link speed. If you have the unfortunate task of connecting these HDDs to a computer that only supports SATA2 running at 3Gbps, your HDD will then run at the same link speed of 3Gbps. However, you don't have to lose sleep over this. 3Gbps is the link speed between your computer and your HDD. None of the HDDs sold today is able to saturate a single SATA2 link. The only devices that can transfer at more than 3Gbps today are SSDs, SAS/SATA expanders and SATA port multipliers. If you don't know what these are, it's fine as they are not that common and their use is pretty specialized.

You will also have to think about how your computer can support these HDDs. When the SATA standard was first ratified (sometime in the early part of the 21st century), there is a need to slowly transit from the older ATA/ATAPI/IDE/EIDE interface to this new one. As a result, most computer during that time run your SATA interface in the dreaded 'IDE' mode. This basically means the computer is still speaking the older language of IDE despite the HDD is using the new connector. You can find out which mode your computer is using by going into the BIOS and see what mode the BIOS is using. If it's using 'IDE', then you're being short changed. If it's running in 'AHCI' mode, then you're all good. You might also see 'RAID', which means your controller is capable of running some form of RAID. All the newer Intel ICH can do RAID.

The other type of interface which you might see is Serial Attached SCSI (SAS). This is mostly reserved for enterprise deployment in servers. The link speed today is also 6Gbps. I wouldn't recommend this for your home setup since the feature might not benefit your type of workload at home.

Do note that SAS is considered a superset of SATA. If you have a SAS controller, you can connect both SAS and/or SATA drives to it. However, if you have a SATA controller (like most Intel based consumer motherboards), you will not be able to connect a SAS drive to it.

Spindle Speed
This describes how fast the disk platters are spinning. The faster it spins, the higher the performance of the HDD. This is the direct result of the fact that a faster spinning disk takes a shorter time to get to the data. This is known as the disk latency. The lower it is, the better.

Mainstream HDDs today sold over the counter spins at 7200 revolutions per minute (RPM). Some higher performance consumer class drives and entry level enterprise drives spin at 10000 (10k) RPMs. The highest performance drives spin at 15000 (15k) RPMs. You are not likely to see 15k RPM drives sold over the counter.

That said, there are some drives that spin at 5400/5900 RPMs. These are slower than the mainstreams. However, they have 2 clear advantages. First, since they spin slower, they make less noise and vibrate less generally. Second, they almost always consume less electricity.

Capacity
This is the easiest to understand. The highest capacity today (Feb 2014) is 4TB. Only 3.5" form factor drives is capable. 2.5" drives maxed out at 2TB. Also, the higher the spinning speed, the lower the maximum capacity available. You won't find any 2TB 15k RPM Cheetahs anytime soon, maybe never.

OK, so what's best? As a NAS, I want it to be as cost effective as possible. That means I go for the best GB/$ metric. I don't care if the drive spins at 5400 or 7200 RPM. But usually the faster the HDD spins, the more costly it will be. These are the drives I use personally
So basically, I picked big capacity drives. The 3TB and 4TB are at the best price sweet spot today. Lastly, I'll like to touch a little bit about the WD Red (WD Red 3 TB NAS Hard Drive: 3.5 Inch, SATA III, 64 MB Cache - WD30EFRX) and Seagate NAS ( Seagate NAS HDD 4TB SATA 6GB NCQ 64 MB Cache Bare Drive ST4000VN000) drives. What set these apart? Apparently, these drives are tested to run correctly in those off-the-shelf NAS products (like Synology DiskStation 4-Bay (Diskless) Network Attached Storage DS412+ (Black)). One of the feature most advertised is that it has a shorter error timeout. The technical intricacies of this is quite complex and I won't go into the details. Suffice to say that if your normal consumer drives developed a problem, say a bad sector, and the OS attempts to read this sector, it will take a very long time (sometimes forever) for the drive to come back and say 'Sorry, I tried but I couldn't read the data.' This cause mayhem in RAID controllers and sensitive OS. I have had Windows Server totally crashed when it attempts to read a flaky consumer class drive.

Happy hunting. In the next part, I'll talk about the software that links all these parts together.

Tuesday, February 18, 2014

On the FileServer : The Hardware - Hotswap cages, enclosures and controllers

In this series of articles, I'm going to briefly jot down my setup. Hopefully this can provide some insights and ideas to those who are considering building their own NAS. Now, you might ask why a NAS at home? And even if we want a NAS, we can just buy one off the shelf, so why build? These are valid questions and I will share with you my thoughts. I'll then go ahead and list down the main components of the hardware I use.

So, why do you even want a NAS at home? Let's face it, in this digital age, you would have build up a lot of photos of your kids, families and loved ones. Probably videos too. You're likely to have a massive iTunes collection, and maybe a sizable movies collections as well.

Traditionally, you have a desktop (or laptop) and you dump everything on it. The more careful ones will buy an external drive (see some of my recommendations here). At some point in time, you realized you run out of disk space, or you simply need more. Or perhaps you want to share them with another desktop (or laptop) in the household? That's where a NAS will come in useful. It provides a central location where you can deposit your digital life.

Why build your own then? Yes, you can just buy any one of them off the shelf. But I prefer the flexibility of building my own and to also satisfy the geek in me. It isn't really that difficult, you just need a bit of planning and some basic system administration skills. In this article, I'll continue with the hardware I use and then in subsequent articles, I'll follow through with the software and the final setup.

In a typical NAS, one of the key features is that you want many drive bays, which can be easily accessible. Why is this? The more the drive bays you have, the more disks you can plug in, plain and simple. But why do you need it to be accessible? Drives fail. It's not a matter of 'IF' but 'WHEN'. When a drive fail, you don't really want to open up the case and pull the drive. You want to just yank the dead (or dying) drive out from its bay simply by pressing a button or lifting a lever. Because of this requirement, I install what is known as a hot swap cage. There are 2 types, 3.5" or 2.5". 3.5" are more common since they provide more value compared to their physically smaller 2.5" brother.

You can find these hot swap cages on Amazon, an example (3.5") will be ICY DOCK FlexCage MB974SP-2B Tray-less 4 x 3.5 Inch HDD in 3 x 5.25 Inch Bay SATA Cage - Front USB 3.0 Hub. This specific model provides 4 bays, and uses up 3 5.25" bays in your tower. This is also known as a 4-in-3 cage. There are also 5-in-4 cages available. You need to plan a little bit further and decide if you want the 4-in-3 or 5-in-4. I personally use a 4-in-3.

An example of a 2.5" hot swap cage is Thermaltake MAX-1542 Backplane HDD Cage Hot Swap Removable Hard Drive Kits 2.5-Inches SAS/SATA RAID Ready RC1400101A. In most cases, you don't want these unless you plan to use the smaller 2.5" form factor drives. For me, I do have some 2.5" drives lying around (as a result of multiple upgradings of laptop drives) so I got one of these. I use the 4-in-1 type which takes in 12mm 2.5" drives. I have personally saw 6-in-1 cages (Thermaltake MAX-1562 Backplane HDD Cage Hot Swap Removable Hard Drive Kits 2.5-Inches SAS/SATA RAID Ready RC1600101A) but they can only take 9.5mm drives.

Alright, so I have a 4-in-3 and a 4-in-1 cage installed. It can take in 8 drives. Typically, an Intel-based motherboard (like ASUS P8H77-M/CSM LGA 1155 Intel H77 HDMI SATA 6Gb/s USB 3.0 Micro ATX Intel Motherboard) comes with 6 SATA ports. You need an additional disk controller to provide the extra SATA ports. I purchased an Dell PERC card off eBay. It's really a rebadged LSI Megaraid SAS controller card. This is a somewhat high-end card meant for servers so you might want to go for 'consumer' class controllers, like StarTech.com 2 Port PCI Express SATA 6 Gbps eSATA Controller Card - Dual Port PCIe SATA III Card - 2 Internal/2 External Card PEXESAT322I.

If you need more than 8, or perhaps you just don't have enough bays internally in your tower, you can opt for external enclosures. There are multi-bay external enclosures that run over USB3 or eSATA. I hunted for a while before settling for this bundle - TowerRAID TR4M+B - 4 Bay eSATA RAID 0/1/10/5/JBOD Performance Tower w/ 6G PCIe Card (Black).

One thing to note on the difference between an USB3 enclosure and an eSATA one. You cannot hot swap individual disks in an USB3 enclosure. This means if your enclosure has 4 disks, and one of them is dead, you have to bring all 4 disks offline before you can pull the dead disk. eSATA does not have this issue. However, in order to use all 4 bays in an eSATA enclosure, the eSATA controller card must have the 'Port Multiplier' feature. If you buy the bundle listed above, it will work nicely.

If you choose to still go with USB3 (it's definitely a lot easier to setup), you should seriously consider Mediasonic HF2-SU3S2 ProBox 4 Bay Hard Drive Enclosure with USB 3.0 & eSATA. For Singapore readers, just go SLS and buy it. It's known as Hotway Probox here.

Alright, that's all for now regarding hardware. Do also note that I don't build for performance (despite having a server class SAS controller) so you need to understand what you're buying if you choose to follow my hardware setup.

Do feel free to ask questions if you have any. I'll try to answer them, and stay tuned for the next installment where I'll talk briefly about the different drive types and what you need to look out for. And if you find my articles helpful, you can help to support the site by buying through the links above. Thank you!