2TB Disk Installation Blog
I've just replaced the hard disk in my Humax HDR Fox-T2 with a 2TB drive as my original factory-fitted 1TB drive has recently suffered from a bad sector which somehow corrupted all large reads and writes to the disk. I was able to force the drive to overwrite the sector which resolved the immediate problem (old recordings now play-back successfully but those recordings made during the problem have artifacts). However, I've lost confidence in the disk and it's making a lot more clicking noises in operation than it did previously; that said, it's never been particularly quiet. Besides, who would pass up the chance to double the capacity?
There are a couple of good write-ups on how to replace the drive (e.g. http://myhumax.org/blog/?p=22), but these rely on an interim step of plugging the drive into a desktop computer (usually Linux) in order to partition and format the drive. I wanted a process which could be done entirely on the Humax itself in conjunction with the customised firmware.
Which drive?
Since I was replacing the drive anyway, I wanted to go for the largest amount of storage that was practical, especially as there is typically only a relatively small incremental cost each time you double the capacity.
However, the Linux kernel that is used on the Humax HDR Fox-T2 does not support disks with a GUID Partition Table (GPT) which is required if you want any partitions to be larger than 2TB. (See http://en.wikipedia.org/wiki/GUID_Partition_Table for more details) That gives a practical upper bound to the drive size since almost all of it is allocated to the media partition. It would likely be possible to use a custom kernel on the Humax and add support for GPTs but that could cause other issues and any reversion to standard Humax firmware would be problematic.
Also, the Humax firmware can neither partition nor format an internal drive which is over 1TB in size, but there are several reports of people who have successfully installed a 2TB drive having manually partitioned and formatted it. In fact there are 14 HDR devices registered with the hummypkg remote scheduling portal which have a 2TB drive.
Whichever drive is chosen, it should be one specifically designed for use in a PVR. These drives are known as CE or AV drives and are optimised for AV content. They generally run cooler and quieter than desktop drives as well as consuming less power. They also behave differently as regards error detection, correction and reporting. A single read/write error when recording AV content usually matters a lot less than a pause while the drive or application stops, waits for the disk platter to revolve again then retries the read.
I selected the Seagate Pipeline HD 2TB Drive (ST2000VM002/3) for a number of reasons:
- The existing factory-fitted disk is a Seagate Pipeline;
- It spins at 5900rpm which is a compromise speed offering slightly more performance (most CE/AV drives are 5400rpm);
- It is qualified for operating temperatures up to 75C;
- Like all 2TB drives, it is an Advanced Format (4K sector size) drive. However, unlike other 2TB drives, it uses a technology called SmartAlign to handle partition misalignment conditions in the drive firmware without impacting on performance. Most other drive manufacturers have realignment tools which should be run following partitioning of these drives. I intended to create aligned partitions anyway but this was extra insurance in case it proved impossible.
- The WD drives (the realistic alternative) will apparently attempt to park the read heads once every 8 seconds for the life of the HDD which is just horrible!
On the down side, I couldn't find any reports of anyone using one of these drives in their Humax. The drive that has most often been used by others is the Western Digital AV-GP (WD20EURS). I considered that drive too, not least because it is 10% cheaper than the Seagate, but I read some reports of it being noisy on spin-up and spin-down (although quiet in operation). On balance, I stuck with the Seagate but I'm sure the WD would be fine too.
Custom Firmware
I installed version 2.12 of the customised firmware prior to proceeding. This version includes several disk management utilities within the firmware itself which allowed me to partition and format the new disk.
Installation
The new drive has identical dimensions to the old one (1.03" high) so I didn't expect any problems with the physical installation.
Opening the case voids the warranty but I only had a few months remaining anyway and had already opened the case some months earlier to remove the orange filter from the vacuum flourescent display (see Fixes / Work Arounds for Known Bugs#Display Too Dim) Still, I like things to be neat so I used a hairdryer to melt the glue on the warranty seal rather than breaking it.
On booting up the Humax, it displayed a message on the screen saying
that I needed to format the storage in order to use recording functions.
Fair enough, but I knew that the Humax firmware wouldn't do it.
Partitioning
So, I needed to partition the hard disk. As this is an advanced format drive, it uses 4K sector sizes and there is performance degredation if the partitions aren't aligned to 4K. While Seagate say that the impact is minimal due to their SmartAlign feature, they still recommend aligning your partitions properly from the outset. As a result, I defined all of my partitions in terms of sectors rather than cylinders and ensured that the start sector of each partition was divisible by 8.
The default Humax partitioning is:
1 1GB /media/ 2 <rest> /media/My Video 3 10GB /media/
I first needed to determine the number of sectors required for partition 3. Rather than calculate it I just created a single partition on the disk of size 10GB and read off the number of sectors:
humax# gfdisk /dev/sda Using /dev/sda Command (m for help): n Partition type e extended p primary partition (1-4) p First cylinder (default 0cyl): Last cylinder or +size or +sizeMB or +sizeKB (default 243200cyl): +10g Command (m for help): w
humax# gfdisk -lu /dev/sda
Disk /dev/sda: 2000 GB, 2000396321280 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907024065 sectors Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System /dev/sda1 63 19535039 9767488 83 Linux
Ignoring that this partition is not aligned, it uses 19535039 - 63 = 19534976 sectors.
My final partition table looks like this:
humax# gfdisk -lu /dev/sda
Disk /dev/sda: 2000 GB, 2000396321280 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907024065 sectors Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System /dev/sda1 64 2000063 1004031 83 Linux /dev/sda2 2000064 3887489079 1942748482 83 Linux /dev/sda3 3887489080 3907024064 9759487 83 Linux