HDD Diagnostic - Linux

This is a discussion on HDD Diagnostic - Linux ; Hello to all, I m a beginner in the Linux platform. Since last two years,i was working on Embedded C,C++ on the keil compiler, on the 89C51RD2. I have also worked on the WinCE 5.0 Platform Builder with EVC++. According ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: HDD Diagnostic

  1. HDD Diagnostic

    Hello to all,

    I m a beginner in the Linux platform. Since last two years,i was
    working on Embedded C,C++ on the keil compiler, on the 89C51RD2. I have

    also worked on the WinCE 5.0 Platform Builder with EVC++.
    According to my new project, i would like to write the diagnostic
    application for the PC type device (32 bit processor) i.e i have to
    test the functionality of each and every hardware like CPU,HDD,Serial
    Ports,RAID,etc.The client has given the procedure to carry out each
    test.

    The software would be developed predominantly in C

    Library and Driver would be developed for Linux Kernel 2.6.14. The
    development tools would be GCC Ver. 3.4.4, Glibc 2.3.5 and Binutils
    2.16.1

    As per the requirement the procedure to test HDD should be


    # Check HDD


    1. Validates the hard-disk device by writing a pattern onto an unused
    sector and compares with the expected pattern.


    2. Checks all the sectors (HDD surface test) and report bad sectors.


    3. Retains the original sector contents.


    Can anyone please help me to start the application.


    Please guide me...


    Thanks and Regards,
    Nutty.


  2. Re: HDD Diagnostic

    Nutty wrote:
    > # Check HDD
    >
    >
    > 1. Validates the hard-disk device by writing a pattern onto an unused
    > sector and compares with the expected pattern.
    >
    >
    > 2. Checks all the sectors (HDD surface test) and report bad sectors.
    >
    >
    > 3. Retains the original sector contents.
    >
    >
    > Can anyone please help me to start the application.


    badblocks -n /dev/hdX
    It's part of the e2fsprogs package: http://e2fsprogs.sourceforge.net/

    --
    Markku Kolkka
    markku.kolkka@iki.fi



  3. Re: HDD Diagnostic

    Hello,

    Nutty wrote:
    >
    > As per the requirement the procedure to test HDD should be
    >
    >
    > # Check HDD
    >
    >
    > 1. Validates the hard-disk device by writing a pattern onto an unused
    > sector and compares with the expected pattern.
    >
    >
    > 2. Checks all the sectors (HDD surface test) and report bad sectors.


    For HDD diagnosis, there are smartmontools. Most current harddisks have
    SMART technology, they count how often they are turned on, how seek
    times develop over time, how many defect sectors have been
    automatically replaced by the builtin logic, and a lot more.

    The tests you suggest make sense for harddisks without any builtin
    logic, where the user and the OS take full responsibility. You might
    want to rethink your goals.

    Bernd Strieder


+ Reply to Thread