綾小路龍之介の素人思考

[linux] hddの速度が遅すぎ

いつも通りlinuxでhdd(WD20EARS-00M)をフォーマットしたら、フォーマットに時間がかかったので、いろいろ調査したところ、不良セクタがあったみたい。

hdparm で機能、接続情報、ベンチマーク。読み出しが異常に遅い。

# hdparm /dev/sdz

/dev/sdz:
 multcount     = 16 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 243201/255/63, sectors = 3907029168, start = 0
# hdparm -i /dev/sdz

/dev/sdz:

 Model=WDC WD20EARS-00MVWB0, FwRev=51.0AB51, SerialNo=WD-WCAZA0535069
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=3907029168
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 udma6
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

# hdparm -Tt /dev/sdz

/dev/sdz:
 Timing cached reads:   114 MB in  2.01 seconds =  56.82 MB/sec
 Timing buffered disk reads:   6 MB in  4.56 seconds =   1.31 MB/sec

ddでテスト。書き込みも読み込みもともに遅い。

# dd if=/dev/zero of=/dev/sdz bs=10M count=10
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 23.727 s, 4.4 MB/s
# dd if=/dev/sdz of=/dev/null bs=10M count=10
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 16.599 s, 6.3 MB/s

遅すぎるのはエラーの可能性。badblocks で読み出しテストするとエラーあり。

#  badblocks /dev/sdz
643520
643521
643522
...

smartctl でセルフテストを走らせるとエラー終了。

# smartctl -l selftest /dev/sdz
smartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.0-4-686-pae] (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    Completed: unknown failure    90%       752         -
# 2  Extended offline    Completed: unknown failure    90%       752         -
# 3  Extended offline    Completed: unknown failure    90%       752         -
# 4  Conveyance offline  Completed: unknown failure    90%       751         -
# 5  Extended offline    Completed: unknown failure    90%       751         -
# 6  Short offline       Completed: unknown failure    90%       751         -

バーティションをきることは可能。

# parted /dev/sdz
GNU Parted 2.3
Using /dev/sdz
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdz will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
(parted) unit s
(parted) mkpart primary ext3 2048s -1s
Warning: You requested a partition from 2048s to 3907029167s.
The closest location we can manage is 2048s to 3907029134s.
Is this still acceptable to you?
Yes/No? Yes
(parted)  print
Model: ATA WDC WD20EARS-00M (scsi)
Disk /dev/sdz: 3907029168s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End          Size         File system  Name     Flags
 1      2048s  3907029134s  3907027087s               primary

(parted) quit
Information: You may need to update /etc/fstab.

# time mkfs -t ext3 /dev/sdz1
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
122101760 inodes, 488378385 blocks
24418919 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
14905 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848

Allocating group tables: done
Writing inode tables:  1767/14905

ソーシャルブックマーク

  1. はてなブックマーク
  2. Google Bookmarks
  3. del.icio.us

ChangeLog

  1. Posted: 2010-09-19T15:04:30+09:00
  2. Modified: 2010-09-19T15:04:30+09:00
  3. Generated: 2017-06-23T23:09:18+09:00