1. OCAU Merchandise is available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion in this thread.
    Dismiss Notice

WD Green Power EARS 4Kb drives and linux

Discussion in 'Storage & Backup' started by choppa, Mar 28, 2010.

  1. choppa

    choppa Member

    Joined:
    Jan 1, 2002
    Messages:
    2,542
    Location:
    Melbourne, Victoria
    In one of the builds I'm doing I have opted to use new WD EARS drives which have 4KB Physical Sectors that are reported as 512B Logical Sectors. Many of you would have already read about this in popular articles. I am here to give a warning and some information when using these drives in a Linux environment

    If you are using a single drive as a primary or storage on its own, you should keep a lookout as to whether it is utilising its Intellipark feature excessively. This feature, its pitfalls, and the solution are explained in a post here. The gist of it is that the hard drive spins down to conserve power every 8 seconds and parks the heads. Linux is written to write its cache every ~20 seconds. This causes a lot of excess actuations / parkings.

    As the drive is rated for 1,000,000 parkings, it may reach this rather quickly. My drives do 16 parks per minute, so 43 days of continous usage / uptime on my machine would ensure that the drive reaches maximum manufacturers specifications. If possible, you will have to set the park time to a lot longer - see the article linked above.

    To check how many parks your drive has done, in a terminal window in linux use the command "sudo smartctrl -a /dev/sda | grep -i load" (you may need to install smartctrl - run sudo apt-get install smartctrl first if this is the case). Note also to put /dev/sdX where X is the device character relevant to your drive.

    You should then check the hours it's been on - "sudo smartctl -a /dev/sda | grep -i Hours". This will give you the power on hours.

    Take the number of load cycles, divide by the number of hours, and you get how many parks it does per hour.



    Secondly, if you're trying to create a Software RAID-5 array, make sure you align each partition to begin on the 64th sector / 4kb boundary. I've had my RAID performance jump 3x in speed just by getting the alignment right. Check your alignment with: "sudo fdisk -l -u" - if any of the drives listed that you're planning to use with RAID5 have a start listed at 63, you need to change it.

    example.
    Run fdisk - "sudo fdisk -u /dev/sda"
    Delete existing partitions - "d"
    Create new partitions - "n"
    Tell it primary partition - "p"
    Tell it partition 1 = "1"
    Tell it to align at sector 64 - "64"
    Change the partition type (if you want the drive as part of your mdadm raid array) - "t"
    Select Linux raid autodetect fs - "fd"
    Write & Quit - "w"

    Repeat with all your other raid disks / partitions

    Then run "mdadm --create /dev/md0 --chunk=xyz --level=5 --raid-devices=n /dev/sda1 /dev/sdb1 /dev/sdc1..." where xyz is your chunk size (lots of big files/movies = minimum 64 (kB) but I go for 1024 (kB), and for raid 5 the minimum devices (n) = 3 (add more if there's more drives in your array).

    Then it should start initialising the array at a much faster pace than if you tried to do it through Palimpsest Disk Utility (default on Ubuntu 9.10).


    ZFS-Fuse has terrible performance because I am still yet to figure out how to align it properly.



    When I have time I'll reformat the above post to make it more user friendly. Hopefully it helps someone save some time.
     
  2. terrastrife

    terrastrife Member

    Joined:
    Jun 2, 2006
    Messages:
    18,819
    Location:
    ADL/SA The Monopoly State
    ive been preaching about intellipark for ages :)
     
  3. issa2006

    issa2006 Member

    Joined:
    Feb 4, 2006
    Messages:
    3,339
    Location:
    AUSTRALIA (ADL)
    i agree

    ...
     
  4. OP
    OP
    choppa

    choppa Member

    Joined:
    Jan 1, 2002
    Messages:
    2,542
    Location:
    Melbourne, Victoria
    Oh and during recovery / rebuilding the array, the speed keeps getting slower. It drops to half of it's speed by the time it completes.
     
  5. saba

    saba Evil Vizier

    Joined:
    Aug 4, 2001
    Messages:
    2,697
    Location:
    Melbourne
    Instead of telling ZFS to use the entire device, you can force alignment by creating an aligned partition on the device, then using that.

    That is, create, say, /dev/sd{a,b,c}1 which is properly aligned, then create the raidz ZFS over /dev/sd{a,b,c}1 instead of just the device.
     
  6. terrastrife

    terrastrife Member

    Joined:
    Jun 2, 2006
    Messages:
    18,819
    Location:
    ADL/SA The Monopoly State
    huh? this is normal, a hdd is faster at the start of the disk.
     
  7. Mad Mike

    Mad Mike Member

    Joined:
    Jun 30, 2001
    Messages:
    780
    Location:
    Melbourne
    Will this problem show up on a OpenSolaris raidz system?
     
  8. saba

    saba Evil Vizier

    Joined:
    Aug 4, 2001
    Messages:
    2,697
    Location:
    Melbourne
    Yes. 10char
     
  9. Mad Mike

    Mad Mike Member

    Joined:
    Jun 30, 2001
    Messages:
    780
    Location:
    Melbourne
    Thats good to know.
     
  10. infirmus

    infirmus Member

    Joined:
    Nov 1, 2005
    Messages:
    633
    Location:
    Newcastle
    Shite, I have 5 of these drives in a Linux machine.

    E.g. Windows machine - which seems to be dieing - getting corruptions all the time and fdisk is picking up bad sectors. Look at the Read Error Rate
    Code:
    smartctl 5.39.1 2010-01-28 r3054 [i686-pc-mingw32-win7(64)] (sf-win32-5.39.1-1)
    Copyright (C) 2002-10 by Bruce Allen, [url]http://smartmontools.sourceforge.net[/url]
    
    === START OF INFORMATION SECTION ===
    Device Model:     WDC WD10EARS-00Y5B1
    Serial Number:    WD-WCAV55450019
    Firmware Version: 80.00A80
    User Capacity:    1,000,204,886,016 bytes
    Device is:        Not in smartctl database [for details use: -P showall]
    ATA Version is:   8
    ATA Standard is:  Exact ATA specification draft version not indicated
    Local Time is:    Wed Mar 31 12:50:17 2010 AUSEDT
    SMART support is: Available - device has SMART capability.
                      Enabled status cached by OS, trying SMART RETURN STATUS cmd.
    SMART support is: Enabled
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    General SMART Values:
    Offline data collection status:  (0x84)	Offline data collection activity
    					was suspended by an interrupting command from host.
    					Auto Offline Data Collection: Enabled.
    Self-test execution status:      (   0)	The previous self-test routine completed
    					without error or no self-test has ever 
    					been run.
    Total time to complete Offline 
    data collection: 		 (21660) seconds.
    Offline data collection
    capabilities: 			 (0x7b) SMART execute Offline immediate.
    					Auto Offline data collection on/off support.
    					Suspend Offline collection upon new
    					command.
    					Offline surface scan supported.
    					Self-test supported.
    					Conveyance Self-test supported.
    					Selective Self-test supported.
    SMART capabilities:            (0x0003)	Saves SMART data before entering
    					power-saving mode.
    					Supports SMART auto save timer.
    Error logging capability:        (0x01)	Error logging supported.
    					General Purpose Logging supported.
    Short self-test routine 
    recommended polling time: 	 (   2) minutes.
    Extended self-test routine
    recommended polling time: 	 ( 249) minutes.
    Conveyance self-test routine
    recommended polling time: 	 (   5) minutes.
    SCT capabilities: 	       (0x3031)	SCT Status supported.
    					SCT Feature Control supported.
    					SCT Data Table supported.
    
    SMART Attributes Data Structure revision number: 16
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x002f   188   187   051    Pre-fail  Always       -       4538
      3 Spin_Up_Time            0x0027   137   136   021    Pre-fail  Always       -       6150
      4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       53
      5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
      9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       401
     10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
     11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       49
    192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       8
    193 Load_Cycle_Count        0x0032   197   197   000    Old_age   Always       -       10787
    194 Temperature_Celsius     0x0022   108   103   000    Old_age   Always       -       39
    196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
    197 Current_Pending_Sector  0x0032   199   199   000    Old_age   Always       -       252
    198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
    200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0
    
    SMART Error Log Version: 1
    No Errors Logged
    
    SMART Self-test log structure revision number 1
    No self-tests have been logged.  [To run self-tests, use: smartctl -t]
    
    
    SMART Selective self-test log data structure revision number 1
     SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
        1        0        0  Not_testing
        2        0        0  Not_testing
        3        0        0  Not_testing
        4        0        0  Not_testing
        5        0        0  Not_testing
    Selective self-test flags (0x0):
      After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.
    
    Linux:
    Code:
    smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
    Home page is [url]http://smartmontools.sourceforge.net/[/url]
    
    === START OF INFORMATION SECTION ===
    Device Model:     WDC WD10EARS-00Y5B1
    Serial Number:    WD-WCAV55440561
    Firmware Version: 80.00A80
    User Capacity:    1,000,204,886,016 bytes
    Device is:        Not in smartctl database [for details use: -P showall]
    ATA Version is:   8
    ATA Standard is:  Exact ATA specification draft version not indicated
    Local Time is:    Wed Mar 31 12:52:35 2010 EST
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    General SMART Values:
    Offline data collection status:  (0x84) Offline data collection activity
                                            was suspended by an interrupting command from host.
                                            Auto Offline Data Collection: Enabled.
    Self-test execution status:      (   0) The previous self-test routine completed
                                            without error or no self-test has ever
                                            been run.
    Total time to complete Offline
    data collection:                 (19380) seconds.
    Offline data collection
    capabilities:                    (0x7b) SMART execute Offline immediate.
                                            Auto Offline data collection on/off support.
                                            Suspend Offline collection upon new
                                            command.
                                            Offline surface scan supported.
                                            Self-test supported.
                                            Conveyance Self-test supported.
                                            Selective Self-test supported.
    SMART capabilities:            (0x0003) Saves SMART data before entering
                                            power-saving mode.
                                            Supports SMART auto save timer.
    Error logging capability:        (0x01) Error logging supported.
                                            General Purpose Logging supported.
    Short self-test routine
    recommended polling time:        (   2) minutes.
    Extended self-test routine
    recommended polling time:        ( 223) minutes.
    Conveyance self-test routine
    recommended polling time:        (   5) minutes.
    SCT capabilities:              (0x3031) SCT Status supported.
                                            SCT Feature Control supported.
                                            SCT Data Table supported.
    
    SMART Attributes Data Structure revision number: 16
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
      3 Spin_Up_Time            0x0027   123   123   021    Pre-fail  Always       -       6808
      4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       14
      5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
      9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       1132
     10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
     11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       13
    192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       7
    193 Load_Cycle_Count        0x0032   150   150   000    Old_age   Always       -       152775
    194 Temperature_Celsius     0x0022   113   106   000    Old_age   Always       -       34
    196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
    197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       1
    198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
    200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       6
    
    SMART Error Log Version: 1
    No Errors Logged
    
    SMART Self-test log structure revision number 1
    No self-tests have been logged.  [To run self-tests, use: smartctl -t]
    
    
    SMART Selective self-test log data structure revision number 1
     SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
        1        0        0  Not_testing
        2        0        0  Not_testing
        3        0        0  Not_testing
        4        0        0  Not_testing
        5        0        0  Not_testing
    Selective self-test flags (0x0):
      After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.
    So that is 26 load cycle count / hour on Windows and 135 load cycle count / hour on Linux. Not good.

    [edit]
    Interestingly I just looked at the other 4 drives which are in a mdadm array and they only have a load cycle count of ~1000 with the same hours as the system drive.

    Also why does no info show up in the WD SMART utility? It doesnt show anything!

    Click to view full size!


    [edit2]
    Ah ok the value is a normalised value, so the raw value is not displayed. So basically I have to read the shit out of the drive until the normalised value drops to 51 then I can send it back to WD?
     
    Last edited: Mar 31, 2010
  11. rowan194

    rowan194 Member

    Joined:
    Jan 5, 2009
    Messages:
    2,044
    When I had a drive with a single uncorrectable sector WD said I could return it. Open a ticket on wdc.com and ask. Paste the SMART variables from smartctl, it shouldn't matter that it's not a WD prog as smartctl is well known and the variables are standardised.

    There's a definite problem with your first drive (252 sectors pending remapping) and a possible problem with your second (1 sector pending)
     
  12. MetalPhreak

    MetalPhreak Member

    Joined:
    Apr 8, 2007
    Messages:
    1,759
    Location:
    Perth
    I've just installed 2x WD15EARS drives into my fileserver.

    Running both disks in Raid0, it makes NO difference running a simple dd read/write test with bs=4k regardless of whether I use the whole device (which is what i normally do with mdadm raid) or partitions with sector start 1,63, or 64.

    Next I tried a Raid5 with the third disk set as missing. Again with whole devices and using partitions @ sector 64. Read speeds were 35mb/s on both (due to missing disk as expected, has to calculate data from parity). Interestingly, write speed with sector64 partitions was only 35mb/s. Using whole devices: 110mb/s... iostat shows drive utilization in both cases as being around 80%. sector64 = ~20mb/s per drive 80% util, whole device raid = ~55mb/s, 80% util


    I also was forced to use 1x WD10EARS drive in a raid5 array with 7x WD10EADS drives. Doesn't effect it at all. Again, I used entire devices rather than raiding partitions. Using iostat (with the -x flag) shows the drive utilization being the same as the other drives.


    AFAIK, Advanced Format isn't really anything to worry about if you are using them in a linux softraid array, as long as you use the entire block device to make the raid, rather than partitions. I'm quite happy with (n-1)*55 mb/s for a raid5 array :)

    edit: just formatted an xfs partition, and am happily copying data @ 108mb/s average :D

    Speaking of the WDIDLE issue, my two newest 1tb drives have ~2500 load/unload cycles. EARS-00Y and EADS-00P. The rest (00L or 65L) have <200 each. Still, 2500 so far isn't that many, If they last until 1,000,000 cycles, i have atleast another 400 months of life out of them :)
     
    Last edited: Apr 12, 2010
  13. fref99

    fref99 Member

    Joined:
    Aug 11, 2002
    Messages:
    841
    Location:
    Switzerland
    Hi,

    I have 2 2Tb wd EARS drives (RAID 1) in my server for backup. rsyncing from a 6Tb (4x2Tb array) to the EARS I get atleast 120mb/s. Both drives have been hit really hard in the last few weeks (Copying to/from the array about 3Tb data) and haven't seen any problems.

    Regards
    FREF99
     
  14. luka

    luka Member

    Joined:
    Mar 6, 2007
    Messages:
    105
    Hi,

    2 days ago I added a new 1TB EARS drive to my existing 3 x 1TB EACS Raid 5 using mdadm grow...

    After rebuilding and resizing the filesystem, the read speed was fast (>60MB/s) but the write speed dropped at least by a factor of 20, now it is about 2-3 MB/s.
    I just checked the partition on the new drive and it starts at sector 63. Would this be the cause of the horribly slow write speed?

    I am thinking of removing the drive from the raid, repartitioning it (to start at 64) and adding it again... not sure if this will fix the problem.
    However, but the new partition will be smaller than the partitions on the other drives by 1 sector... can I do this?
     
  15. MetalPhreak

    MetalPhreak Member

    Joined:
    Apr 8, 2007
    Messages:
    1,759
    Location:
    Perth
    It just needs to start on a sector thats a multiple of 8.

    The drive pretends it has 512b sectors to the operating system. In reality it uses 4k sectors and just handles the conversion (which leads to misalignment performance issues).

    There are 8x512b fake-sectors assigned to each real 4k sector. You can try setting the beginning sector to 8,16,24,32,40,48, or 56. This will leave you with a few spare sectors at the end and enough sectors to match the other drives which start at sector 63.

    I'm pretty sure my method works out well because there is no need for partition info to take up the first sector of the disk. Thus mdadm uses the drive beginning at the first sector, so everything lines up.

    What I found interesting, is fdisk automatically recommended starting at sector 1 for my disks rather than 63.
     
    Last edited: Apr 12, 2010
  16. luka

    luka Member

    Joined:
    Mar 6, 2007
    Messages:
    105
    Excellent idea, I will try starting the new partition at 56.

    Now I was thinking of ways to try avoiding degrading the raid and rebuilding it again after modifying the partition table.
    Will this work to dd the whole partition down from sector 63 to 56 without using another hard drive for temporary file storage:
    dd if=/dev/sda of=/dev/sda1 bs=4096 seek=32256
    where 32256 = 63*512 = start of the original partition

    Thanks for the advices.
     
  17. rowan194

    rowan194 Member

    Joined:
    Jan 5, 2009
    Messages:
    2,044
    Wouldn't that write sector 63 to sector 1? You need to seek the output as well. From memory dd has iseek= and oseek= or something like that.

    I personally think you're better off letting RAID rebuild it, if you weren't 100% sure you'd do a verify which is pretty much the same thing anyway...
     
  18. luka

    luka Member

    Joined:
    Mar 6, 2007
    Messages:
    105
    The if=sda but of=sda1, hence it should write to the beginning of the partition and not drive. Of course I have to repartition the drive 1st.

    I would also let the RAID rebuild itself with the new partition but I don't have a 2nd backup of most of the stuff on the drives and I am worried about drive failure while rebuilding... and dd would be much faster as well...
     
  19. luka

    luka Member

    Joined:
    Mar 6, 2007
    Messages:
    105
    Small problem, fdisk refuses to create partitions at sectors <63...
    However, when I created a partition at sector 64, I noticed that the partition got larger than before (when it started at 63).

    It looks like using fdisk with "-u" option allows you to select sectors at the end of the drive which do not seem to be accessible without this option, probably due to rounding of sectors to cylinder boundaries when -u is not used???

    Without -u the last accessible sector was 1953520064 with -u 1953525167.
    0.01% extra free space :)

    And the raid seems to be rebuilding at about 60MB/s... without aligning the partition it was doing about 15MB/s.
     
  20. MetalPhreak

    MetalPhreak Member

    Joined:
    Apr 8, 2007
    Messages:
    1,759
    Location:
    Perth
    luka: have you tried just adding the whole device to the array. It should still work even if the others are partitions. Then its guaranteed to align since it starts from the beginning sector. MDADM should handle it fine and just not use the extra few sectors at the end.

    It'll be fine to keep the older non advanced format drives as partitions. Just add any new AF drives as whole devices.

    The only real advantage to doing partitions as raid members, is if you want multiple arrays on each drive. (ie 2 drives with raid1 swap space + raid1 root + raid1 home dir etc).
     

Share This Page

Advertisement: