A Digital Life

My Notebook

View My GitHub Profile

  • About
  • 3 April 2017

    Health-Check External Disk

    by kerner1000

    1. Hard disk and docking station need to support S.M.A.R.T.

    2. For S.M.A.R.T., smartmontools is needed.

    3. On (QNAP) NAS, install Entware.

    4. ssh on NAS.

    5. Install smartmontools: opkg install smartmontools.

    6. Connected the external device.

    7. run dmesg to see dev address of the external device. Output will look something like this:

    sd 13:0:0:0: [sdi] Spinning up disk...
    [798870.006728] sd 13:0:0:0: Attached scsi generic sg8 type 0
    [798871.003044] ............ready
    [798882.053671] sd 13:0:0:0: [sdi] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
    [798882.058613] sd 13:0:0:0: [sdi] Write Protect is off
    
    Here, the device address is `/dev/sdi`.
    
    1. Get S.M.A.R.T. error log: # smartctl /dev/sdi -l error.

    2. Start a short self test: # smartctl /dev/sdi -t short.

    3. Start a long self test: # smartctl /dev/sdi -t long.

    4. Run bad blocks scan: badblocks -n /dev/sdi. Tip: use tmux (opkg install tmux) to keep process alive after exiting the terminal.

    tags: NAS - QNAP - SMART - USB - bad blocks