Check Bad blocks of disk blocks

Source: Internet
Author: User
Tags erro

Procedure

Log on as the root user.

View the current hard disk information of the system.

 

# Fdisk-l

 

For example, the following information is displayed:

Disk/dev/SDA: 298.9 GB, 298999349248 bytes

255 heads, 63 sectors/track, 36351 Cylinders

Units = cylinders of 16065*512 = 8225280 bytes

 

Device boot start end blocks ID system

/Dev/sda1 1 262 2104483 + 82 Linux swap/Solaris

/Dev/sda2*263 32898 262148670 83 Linux

/Dev/sda3 32899 36351 27736222 + 83 Linux

 

Disk/dev/SDB: 42.9 GB, 42949672960 bytes

64 heads, 32 sectors/track, 40960 Cylinders

Units = cylinders of 2048*512 = 1048576 bytes

Scan the hard disk by using commands.

 

# Badblocks-S-V/dev/sdnx

 

N indicates the hard disk device name, and X indicates the partition number corresponding to the hard disk. For example, to check "/dev/sda2", run the following command:

 

# Badblocks-S-V/dev/sda2

 

Checking blocks 0 to 30681000

Checking for Bad blocks (read-only test): 306809600674112/306810000000

30680964

30680965

30680966

30680967

30680968

30680969

30680970

30680971

30680972

30680973

...

Done

Pass completed, 37 bad blocks found. Among them, "37 bad blocks found" indicates that there are 37 bad disks on the hard disk.

 

View system exceptions in atop

 

Bj-xen-pdc04 :~ # Cd/var/log/atop/(path to the atop log)

Bj-xen-pdc04:/var/log/atop # ll

Total 21832

-RW-r -- 1 Root 5111271 2013-06-30 00:00 atop_20130629

-RW-r -- 1 Root 5161400 2013-07-01 00:00 atop_20130630

-RW-r -- 1 Root 5190512 2013-07-02 00:00 atop_20130701

-RW-r -- 1 Root 4838774 2013-07-03 00:00 atop_20130702

-RW-r -- 1 Root 1989255 2013-07-03 09:29 atop_20130703

-RW ------- 1 Root 0 2013-07-03 00:00 daily. Log

 

 

Bj-xen-pdc04:/var/log/atop # atop-r atop_20130703 (analyze historical log files)

Bj-xen-pdc04 :~ # Atop (current system status)

 

 

PRC | sys 259m06s | user 16m59s | # proc 131 | # Zombie 2 | clones 71138 | # exit 0 |

CPU | sys 0% | user 0% | IRQ 0% | idle 197% | wait 2% | steal 1% | guest 0% |

CPU | sys 0% | user 0% | IRQ 0% | idle 98% | cpu000 W 1% | steal 0% | guest 0% |

CPU | sys 0% | user 0% | IRQ 0% | idle 99% | cpu001 W 1% | steal 0% | guest 0% |

Cpl | avg1 0.00 | avg5 0.01 | avg15 0.00 | CSW 180094e4 | intr 14098e5 | numcpu 2 |

Mem | tot 4.0g | free 40.0 M | cache 3.1g | dirty 0.0 M | buff 259.0 M | slab 214.4 M |

SWP | tot 12.0g | free 12.0g | vmcom 421.5 M | vmlim 14.0g |

PAG | scan 4118e4 | stall 0 | swin 9 | swout 24 |

DSK | SDA | busy 2% | read 577992 | write 1199e4 | kib/W 33 | MBR/s 0.02 | MBW/s 0.16 | avio 3.94 MS |

DSK | SDB | busy 0% | read 66 | write 0 | kib/w 0 | MBR/s 0.00 | MBW/s 0.00 | avio 2.24 MS |

DSK | SDC | busy 0% | read 51 | write 0 | kib/w 0 | MBR/s 0.00 | MBW/s 0.00 | avio 2.27 MS |

Net | transport | tcpi 6889896 | TCPO 1209373 | udpi 21 | udpo 323 | tcpao 15 | tcppo 44 | TCPRs 773 |

Net | Network | IPI 63073256 | IPO 3862948 | ipfrw 0 | deliv 9820e3 | icmpi 2654e3 | icmpo 2652e3 |

Net | eth2 0% | pcki 55oe4 | pcko 52311e4 | Si 220 kbps | so 269 kbps | erri 0 | erro 0 | drpo 0 |

Net | eth5 0% | pcki 56148e3 | pcko 22 | Si 35 kbps | so 0 kbps | erri 0 | erro 0 | drpo 0 |

Net | bond1 ---- | pcki 55oe4 | pcko 52311e4 | Si 220 kbps | so 269 kbps | erri 0 | erro 0 | drpo 0 |

Net | br1 ---- | pcki 11815e3 | pcko 3871052 | Si 28 kbps | so 58 kbps | erri 0 | erro 0 | drpo 0 |

Net | bond0 ---- | pcki 56148e3 | pcko 22 | Si 35 kbps | so 0 kbps | erri 0 | erro 0 | drpo 0 |

Net | br0 ---- | pcki 56121e3 | pcko 14 | Si 31 kbps | so 0 kbps | erri 0 | erro 0 | drpo 0 |

Net | vif7.0 ---- | pcki 705258 | pcko 699066 | Si 0 kbps | so 0 kbps | erri 0 | erro 0 | drpo 2 |

Net | lo ---- | pcki 621 | pcko 621 | Si 0 kbps | so 0 kbps | erri 0 | erro 0 | drpo 0 |

** System and process activity since boot ***

PID ruid EUID thr syscpu usrcpu vgrow rgrow rddsk wrdsk st exc s cpunr CPU cmd 1/10

7188 Root 1 Listen m38s 0.02 s 0 K 0 K 0 K 0 k N--S 0 1% netback/0

7211 Root 9 13m34s 12m47s 291.6 M 46128 K 52244 k N--S 0 61036 xend

28813 Root 1 8m20s 66.60 S 0 K 0 K 8 K 4 k N-Z 1 0% qemu-DM

8 Root 1 6m21s 9.58 S 0 K 0 K 0 K 0 k N--S 1 0% events/1

7 Root 1 6m26s 0.00 S 0 K 0 K 0 K 0 k N--S 0 0% events/0

7129 Root 1 3m37s 73.70 s 8972 K 564 K 0 K 0 k N--S 0 0% irqbalance

2705 Root 1 71.99 s 0.00 S 0 K 0 K 168 K 343.8 m n-s 0 0% kjournald

7212 Root 3 50.41 s 9.88 s 114.5 M 7272 K 8 K 4 k N-S 1 0% blktapctrl

4949 Root 1 42.55 s 2.44 S 0 K 0 K 0 K 0 k N-S 1 0% bond0

5100 Root 1 43.81 s 1.16 S 0 K 0 K 0 K 0 k N-S 1 0% bond1

5780 Root 3 32.32 s 11.87 s 89704 K 3760 K 1492 K 4 k N-S 0 0% qemu-DM

7051 Root 1 35.57 s 0.88 S 0 K 0 K 0 K 0 k N-S 0 0% hwloghandle

5966 Root 1 0.88 s 27.13 s 403.1 M 117.5 M 37344 K 178.3 m n-S 1 0% Wireshark

29 Root 1 26.13 s 0.00 S 0 K 0 K 0 K 10380 k N--S 0 0% kswapd0

Check Bad blocks of disk blocks

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.