Showing posts with label bad sector. Show all posts
Showing posts with label bad sector. Show all posts

Wednesday, March 30, 2016

check bad sector on linux


ก่อนอื่นต้องเช็ค Disk drive บนเครื่องก่อน มีอะไรบ้าง สำหรับเครื่องที่ใช้รูปแบบดิสก์เป็น LVM ใช้คำสั่งตรวจเช็คดังนี้ check-disk-lvm-on-centos

แล้วใช้คำสั่งต่อไปนี้ ตรวจสอบฮาร์ดดิสก์

badblocks -v /dev/sda2 > bad-block


หลังจากรันคำสั่งเสร็จ ก็รายงานผลออกมาดังภาพด้านล่าง


badblocks -svn /dev/sdd
to have the hard disk controller replace bad blocks by spare blocks.

fsck /dev/sdd  > fix all drive
fsck /dev/sdd1  > fix special drivebadbl
repair disk

e2fsck -cfpv /dev/sda1
The parameters have the following meanings: “c” searches for bad blocks and adds them to the list, “f” forces a check on the file system, “p” repairs anything that can be safely repaired and “v” is verbose mode so you can see the command progress.

Ref: fix haddisk bad sector

Wednesday, April 1, 2015

check disk Wmware

Check on VMWare

1. Command #esxcli storage core device list ตรวจสอบ Hard disk ในเครื่อง

t10.ATA_____ST31500341AS________________________________________9VS2TVTN
Display Name: Local ATA Disk (t10.ATA_____ST31500341AS________________________________________9VS2TVTN)
Has Settable Display Name: true
Size: 1430799
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/t10.ATA_____ST31500341AS________________________________________9VS2TVTN
Vendor: ATA
Model: ST31500341AS
Revision: CC1H
SCSI Level: 5
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: false
Is SSD: false
Is Offline: false
Is Perennially Reserved: false
Queue Full Sample Size: 0
Queue Full Threshold: 0
Thin Provisioning Status: unknown
Attached Filters:
VAAI Status: unknown
Other UIDs: vml.0100000000202020202020202020202020395653325456544e535433313530
Is Local SAS Device: false
Is Boot USB Device: false

2. Command #esxcli storage core device smart get -d t10.ATA_____ST31500341AS________________________________________9VS2TVTN

Parameter Value Threshold Worst
---------------------------- ----- --------- -----
Health Status OK N/A N/A
Media Wearout Indicator N/A N/A N/A
Write Error Count N/A N/A N/A
Read Error Count 104 6 99
Power-on Hours 59 0 59
Power Cycle Count 100 20 100
Reallocated Sector Count 100 36 100
Raw Read Error Rate 104 6 99
Drive Temperature 39 0 59
Driver Rated Max Temperature 61 45 41
Write Sectors TOT Count 200 0 200
Read Sectors TOT Count N/A N/A N/A
Initial Bad Block Count 100 99 100

3. Check all disk with command: /usr/lib/vmware/vm-support/bin/smartinfo.sh

#/usr/lib/vmware/vm-support/bin/smartinfo.sh 
SMART Information for disks.

Device:  t10.ATA_____KINGSTON_SV300S37A60G___________________50026B774507282B____
Errors: 
Error getting Smart Parameters: CANNOT open device


Device:  t10.ATA_____ST31500341AS________________________________________9VS3YGKG
Errors: 
Error getting Smart Parameters: CANNOT open device


Device:  t10.ATA_____WDC_WD20EARX2D00PASB0_________________________WD2DWCAZAD763430
Parameter                     Value  Threshold  Worst
-----------------------------------------------------
Health Status                 OK     N/A        N/A
Media Wearout Indicator       N/A    N/A        N/A
Write Error Count             N/A    N/A        N/A
Read Error Count              200    51         200
Power-on Hours                64     0          64
Power Cycle Count             100    0          100
Reallocated Sector Count      200    140        200
Raw Read Error Rate           200    51         200
Drive Temperature             110    0          90
Driver Rated Max Temperature  N/A    N/A        N/A
Write Sectors TOT Count       200    0          200
Read Sectors TOT Count        200    0          200

Initial Bad Block Count       N/A    N/A        N/A