[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why syslog is not rotating?



Well, I have good news and bad news.


On Mon, 4 Nov 2013 10:57:18 +0200 (IST)
Itay <debian@itayf.fastmail.fm> wrote:

> > [...] Is there anything suspicious in the root mailbox?
> 
> root mail box has daily messages like this starting at june 2010
> (yes, I know, bad me)
> 
>       /etc/cron.daily/logrotate:
> 
>        gzip: stdin: Input/output error
>        error: failed to compress log /var/log/syslog.1
>        run-parts: /etc/cron.daily/logrotate exited with return code 1

The good news are - both cron and logrotate are working as intended on
your system. At least, they try their best.


> > And, is there anything unusual in /var/log/kern.log at the time you
> > had this error?
> 
> Multiple messages like those two:
> 
> ...
> Oct 31 07:59:35 gandalf kernel: [4627180.407176] sd 2:0:0:0: [sda] 
> Add. Sense: Unrecovered read error - auto reallocate failed

And the bad news are - your drive is failing. And you've already lost
some data (best scenario - some contents of /var/log/syslog).


> Output of 'smartctl --all' (after running 'smartctl -t long'):
<skip>
>    9 Power_On_Hours          0x0032   060   060   000    Old_age Always       -       29269

That's an old WD harddrive, and it run for about 3 years continuously.
These things aren't get better with age.


<skip>
> 197 Current_Pending_Sector  0x0032   200   200   000    Old_age Always       -       1
> 198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       1

And these show that you've already lost one 512 byte sector on that
disk irrecoverably.


> 
> SMART Error Log Version: 1
> No Errors Logged
> 
> SMART Self-test log structure revision number 1
> Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
> # 1  Extended offline    Completed: read failure       90%     29267         94963149

This shows the same, with an address of first failing sector.


Shawn already suggested you to replace your harddrive ASAP, I second
this suggestion. In fact, buy two harddrives and do a RAID1 then forget
about the thing for a next few years.

Considering that fsck showed you no errors that means
that /var filesystem metadata is consistent. That's good as it means
you can just copy all files to the new harddrive and filesystem state
won't prevent you to do so. That, sadly, speaks nothing about an
integrity of data itself.

Reco


Reply to: