Linux логи ошибок диска

  • Печать

Страницы: [1]   Вниз

Тема: Где хранятся логи ошибок дисковой подсистемы?  (Прочитано 2856 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
DXP

Где хранятся логи ошибок дисковой подсистемы и где можно найти howto для их решения?

Я хочу приобрести накопитель WD15EARS (у которого физические 4Кб сектора и возможны тормоза, если раздел не начинается с сектора кратного 8 ), однако на одном форуме попадались сообщения что с ними в линукс бывают такие ошибки:

http://s02.ЗАПРЕЩЁННЫЙ РЕСУРС/i175/1004/a9/b8e5ed38ca87.jpg
(что то картинка по другому не вставляется)
Чем эти ошибки могут быть вызваны?

« Последнее редактирование: 04 Апреля 2010, 10:44:03 от DXP »


Оффлайн
ArtemZ

1. Здесь форум по Ubuntu, а не по ЦентОС
2. Логи этих ошибок хранятся в /var/log/dmesg и /var/log/messages
3. Ошибки с вашего скриншота говорят о порченном винчестере. Сохраните данные и перенесите их на новый


Оффлайн
DXP

Это не мой скриншот, а одного товарища, который купил себе винт WD10EARS
Удалось нагуглить похожую проблему и в Ubuntu, но она уже решена.


  • Печать

Страницы: [1]   Вверх

If you have installed smartmontools, and enabled smartd then all log entries are available in /var/log/syslog:

grep "smartd" /var/log/syslog*

For /dev/sda

grep "smartd.*/dev/sda" /var/log/syslog*

An other example:

$ grep "smartd.*/dev.*failure" /var/log/syslog*

/var/log/syslog:May 14 10:46:58 sturm smartd[608]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 120 to 104
/var/log/syslog:May 14 10:46:58 sturm smartd[608]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 117 to 119
/var/log/syslog.1:May 13 05:30:33 sturm smartd[631]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 110 to 113
/var/log/syslog.1:May 13 11:19:26 sturm smartd[651]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 113 to 115
/var/log/syslog.1:May 13 11:49:26 sturm smartd[651]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 120 to 100
/var/log/syslog.1:May 13 11:49:26 sturm smartd[651]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 115 to 117
/var/log/syslog.1:May 13 15:49:27 sturm smartd[651]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 100 to 102
/var/log/syslog.1:May 13 19:49:26 sturm smartd[651]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 102 to 104
/var/log/syslog.1:May 14 10:16:58 sturm smartd[608]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 104 to 120

Assuming a linux environment, dmesg should have them.

Check /var/log/dmesg

answered May 3, 2011 at 12:36

Cheeto's user avatar

CheetoCheeto

1216 bronze badges

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

Common disk errors include physical failures, bad sectors or blocks, and inconsistent filesystems, which can lead to various problems. Diagnosing these issues in Linux can be done using built-in command line tools.

The disk must not be mounted when performing these tests. If it’s necessary to check the root filesystem and it cannot be unmounted due to logged-in users, you can boot into a live Linux system, such as the Ubuntu installer disk. This method is also helpful for recovering partition tables.

Steps to scan for disk error and bad sector in Linux:

  1. Open the terminal application.

  2. Display the list of available disks on your system.

    $ lsblk
    NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    loop0    7:0    0 55.4M  1 loop /snap/core18/1997
    loop1    7:1    0  219M  1 loop /snap/gnome-3-34-1804/66
    loop2    7:2    0 64.8M  1 loop /snap/gtk-common-themes/1514
    loop3    7:3    0 32.3M  1 loop /snap/snapd/11588
    loop4    7:4    0   51M  1 loop /snap/snap-store/518
    loop5    7:5    0 65.1M  1 loop /snap/gtk-common-themes/1515
    sda      8:0    0   20G  0 disk 
    ├─sda1   8:1    0    1M  0 part 
    ├─sda2   8:2    0  513M  0 part /boot/efi
    └─sda3   8:3    0 19.5G  0 part /
    sdb      8:16   0   20G  0 disk /mnt/data
    sr0     11:0    1 1024M  0 rom
  3. Ensure the disk you wish to examine is unmounted.

    $ sudo umount /dev/sdb
    [sudo] password for user:
  4. Assess the disk’s S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) health status using smartctl.

    $ sudo smartctl -H /dev/sdb
    smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.11.0-16-generic] (local build)
    Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF READ SMART DATA SECTION ===
    SMART Health Status: OK
  5. Examine the filesystem consistency on the disk with fsck.

    $ sudo fsck /dev/sdb
    fsck from util-linux 2.36.1
    e2fsck 1.45.7 (28-Jan-2021)
    /dev/sdb: clean, 11/1310720 files, 126322/5242880 block
  6. Inspect the disk for bad blocks or bad sectors using badblocks.

    $ sudo badblocks -v /dev/sdb
    Checking blocks 0 to 20971519
    Checking for bad blocks (read-only test): done                                                 
    Pass completed, 0 bad blocks found. (0/0/0 errors)

Discuss the article:

Comment anonymously. Login not required.

From the smartctl man page:

The Attribute table printed out by smartctl also shows the «TYPE» of the Attribute. Attributes are one of two possible types: Pre-failure or Old age.
Pre-failure Attributes are ones which, if less than or equal to their threshold values, indicate pending disk failure. Old age, or usage Attributes, are
ones which indicate end-of-product life from old-age or normal aging and wearout, if the Attribute value is less than or equal to the threshold. Please
note
: the fact that an Attribute is of type ‘Pre-fail’ does not mean that your disk is about to fail! It only has this meaning if the Attribute´s current
Normalized value is less than or equal to the threshold value.

If the Attribute´s current Normalized value is less than or equal to the threshold value, then the «WHEN_FAILED» column will display «FAILING_NOW». If
not, but the worst recorded value is less than or equal to the threshold value, then this column will display «In_the_past». If the «WHEN_FAILED» column
has no entry (indicated by a dash: ´-´) then this Attribute is OK now (not failing) and has also never failed in the past.

So according to the smartctl output section you have posted, your drive actually looks in good shape. However, that doesn’t necessarily mean that there is not another problem.

Unfortunately the Unhandled sense code message does mean that something went wrong, but the kernel doesn’t know what. You could try looking at the rest of the smartctl output to see if there is any thing wrong. There should be a part tha summarises the drive’s overall health. You can get it on its own with the -H option.

If the drive supports self testing, you can start one with:

smartctl -t long /dev/sda

This starts one in the background, so you will have to keep checking for results. If the drive is not mounted, you can add the -C option enable captive mode which should take less time. A short test is also possible, but less thorough.

It is also a good idea to check physical connectors etc to make sure nothing as come loose — its an easy fix if it has.

Update

Wikipedia has a good reference for smart attributes. Note that the ‘Better’ column refers to the raw values in rightmost column of the output and not the normalised value at the start. Here is the part on ‘Current Pending Sector’ mentioned by frostschutz:

Count of «unstable» sectors (waiting to be remapped, because of unrecoverable read errors). If an unstable sector is subsequently read successfully, the sector is remapped and this value is decreased. Read errors on a sector will not remap the sector immediately (since the correct value cannot be read and so the value to remap is not known, and also it might become readable later); instead, the drive firmware remembers that the sector needs to be remapped, and will remap it the next time it’s written. However some drives will not immediately remap such sectors when written; instead the drive will first attempt to write to the problem sector and if the write operation is successful then the sector will be marked good (in this case, the «Reallocation Event Count» (0xC4) will not be increased). This is a serious shortcoming, for if such a drive contains marginal sectors that consistently fail only after some time has passed following a successful write operation, then the drive will never remap these problem sectors.

Понравилась статья? Поделить с друзьями:
  • Linux как проверить диск на ошибки
  • Linux ubuntu ошибка при установке
  • Linux ntfs ошибка ввода вывода
  • Linux mint ошибка сервера cups
  • Linux mint проверка диска на ошибки ntfs