On Sat, 29 Jul 2017 18:21:21 +0100, Adrian wrote:
> In message , ray carter
> writes
>>It is possible that the SD card was corrupted as the power supply died.
>>You might try reloading raspian (and, of course, you can always back up
>>the current card on a full sized computer).
>
> That thought had also crossed my mind, although there isn't any obvious
> sign that corruption has occurred.
>
There usually isn't.
The problem is that all Linuxes use unoccupied RAM as disk cache space.
Start a console and run "top" to see (a) whats running and (b) the way
RAM is being used (thats on the last header line.
When a file is closed, all buffered blocks are flushed to disk but its
unclear, to me at least, just how often sectors are flushed when a bigger
file is being written. The result of a power failure can be incomplete
files due to cached but unwritten blocks. This may also mean that the
inode(s) for that file are left pointing at the wrong sectors if an
existing file is being overwritten.
The other problem with all forms of SSD storage is due to 'wear
levelling'. Since every storage cell has a limited number of writes
before it fails, all SSD storage periodically remaps its blocks so that
the few heavily modified ones (directories, inodes, etc) get exchanged
with less heavily used blocks. This doesn't happen often, but its not
instantaneous and, if there's a power failure during it, the SSD storage
is quite likely to be unreadable. Don't forget that the remapping code is
in the SSD and won't understand anything about the filing system on the
disk: all it knows is how many times each block has been written to and
its only aim is to remap blocks to equalise the number of writes to each
block. On top of this, SD cards are the smallest and cheapest SSD devices
and, as such, have the least resilience to power failures.
There's not much you can do about this except to make a point of NEVER
switching an RPi off without stopping the OS first, so it can flush all
cached blocks and close down tidily.
There are small, inexpensive switch units you can buy that will power the
RPi off after Raspbian has stopped.
For the properly paranoid, there are also UPS addons for the RPi, but
they aren't particularly cheap by the time you've bought the UPS board
and added reasonable sized batteries to it.
That said, if you have Linux running on a desktop or laptop, put the RPi
disk in an SD reader attached to it, but DON'T mount it. Now and run fsck
against the SD card to see if its corrupted. Don'y know which drive its
on? Run "df -h" before and after sticking the SD card in the slot. The
item that appears (called something like /dev/sdc) is the SD card.
Don't have Linux on a desktop or laptop? Download, a 'Live DVD' ISO file,
burn it to a DVD and boot your computer from it. This won't damage your
existing OS, but will let you run fsck against the SD card. Or, if your
PC will boot from a memory stick and you had a 2GB stick, put it there
rather than on a DVD.
I suggest getting the Fedora XFCE live disk spin, because XFCE looks and
acts fairly similarly to Windows, or you could try a Mint ISO that has
the Cinnamon desktop. There are lots of others, but these happen to be
the pair I know. I've installed and briefly used Mint+Cinnamon and
Fedora_XFCE is my everyday system.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|