Home > Hardware, Using Linux > Advanced Format Hard Drives

Advanced Format Hard Drives

So as you all know I bought the 1.5TB WD drive from Scan and blogged about how to format it for your HDR T2… Well, after serveral months of working just fine in the PVR, it broke! :(

Thankfully, it was not the Humax that broke it, as I had to remove it and attach it to my Linux box, Windows PC, Apple Mac to verify that it was the drive that was the problem, and sure all reported it faulty (Linux refusing to even boot the system with it attached!)

I was gutted that all recordings had been lost, but the nightmare did not end there. Scan.co.uk, where I bought it from took an age to replace the drive. I also found out they sold me an OEM drive (I was not aware) as I went on the WD support site to return and found there was no warranty on it! When I first went through Scan’s return system, they wanted me to pay the postage to return the faulty drive to them, and finally when I was ready for a replacement, they could not replace it with the same drive but offered me the WD15EARS instead.

I don’t think I will buy from Scan.co.uk again, and I recommend that you shouldn’t either. This is not the first time I’ve had poor service from them but it will certainly be the last. Buy from a reputable online retailer who knows how to deal with customer returns and service.

Well, my misfortune is your advantage, as the WD15EARS is an Advanced Format Drive – you know the new HDD type with the 4K sectors… Read more here on Wikipedia.

What is the issue with AF Drives?
Initially when AF drives were released users discovered that there were performance issues with them on certain OS platforms – mainly Windows. You can read such articles about this from lots of places, here is one. They go on to explain about 4K sectors and how to align them for Windows use.

The question, when users here buy AF drives, is whether they will perform OK in a Humax PVR… Well, now I have a chance to answer!

Opening the WD15EARS and looking at the label it says:

Advanced Format Drive. To achieve full performance:

  • Windows XP, multi partition and cloning software users – use WD Align software available on www.wdc.com/advformat
  • Windows XP, single partition – set jumpers 7-8 prior to installation or use WD Align SW
  • All other OS configurations – drive is ready for use as is

So according to the label, using this HDD with the Humax PVR (we know it uses EXT3 filesystem) is to use it as is. We don’t need to do anything special to the drive like align the 4K sectors!

I did however, go onto the WD website to read what they say about using AF drives with Linux (EXT3), on this page. It says:

The Linux kernel has had specific support for the alternate sector sizes and offsets used by WD Advanced Format disk drives since version 2.6.31. However, distributions based on Linux 2.6.34, the latest stable version of Linux, will provide the most thorough support. Advanced Format parameters are available in the sysfs file system from this kernel version onwards. Kernel versions older than 2.6.31 will not specifically detect Advanced Format Drives, but with proper alignment the system performance will be maintained.

So it look like Linux is safe with AF drives if the kernel is v2.6.31 or later. Who knows what version Humax use for the HDR? So to be safe, I followed WD’s instructions to align the 4K sectors.

The Linux partition editor: parted, has an alignment option to ensure that Advanced Format drives are correctly configured from version 2.1:

-a alignment-type, –align alignment-type

valid alignment types are:

none Aligns to 512 byte sector boundaries.

cylinder Align partitions to cylinders.

minimal Use minimum alignment: 4KB on AF drives

optimal Use optimum alignment: 1MB boundaries

The default from parted 2.2 is to align to 1MB boundaries – optimal. Use minimal or optimal for Advanced Format drives. For example if your drive is sda:

parted -a optimal /dev/sda

will ensure that parted creates partitions on 1 MB boundaries.

So what I did was to partition the disk using the GParted Live CD as per blog instructions, cancelling the formatting of the large ‘recordings’ partition, and then used the command line parted on the GParted Live CD to format the partition ‘optimally’.

So with my WD15EARS, I created the 3 partitions needed the for the HDR, ‘onegb’, ‘restofdisk’ and ‘tengb’ using the graphics gparted (breaking out of formatting the restofdisk partition, and then opened a root terminal, and executed the parted command:

# parted -a optimal /dev/sdc
GNU Parted 2.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)

Where /dev/sdc should point to the HDD device you are working with.

Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mkfs
WARNING: you are attempting to use parted to operate on (mkfs) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
Yes/No? y
Partition number? 1
File system type? [ext2]?
writing per-group metadata... 92% (time left 00:00)
(parted)

Repeat this for all 3 partitions. Note parted can only deal with EXT2, and the HDR need the partitions to be in EXT3. EXT2 is easily converted to EXT3 using the tune2fs command. So after the optimised format with parted, you need to run this command on all your 3 partitions:

# tune2fs -j /dev/sdc1 (onegb)
# tune2fs -j /dev/sdc2 (restofdisk)
# tune2fs -j /dev/sdc3 (tengb)

Well, I will insert this into my HDR FOX-T2 and see how it behaves…

  1. avatar
    xyz321
    July 30th, 2011 at 09:46 | #1

    The version of kernel used in the HDR is based on 2.6.18 so I think the recomendation should be to follow the alignment procedure.

  2. avatar
    son_t
    August 16th, 2011 at 18:50 | #2

    Thanks for the info xyz321. Also just to let you all know, the HDD is now 2/3rd full and is performing as it should with no problems!

  3. avatar
    baz
    August 30th, 2011 at 19:15 | #3

    Is this the brand that has problems with the LLC count, basically a counter that increments every time it goes into “Green” mode (power saving mode). This happens every X seconds, which in a PC is fine, but proved not to be good for NAS devices due to near constant access, the same may apply to PVRs. More info (NAS related) here:

    http://forum.synology.com/wiki/index.php/User_Reported_Compatible_Hard_Drives,_Extended_List#Western_Digital_Green_Power_hard_disks

    And WD info here:
    http://wdc.custhelp.com/app/answers/detail/a_id/5357

  4. avatar
    son_t
    August 31st, 2011 at 14:49 | #4

    Thanks for the headsup baz.

    My initial thoughts is that the Idle3 facility wouldn’t be invoked at all when placed in a Humax PVR as the box is constantly buffering the live channel or playing a recording keeping the HDD busy.

    But I will have a look-see by taking the HDD out and examining this LLC counter, and if necessary disable the Idle3 facility on these WD Green HDD.

    Will let you know my discovery.

  5. avatar
    son_t
    September 1st, 2011 at 10:28 | #5

    As I suspected, my WD HDD is just fine used in the Humax PVR. Taking value from this post: http://www.jzab.de/content/ultimate-boot-cd-wdidle3-util-included

    His WD15EARS has been on 283 hours with an LLC of 11040, whereas my WD15EARS has been on 295 hours but only has an LLC of 1163. This means that my HDD in my HDR T2 has initiated idle3 on average of every 14 mins (as opposed to his which is every 1.4 mins, ten times more often.)

    So these WD green drives are just fine to use in a Humax PVR. But not in a NAS device, and needs the idle3 facility turned off. I suspect that when used within a NAS, and nothing is being read, the device will try to keep the HDD busy, but the HDD will use idle3 to powersave. This conflict will park and unpark the heads increasing the LLC and reducing the HDD’s lifespan. The tip is best not to use green HDD, and let the NAS device perform the power-management, or turn of the idle3 facility on these drives.

  6. avatar
    baz
    September 1st, 2011 at 11:08 | #6

    Yep, on the NAS this happens:
    Loop:
    WD drive exceeds idle timeout (a few seconds) so goes into Power Save.
    NAS writes to log (after a few more seconds), waking up WD drive.
    End Loop.

    This constant bouncing between the modes can’t be good – although WD
    don’t think it’s a problem!! It’s all about the timing of NAS and WD drive
    really – probably just unfortunate in this case.

    On a PC, I’d assume that once you’ve stopped accessing the WD drive,
    it won’t access until you really need to, so Power Save is useful and doing
    what is designed to.

    Thanks for investigating… and good to see all is ok with this drive! :)

  1. No trackbacks yet.