FreeBSDマシンが遅すぎる!と思ったらZFSデバイスが壊れてたでごんす



ZFS

 "/usr/local/sbin/smartctl -a /dev/[]"使

"zpool iostat -v [] 1"

FreeBSD使pkg_add -r使


:
(2013/4/3 )


ZFS
:


HP Proliant MicroServer

2TB5raidz使

8GBUSB/bootdir


NetatalkCNID DB使使CNID DB

ssh


ssh1

ls30

vim2

tab30



zpool statusdmesgUSBCPU



twitter

USBメモリの状態がおかしくなってないか、あとZFSも個別のドライブ状態とか、もうちょっと詳しく調べたい。


hdparmdiskinfoUSBdiskinfo10MB/sHDD

困っていたら、[twitter:@dankogai]がいろいろアドバイスを下さいました。


zpool iostat -v [pool] 1
heliopora# zpool iostat -v tank 1
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
tank        3.43T  5.63T      5     14  16.1K  44.0K
  raidz1    3.43T  5.63T      5     14  16.1K  44.0K
    ada0        -      -      0     11  43.8K  12.0K
    ada1        -      -      0     11  43.9K  12.0K
    ada2        -      -      0     11  43.0K  12.0K
    ada3        -      -      0     10  43.0K  12.0K
    ada4        -      -      0     11  44.0K  12.0K
----------  -----  -----  -----  -----  -----  -----
 
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
tank        3.43T  5.63T     57      0  7.23M      0
  raidz1    3.43T  5.63T     57      0  7.23M      0
    ada0        -      -      0      0      0      0
    ada1        -      -      0      0      0      0
    ada2        -      -      0      0      0      0
    ada3        -      -     14      0  1.81M      0
    ada4        -      -      0      0      0      0
----------  -----  -----  -----  -----  -----  -----
 
               capacity     operations    bandwidth
pool         used  avail   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
tank        3.43T  5.63T      0      0      0      0
  raidz1    3.43T  5.63T      0      0      0      0
    ada0        -      -      0      0      0      0
    ada1        -      -      0      0      0      0
    ada2        -      -      0      0      0      0
    ada3        -      -      0      0      0      0
    ada4        -      -      0      0      0      0
----------  -----  -----  -----  -----  -----  -----

 dd if=FreeBSD8.2R_DVD.img of=/dev/null KMgist[twitter:@dankogai]

ところが、ひと目で返事が返ってきました。


gist1 

smartctlports
cd /usr/ports/sysutils/smartmontools/
make clean ; make install

make installFreeBSD使




2smartctl使/dev/ada3調使

/dev/ada3smartctlsmartctl:
  1 Raw_Read_Error_Rate     0x002f   197   197   051    Pre-fail  Always       -       8305 Reallocated_Sector_Ct   0x0033   188   188   140    Pre-fail  Always       -       234196 Reallocated_Event_Count 0x0032   001   001   000    Old_age   Always       -       218200 Multi_Zone_Error_Rate   0x0008   090   001   000    Old_age   Offline      -       29448

/dev/ada2:
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       05 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       16

/dev/ada[0,1,4]

ada3Seagate ST32000542ASada0,1,2,3ada4

4WD20EARX1WD20EARSSeagate512BytesSATA2使

zfs
# zpool replace -f tank ada3

Seagatetankpool-fforce
resilver
heliopora# zpool status
  pool: tank
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h7m, 2.14% done, 5h23m to go
config:

        NAME            STATE     READ WRITE CKSUM
        tank            DEGRADED     0     0     0
          raidz1        DEGRADED     0     0     0
            ada0        ONLINE       0     0     0
            ada1        ONLINE       0     0     0
            ada2        ONLINE       0     0     0
            replacing   DEGRADED     0     0     0
              ada3/old  UNAVAIL      0     0     0  cannot open
              ada3      ONLINE       0     0     0  15.0G resilvered
            ada4        ONLINE       0     0     0

errors: No known data errors
heliopora#


[twitter:@dankogai]

zpool status