Showing posts with label Storage. Show all posts
Showing posts with label Storage. Show all posts

Sunday, May 4, 2014

On the Mac : Macbook Air and Macbook Pro SSD Upgrade Kit

Good news fellow Mac users. A couple of days ago, Transcend announced a series of SSD upgrade kits for some of the Macbook models. Specifically -

  • Late 2010 and mid-2011 Air - JetDrive 500
  • Mid-2012 Air - JetDrive 520
  • 2012 and early 2013 rMBP - JetDrive 720
The JetDrive 500 comes in 240/480GB while the 520 and 720 comes in 240/480/960GB versions. For more details on the specifications and compatibility, you can refer to the Transcend JetDrive Product page. In short, all the non-PCI-e SSD based Macs will find one model which suits it. Transcend said you'll have to wait a while for the PCI-e version for the mid-2013 Air and rMBPs.

The kit comes with all the tools that you need to open up your Mac, be it the Air or rMBP. It also includes a nice little housing where you can pop in your original SSD and turn it into an external drive with a USB3 connector. Follow the video posted on the Transcend page for the installation instructions.

When you're done, do remember to set your spanking new drive as the boot disk and also install the Transcend toolbox software that comes with the kit. This toolbox software will enable TRIM on your new SSD. For those who are wondering why we have to do this - because Apple does not like 3rd party SSDs and will not enable TRIM on them. SSD without TRIM is not the wisest of choice to make.

Initial reviews from some early adopters are very positive, including ease of installation and better performance than the stock Apple SSDs.

Transcend made all these models available on Amazon -
At this point, all the base models list at $189.99 and some models has a ship time of between 2-4 weeks. All qualifies for free international shipping to Singapore. Take note that only the 240GB versions are GST exempted while the 480/960GB version attracts import tax.
This is definitely going to give my 128GB mid-2011 Air some new lease of life.

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!

Monday, December 23, 2013

On the Mac : Windows, VMs and Flash Drives

If you do not prefer the Bootcamp approach describe in my other article, obviously you can just run Fusion or Parallels and have a virtual Windows environment running alongside your Mac. But again, due to the precious disk space on some Airs, carving out this 20GB to run a VM might not be something you can afford. In reality, this article also applies to Windows laptop with a similarly sized SSD on board. If you have such a machine and just need another Windows VM for testing, continue reading.

Now, there are obvious workarounds to this problem. You can, for example, run it on an SD card or run it on a thumb drive or external portable disks. If you can use an external portable disk, it'll be the most economical way. Read my other article about them. There's one problem with running it off an external disk. It's not exactly very portable since you have to move around with the drive attached to your Air (or laptop). It works, but there's this caveat. If you're going to be sitting on your desk while running the VM, then I think this approach works well. It's not going to be very high performing, but it's reasonable. I do have a few test VMs running off 'Desktop' class external disks.

I've hunted for some time since getting the Air, for a thumb drive/SD card that is reasonably fast so that I can just stick it to the USB port (or SD slot) and carry it around with me. SD card never works, period. They are just too slow. I must admit that I haven't really tried many of them, but I don't really want to waste any more money. The seriously fast ones (as claimed by Sandisk) cost multiple dollars per GB. Unless Sandisk wants to send me one to play with, I'm not going to outright buy them and pray that it works. For the record, I tried a Sony Class 10 and an HP Class 10. Both are 32GB, and both never complete the Windows installation after 1 hour, as far as I can remember.

So I'm left with thumb drives. I had a SanDisk Ultra 64 GB USB Flash Drive SDCZ45-064G-U46 at that time and I decided to try it. It's ok, but still slow. I didn't wait for the Windows installation to complete. I ended up putting Diablo III client on that thumb drive. Yes, that works reasonably but you can get killed due to disk read latency. I know I did a few times. At this point, I realized what I need is something which performs well for small I/O read/write. And it just happens that SanDisk announced their latest thumb drive, the SanDisk Extreme 64 GB USB 3.0 Flash Drive up to 190 MB/s SDCZ80-064G-X46. This is an interesting drive. It sports an USB3 connection and some insane claimed transfer speed. And the best part? It costs about SGD1.4/GB locally here.

I began trawling the web for benchmarks. I found exactly 1 (I can't remember the site, sorry, but it compares this drive with a ton of others). Remember this is more than a year back (probably towards the end of 2012) and USB3 drives with real performance isn't that common place. Most USB3 drives at that time are just their standard USB2 parts retrofitted with an USB3 port. I knew this drive is going to be the one when I saw the benchmarks. The CDM 4K readings are unheard of. They read close to 10MB/s write with the default 4K test. You just have to trust my word as I don't have the URL anymore. Just for comparison sake, almost all flash drive at that time managed barely 1MB/s read/write on the default 4K CDM test.

I took the leap of faith and buy the 64GB version. I popped it into the Air's USB2 ports, format it to HFS+ and straight away put a Fusion VM on it running Windows 7. The speed is incredible, even on an USB2 port. It feels faster than those VMs running off normal external disks. I've been running my primary Windows VM on this drive since. After a year of hard hammering, it's getting slower and slower. I've yet to research this. You can start to feel the momentarily freeze at times, Outlook is not as responsive opening a cached Inbox etc. I'm not exactly sure why this is happening at this point. However, that said, it's still plenty fast mind you.

Even though I'm extremely happy with the purchase, there's a few things I ought to mention.

  • This drive is expensive! Price is relative when I said it cost SGD1.4/GB. The other 'normal' flash drives cost like SGD0.80/GB. Price is lower now compared to a year ago.
  • If you need to just copy huge files back and forth, you might want to look elsewhere. This guy doesn't score number 1 in sequential transfer. Nor is it the most cost effective for bulk storage.
  • This drive shines only if you have a workload which requires small random read/write IO. Running VMs off it is one example.
If you skip all the post and come straight here, I'll say just buy this guy to run VMs off it. You won't go wrong. 

Friday, December 20, 2013

On the Mac : Bootcamp, Thunderbolt and SSDs

I'm going to side track and talk a little bit about my experience trying to bootcamp my MacBook Air (mid-2011). Now, I'm sure everybody with a MBA that sports either 64GB or 128GB of internal storage will be able to attest that we are always doing some house keeping to prevent our apps from overwhelming the puny storage. I am no different, especially when I also need a Windows environment to get some of my work done.

In short, I'm ill equipped to run a VM using the internal disk. Fusion wants 20GB (which I think is reasonable for a Windows 7 Setup) and that will leave me with even less storage to deal with. The options I have is either run the VM off a USB stick (which I eventually did and will be a story for another day), or run the VM off the Thunderbolt port, which I did as well, but it's a little clumsy and not exactly very portable.

But what if I want to 'boot camp' and play some Windows-only games? The storage consideration alone will be daunting as there's really no way both partitions can fit into the internal 128GB SSD. Not for me at least. And so I have a thought, to simply put the Windows partition on its own disk and run it off the Thunderbolt port!

First, let's talk a little about the hardware I actually use. I opted for an SSD instead of a traditional spinning disk for obvious reason. In my case, I picked Intel 530 Series 240GB 2.5-Inch Internal Solid State Drive (Reseller Kit) SSDSC2BW240A4K5.

Now, I need some kind of a disk enclosure or an adaptor which can convert the Thunderbolt port to a SATA port. Seagate has exactly this contraption, Seagate Backup Plus Portable Thunderbolt Adapter (STAE128). This adaptor is actually designed for the Seagate Backup Plus Portable series of external disk drives. This family of external drives (sans the newer 2TB versions) come with a detachable USB3 dongle, which you can remove and expose the naked SATA connector on the disk itself. You then plug this into the adaptor and it will then becomes a Thunderbolt portable external disk. Neat! And since the connector on the adaptor is a standard SATA connector, you can plug any standard SATA 2.5" disks to it and turn it into a Thunderbolt portable external disk.

There is one caveat. The adaptor itself does not provide 12V power and as a result, it is unable to power certain drives, notably the Seagate Constellation.2 1 TB 7200RPM SATA 6Gb/s 64MB Cache 2.5-Inch Internal Bare Drive ST91000640NS. This guy requires both 5V and 12V rails to be available and will not work with the adaptor.

So now I have these, how do I put Windows on it? We're going to make use of a lesser known technique in the consumer world to install Windows : Windows Automated Installation Kit. Windows AIK tool is a free download from Microsoft, you can get it here. In reality, you only need 'imagex.exe' from the whole bundle so you probably can find just the binary alone by searching the web. In addition to Windows AIK, you'll also need Apple's Bootcamp drivers. It's easy to get the drivers, all you need to do is just run Bootcamp Assistant and it will download the correct drivers for your Mac. Put these drivers onto a thumb drive or something. Lastly, you'll obviously need the Windows installer itself. It can be a physical disc or an ISO image.

Next, you'll need a Windows environment to prepare the drive. It can be a physical desktop/laptop or a simple Windows VM. I'm going to assume you have access to all the components on the same desktop/laptop/VM -
  • Target disk drive you're putting Windows on
  • imagex.exe
  • Windows installer disc or ISO
Step #1. Wipe the drive and create a primary 350MB partition. Format it with FAT32 and make it Active. Assign a drive letter to it, let's call it 'B' (for Boot).

Step #2. Create a second partition consisting of the rest of the drive. Format it with NTFS. Assign a drive letter to it, let's call it 'W' (for Windows).

Step #3. Determine the INDEX number of the desired Windows edition you want on the Installer disc/ISO. You need to do this because your disc/ISO may contain multiple versions of Windows, like 'Professional' or 'Enterprise' etc. To do this, you need 'imagex.exe'. Assuming your disc/ISO is mounted on drive I:, the command to do this is
<PATH to IMAGEX.EXE>\imagex.exe /info I:\wim\install.wim
It will list out all the available editions you have on your current disc/ISO. The output is quite lengthy but otherwise very self-explanatory. Let's assume the edition you want is located at INDEX 0.

Step #4. Deploy Windows. The command to do this is

<PATH to IMAGEX.EXE>\imagex.exe /apply I:\wim\install.wim 0 W:


This will take some time so you have to wait patiently for it to complete.

Step #5. Install the boot sector.

W:\windows\system32\bcdboot W:\windows /f ALL /s B:
Once you reached here, you're done with the disk. Shutdown your Mac. Stick the disk onto the Seagate adaptor and plug the adaptor into the Thunderbolt port of your Mac. Remove ALL USB devices from your Mac now. USB connected drives will prevent your Mac from booting up from the Thunderbolt disk correctly. Check that you have nothing on your USB ports and also no SD cards in the SD slot (if you have one).

Boot your Mac and hold onto the 'Option' key. You know this will lead you to the Boot Drives selection screen. You should see a disk named 'Windows' along with your usual Mac boot disk and also the Recovery partition. Use your arrow keys to select 'Windows' and hit 'Return'. If you have done everything correctly as listed, your Windows partition will boot and installation starts. Just follow the on-screen instructions. It should be no different from a normal installation procedure.

At this point, Windows might reboot a few times during the course of installation. You have to remember to do the hold 'Option' key dance and select 'Windows' on the selection screen. After the installation completes, login and run 'setup.exe' from the Bootcamp Drivers thumb drive as Administrator. Follow instructions to complete the installation.

You should now have a fully bootable and working copy of Windows on the disk. Note that this procedure also works on a USB adaptor as well.

Something to take note -
  • If your installer is 64-bit, then you need 64-bit versions of everything, including BCDBOOT, Bootcamp drivers etc.
  • Make sure you don't have any USB devices attached when booting. Otherwise, it will not boot correctly.
Since this procedure works also for external USB disk, you can also use any of these types of disk. The BUFFALO MiniStation 1 TB Thunderbolt / USB 3.0 Portable Hard Drive with Thunderbolt Cable - HD-PA1.0TU3works pretty well. It comes with both USB3 and Thunderbolt connector. However, it is a spinning disk inside. If you must have an SSD, then using the Seagate Backup Plus Portable Thunderbolt Adapter (STAE128)might still be the best bet.