Lähettäjä: Alessandro Selli Päiväys: Vastaanottaja: dng Aihe: Re: [DNG] Devuan for Raspberry Pi fried SD CARD.
Il 02/12/18 11:41, Edward Bartolo ha scritto: > Hi everyone.
>
> Recently I have been using a Raspberry Pi 3B, obviously powered with
> Devuan, to run as music player. Restarting it yesterday, I was
> dismayed to discover it would not boot properly anymore, with long
> lists of errors complaining about not being able to write to the SD
> CARD. The latter is not full. Examining it I found it is now
> permanently marked as read-only. Searching online for an explanatory
> cause, I learnt this occurs when the maximum number of write cycles is
> reached. So, the SD CARD, although brand new is now to be thrown away.
>
> The purpose of this email is to ask how to radically minimized write
> cycles to the SD CARD when I run Devuan for Raspberry Pi 3. I found a
> how-to which uses /tmp fs for frequently modified system files, but
> the user uses systemd and I do not want to have that.
>
> Can any good soul help, please?
> Thanks.
All you need to do is putting this line in /etc/fstab:
tmpfs /tmp tmpfs defaults,mode=1777 0 0
Then you go into runlevel 1, erase everything in /tmp, mount it and go
back to runlevel 2 (or what you use on your RP3B).
Others have already suggested more ways you can reduce writes to your
filesystems. I would add, if your device's power source is backed by a
battery and you use an ext4 filesystem, to format or mount it with:
1. journal disabled (nointegrity);
2. barriers disabled (nobarrier or barrier=0).
These mount options will increase the chance of data loss and
filesystem corruption in the case of an abnormal filesystem close
(system crash or sudden power loss), but significantly decrease the
number of write operations on the ext4 filesystem during regular operation.
Alessandro
--
Alessandro Selli <alessandroselli@???>
VOIP SIP: dhatarattha@???
Chiave firma e cifratura PGP/GPG signing and encoding key:
BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE