- HDDパス情報を取得 →#fdisk -l
HDD検査 →#smartctl -t long <HDDパス>
HDD検査結果表示→#smartctl -l selftest <HDDパス>
1、HDDパス情報を取得
#fdisk -l
# fdisk -l
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2 1953525167 976762583 b W95 FAT32
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000d56a
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 195311615 97654784 83 Linux
/dev/sda2 195313662 214843391 9764865 5 Extended
/dev/sda5 195313664 214843391 9764864 82 Linux swap / Solaris
今回は/dev/sdb1の状態を調べます。Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2 1953525167 976762583 b W95 FAT32
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000d56a
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 195311615 97654784 83 Linux
/dev/sda2 195313662 214843391 9764865 5 Extended
/dev/sda5 195313664 214843391 9764864 82 Linux swap / Solaris
2、HDD検査
#smartctl -t long /dev/sdb1
# /usr/sbin/smartctl -t long /dev/sdb1
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 171 minutes for test to complete.
Test will complete after Mon Mar 17 13:20:33 2014
Use smartctl -X to abort test.
バックグラウンドで動作するので指定時間待ちます。smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 171 minutes for test to complete.
Test will complete after Mon Mar 17 13:20:33 2014
Use smartctl -X to abort test.
3、HDD検査結果表示
#smartctl -l selftest /dev/sdb1
# smartctl -l selftest /dev/sdb1
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num | Test_Description | Status | Remaining | LifeTime (hours) | LBA_of_ first_error |
# 1 | Extended offline | Self-test routine in progress | 90% | 5974 | - |
↓
SMART Self-test log structure revision number 1
"status"に注目します。"Self-test routine in progress"はテスト中……"Completed without error"でエラーなくテストをパスしたことがわかります。Num | Test_Description | Status | Remaining | LifeTime (hours) | LBA_of_ first_error |
# 1 | Extended offline | Completed without error | 00% | 5976 | - |
※参考
- ディスク の様々な情報を参照する:HDD関連コマンドの紹介
S.M.A.R.T ハードディスク テスト コマンド:smartctl(HDDテスト)コマンド解説
smartctl の出力についてまとめてみた:smartctlのテスト結果の解説
|
…動画・絵・漫画・脚本などの作品紹介 |
![]() |
…広告・実験・講習用映像のyoutubeチャンネル |
![]() |
…作画配信のyoutubeチャンネル |
![]() |
…絵、デザイン資料、漫画、実験画像 |
![]() |
…考え、宣伝 |