Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: DateTime throwing an error

by afoken (Chancellor)
on Apr 16, 2021 at 10:28 UTC ( [id://11131363]=note: print w/replies, xml ) Need Help??


in reply to Re^2: DateTime throwing an error
in thread DateTime throwing an error

what I don't understand is how the file got corrupt

Time for a filesystem check (fsck) and a check of the disks (smartctl). If a RAID is involved, also check the RAID for errors (cat /proc/mdstat for a Linux SW RAID).

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: DateTime throwing an error
by nachtmsk (Acolyte) on Apr 16, 2021 at 11:33 UTC
    Yeah, will do.

    I should have mentioned: this is part of a security application I wrote to run on a series of Raspberry Pi's. They each take a picture in a certain area and move it over to the main Pi which processes the images into a DB and finally into a simple web page which this Pi hosts.

    The "hard drive" of this Pi is actually a micro SD card. So no Raid or anything fancy.

      The "hard drive" of this Pi is actually a micro SD card.

      Any flash memory of course has a limited number of write cycles, and since a Linux system is constantly writing log files etc. to the disk, and you say you're regularly writing image files to the disk, two years isn't an unreasonable time for the SD card to start failing if the system was in operation the whole time. I'm also not sure how widespread Wear leveling currently is on SD cards.

      But what I really don't understand is how that file from 2019 (With.pm) was changed but the filetimestamp didn't change. Maybe a corruption doesn't always trigger a timestamp update?

      Physical damage to the storage medium (or corruption of the flash cells) wouldn't be reflected in the file's timestamp. However, I can almost guarantee you that this wasn't the only file affected. I'd strongly recommend replacing the SD card ASAP. Recently there are also new "endurance" SD cards (e.g. from SanDisk, Samsung, and Transcend) that promise to have higher write endurances.

        I'm also not sure how widespread Wear leveling currently is on SD cards.

        Wear leveling is one of the few differences between an SD card and simple SPI flash (and of course, the SD-interface).

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
        Hi,

        I built the Pi this past January, it's been running since then. The 2019 Timestamp on the Module file was (I assume) the most recent version of that particular file at the time of install. I installed the Module this past January through Cpan. But I agree about your suggestion in replacing the SD card with something more robust.

        This just started as a fun project to monitor my property with some Pi's I had laying around the the house.

        I'm wondering if the Pi can run off of an external drive enclosure in a mirrored array. I need to check on that.

        Thanks very much,

        Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11131363]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-03-29 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found