[DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-05 Thread Edward Bartolo
On 05/12/2018, Antony Stone  wrote:
> On Wednesday 05 December 2018 at 17:41:22, Edward Bartolo wrote:
>
>> Further Optimization:
>>
>> Is it possible to configure Devuan on Raspberry Pi 3B+, so that,
>> bash_history, settings pertaining to bash, and other user
>> configuration files from being updated every time such an application
>> is used?
>
> Er, sorry, but what's the verb in that sentence?
>
> Did you perhaps mean "... configuration files *are prevented* from being
> ..."?
>
> If so, I believe you just need to set HISTFILESIZE to zero.
>
> I'm not entirely sure what you mean by "settings pertaining to bash".
>
>> If there is some other things I am not aware of, please inform me.
>
> I'm not an expert on running read-only systems (although I'm certainly
> interested), so I'll let others chip in with expertise here :)
>
>
> Antony.
>

The 'ink' evaporated. Next time I will use a better brand.

[ /Humour ]
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-05 Thread Antony Stone
On Wednesday 05 December 2018 at 17:41:22, Edward Bartolo wrote:

> Further Optimization:
> 
> Is it possible to configure Devuan on Raspberry Pi 3B+, so that,
> bash_history, settings pertaining to bash, and other user
> configuration files from being updated every time such an application
> is used?

Er, sorry, but what's the verb in that sentence?

Did you perhaps mean "... configuration files *are prevented* from being ..."?

If so, I believe you just need to set HISTFILESIZE to zero.

I'm not entirely sure what you mean by "settings pertaining to bash".

> If there is some other things I am not aware of, please inform me.

I'm not an expert on running read-only systems (although I'm certainly 
interested), so I'll let others chip in with expertise here :)


Antony.

-- 
The Royal Society for the Prevention of Cruelty to Animals was formed in 1824.
The National Society for the Prevention of Cruelty to Children was not formed 
until 1884.
That says something about the British.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-05 Thread Edward Bartolo
Further Optimization:

Is it possible to configure Devuan on Raspberry Pi 3B+, so that,
bash_history, settings pertaining to bash, and other user
configuration files from being updated every time such an application
is used?

If there is some other things I am not aware of, please inform me.

Thanks.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Bruce Ferrell

On 12/3/18 3:24 AM, Steve Litt wrote:

On Sun, 2 Dec 2018 11:10:20 -0800
Bruce Ferrell  wrote:

  

Yeah, this IS one of the issues around flash/SSD storage... They run
fast and wear out faster.

The preceding sentence is true but it's not the whole truth. If one
uses SSD the way they would spinning rust, that being run it 80% to 90%
full, with lots of writes, and expects years of service, one will
likely be disappointed. But there are many situations in which SSD has
sufficient lifetime.

Let me start with my setup:

=
[root@mydesk mnt]# mount | grep sda
/dev/sda1 on / type ext4 (rw,noatime)
[root@mydesk mnt]# df -h /
Filesystem  Size  Used Avail Use% Mounted on
/dev/sda1   220G   29G  181G  14% /
[root@mydesk mnt]# mount | grep "/dev/sd"
/dev/sda1 on / type ext4 (rw,noatime)
/dev/sdb1 on /boot type ext4 (rw,noatime)
/dev/sdb7 on /tmp type ext4 (rw,noatime)
/dev/sdb6 on /var type ext4 (rw,noatime)
/dev/sdb8 on /run type ext4 (rw,noatime)
/dev/sdc9 on /home type ext4 (rw,noatime)
/dev/sdc1 on /s type ext4 (rw,noatime)
/dev/sdc2 on /d type ext4 (rw,noatime)
/dev/sdc4 on /classic/a type ext4 (rw,noatime)
/dev/sdc5 on /classic/b type ext4 (rw,noatime)
/dev/sdc6 on /classic/c type ext4 (rw,noatime)
/dev/sdc7 on /home/slitt/mail/Maildir type ext4 (rw,noatime)
/dev/sdc8 on /scratch type ext4 (rw,noatime)
/dev/sdc3 on /inst type ext4 (rw,noatime)
[root@mydesk mnt]#
=

* Everything likely to have multitudes of writes under normal operating
conditions is mounted spinning rust.

* Only 1/5 of the SSD is used, so what few writes there are are
   distributed across lots of space.

* I delete unneeded stuff and fstrim / every few days, so the SSD
   doesn't fill up with erased stuff.

* I expect only 4 years life from any drive, spinning rust or SSD. At
   least half of my disks have blown up within 4 years: That's life. My
   SSD is currently 4 years old.

The OP's situation differs from mine in one major factor: He has no
spinning rust to offload writes to. So he'll use all the great
suggestions in the thread: noatime, put /tmp and logs in RAM
filesystems, fstrim early and often, and load it exclusively with files
it's meant to handle (I think the OP wanted an mp3 juke box).

Some people suggested using a USB thumb drive for temp and often
written files. This is a great idea because you can buy a 64GB thumb
drive for about $20.00 to $30.00 USD, and just throw it away when it
breaks. Keep the music on the SSD for speed and reliability, but if the
music player software happens to write to /tmp, that's on the thumb
drive that gets replaced every couple years.

An internal 1TB SSD can be had for under $150. External for less than
$200. If you buy 1TB and be sure to use only 100GB, follow all the tips
and fstrim every few days, this SSD should last for years. If we assume
that each song is 5MB, you can hold 20,000 songs in 100GB. If for some
reason you need to store more than 100GB, well, that's what spinning
rust is for: Add one.

So it's true, SSDs run fast and wear out faster, but the wear out
faster part is only if you use them the same way you use spinning rust.

  
SteveT


Steve Litt
December 2018 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Everything you say is true Steve... Except for one teeny tiny little thing.

In general people, even engineers, tend to expect storage to behave like storage and not 
require "special" handling.

At a job I was at a couple of years back, the decision was made to swap SSD for spinning rust in an appliance application that was sold to customers for it's high speed.  The use 
case was extreme high speed read/write. It worked REALLY well for that and we got a big boost in perfomance.  After a couple of years in the field, we started to see significantly 
disk higher failure rates than we had with spinning rust... And the customers noticed.  Yeah, Oops!


To contrast that, I have 10K rpm spinning rust that has been in use 
continuously for over a decade, and isn't unusual to see that kind of longevity.

Flash based storage CAN be made to behave, but even then, it will still wear out significantly faster than spinning rust. Generally the failure tends to be catastrophic unless  
utilities to monitor block sparing are used on a regular and on going basis to tell when the unit is approaching that failure point so it can be swapped out before failure.  Those 
utilities tend to be specific to the storage, so it's not like "just run smartmon".


Maybe someday there will be more generalized utilities for that type of 
thing... Not so now.

For now, I know running a Farrari in traffic is a bad idea.  They just don't like that.  
So I choose a vehicle best suited to the work load, not the 

Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Alessandro Selli

Il 03/12/18 12:53, Alessandro Selli ha scritto:
> On 03/12/18 at 11:30, Edward Bartolo wrote:
>> Running "update-rc.d rsyslog disable 2" resulted in error messages
>> like the following:
>>
>> ERROR MESSAGE:
>> insserv: warning: current start runlevel(s) A of script 'rsyslog'
>> overrides LSB defaults B
>>
>> There were four lines with similar text but with A and B as follows:
>> a) A = (3 4 5); B = (2 3 4 5)
>> b) A = (0 1 2 6); B= (0 1 6)
>> c) A = (3 4 5); B = (2 3 4 5)
>> d) A = (0 1 2 6); B = (0 1 6)
>>
>> Is this Ok?
>
>   Yes, they're just warnings (I take the line "ERROR MESSAGE:" line is
> not from the output of update-rc.d).
>
>
>   On my system, for instance:
>
>
> [root@wkstn02 ~]# ls /etc/rc?.d/???atd
> /etc/rc0.d/K01atd  /etc/rc2.d/S03atd  /etc/rc4.d/S03atd  /etc/rc6.d/K01atd
> /etc/rc1.d/K01atd  /etc/rc3.d/S03atd  /etc/rc5.d/S03atd
> [root@wkstn02 ~]# update-rc.d atd disable 2 3
>  * service atd removed from runlevel default
> insserv: warning: current start runlevel(s) (4 5) of script `atd' overrides 
> LSB defaults (2 3 4 5).
> insserv: warning: current stop runlevel(s) (0 1 2 3 6) of script `atd' 
> overrides LSB defaults (0 1 6).
> insserv: warning: script 'savecache' missing LSB tags and overrides
> [root@wkstn02 ~]# ls /etc/rc?.d/???wdm
> /etc/rc0.d/K01wdm  /etc/rc2.d/S04wdm  /etc/rc4.d/S04wdm  /etc/rc6.d/K01wdm
> /etc/rc1.d/K01wdm  /etc/rc3.d/S04wdm  /etc/rc5.d/S04wdm
> [root@wkstn02 ~]# 
>
>
> Please note that the service atd was disabled on runlevels 2 and 3 only.


  Sorry, I issued the wrong command:


[root@wkstn02 ~]# ls /etc/rc?.d/???atd
[root@wkstn02 ~]# 
/etc/rc0.d/K01atd  /etc/rc2.d/K01atd  /etc/rc4.d/S03atd  /etc/rc6.d/K01atd
/etc/rc1.d/K01atd  /etc/rc3.d/K01atd  /etc/rc5.d/S03atd
[root@wkstn02 ~]# 


  To put everything like before:


[root@wkstn02 ~]# update-rc.d atd enable 2 3
 * service atd added to runlevel default
insserv: warning: script 'savecache' missing LSB tags and overrides
[root@wkstn02 ~]# ls /etc/rc?.d/???atd
/etc/rc0.d/K01atd  /etc/rc2.d/S03atd  /etc/rc4.d/S03atd  /etc/rc6.d/K01atd
/etc/rc1.d/K01atd  /etc/rc3.d/S03atd  /etc/rc5.d/S03atd
[root@wkstn02 ~]# 



  Bye,



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Alessandro Selli
On 03/12/18 at 11:30, Edward Bartolo wrote:
> Running "update-rc.d rsyslog disable 2" resulted in error messages
> like the following:
>
> ERROR MESSAGE:
> insserv: warning: current start runlevel(s) A of script 'rsyslog'
> overrides LSB defaults B
>
> There were four lines with similar text but with A and B as follows:
> a) A = (3 4 5); B = (2 3 4 5)
> b) A = (0 1 2 6); B= (0 1 6)
> c) A = (3 4 5); B = (2 3 4 5)
> d) A = (0 1 2 6); B = (0 1 6)
>
> Is this Ok?


  Yes, they're just warnings (I take the line "ERROR MESSAGE:" line is
not from the output of update-rc.d).


  On my system, for instance:


[root@wkstn02 ~]# ls /etc/rc?.d/???atd
/etc/rc0.d/K01atd  /etc/rc2.d/S03atd  /etc/rc4.d/S03atd  /etc/rc6.d/K01atd
/etc/rc1.d/K01atd  /etc/rc3.d/S03atd  /etc/rc5.d/S03atd
[root@wkstn02 ~]# update-rc.d atd disable 2 3
 * service atd removed from runlevel default
insserv: warning: current start runlevel(s) (4 5) of script `atd' overrides LSB 
defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 6) of script `atd' 
overrides LSB defaults (0 1 6).
insserv: warning: script 'savecache' missing LSB tags and overrides
[root@wkstn02 ~]# ls /etc/rc?.d/???wdm
/etc/rc0.d/K01wdm  /etc/rc2.d/S04wdm  /etc/rc4.d/S04wdm  /etc/rc6.d/K01wdm
/etc/rc1.d/K01wdm  /etc/rc3.d/S04wdm  /etc/rc5.d/S04wdm
[root@wkstn02 ~]# 


Please note that the service atd was disabled on runlevels 2 and 3 only.


Running:

update-rc.d atd disable 


would disable atd on all runlevels.



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Lars Noodén
On 12/3/18 1:16 PM, Edward Bartolo wrote:
> Nevermind, I found that prepending a symlink with a 'K' in /etc/rcN.d
> is to disable that script.

See "man update-rc.d" for the official tool for that.

/Lars

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Steve Litt
On Sun, 2 Dec 2018 11:10:20 -0800
Bruce Ferrell  wrote:

 
> Yeah, this IS one of the issues around flash/SSD storage... They run
> fast and wear out faster.

The preceding sentence is true but it's not the whole truth. If one
uses SSD the way they would spinning rust, that being run it 80% to 90%
full, with lots of writes, and expects years of service, one will
likely be disappointed. But there are many situations in which SSD has
sufficient lifetime.

Let me start with my setup:

=
[root@mydesk mnt]# mount | grep sda
/dev/sda1 on / type ext4 (rw,noatime)
[root@mydesk mnt]# df -h /
Filesystem  Size  Used Avail Use% Mounted on
/dev/sda1   220G   29G  181G  14% /
[root@mydesk mnt]# mount | grep "/dev/sd"
/dev/sda1 on / type ext4 (rw,noatime)
/dev/sdb1 on /boot type ext4 (rw,noatime)
/dev/sdb7 on /tmp type ext4 (rw,noatime)
/dev/sdb6 on /var type ext4 (rw,noatime)
/dev/sdb8 on /run type ext4 (rw,noatime)
/dev/sdc9 on /home type ext4 (rw,noatime)
/dev/sdc1 on /s type ext4 (rw,noatime)
/dev/sdc2 on /d type ext4 (rw,noatime)
/dev/sdc4 on /classic/a type ext4 (rw,noatime)
/dev/sdc5 on /classic/b type ext4 (rw,noatime)
/dev/sdc6 on /classic/c type ext4 (rw,noatime)
/dev/sdc7 on /home/slitt/mail/Maildir type ext4 (rw,noatime)
/dev/sdc8 on /scratch type ext4 (rw,noatime)
/dev/sdc3 on /inst type ext4 (rw,noatime)
[root@mydesk mnt]#
=

* Everything likely to have multitudes of writes under normal operating
conditions is mounted spinning rust.

* Only 1/5 of the SSD is used, so what few writes there are are
  distributed across lots of space.

* I delete unneeded stuff and fstrim / every few days, so the SSD
  doesn't fill up with erased stuff.

* I expect only 4 years life from any drive, spinning rust or SSD. At
  least half of my disks have blown up within 4 years: That's life. My
  SSD is currently 4 years old.

The OP's situation differs from mine in one major factor: He has no
spinning rust to offload writes to. So he'll use all the great
suggestions in the thread: noatime, put /tmp and logs in RAM
filesystems, fstrim early and often, and load it exclusively with files
it's meant to handle (I think the OP wanted an mp3 juke box).

Some people suggested using a USB thumb drive for temp and often
written files. This is a great idea because you can buy a 64GB thumb
drive for about $20.00 to $30.00 USD, and just throw it away when it
breaks. Keep the music on the SSD for speed and reliability, but if the
music player software happens to write to /tmp, that's on the thumb
drive that gets replaced every couple years.

An internal 1TB SSD can be had for under $150. External for less than
$200. If you buy 1TB and be sure to use only 100GB, follow all the tips
and fstrim every few days, this SSD should last for years. If we assume
that each song is 5MB, you can hold 20,000 songs in 100GB. If for some
reason you need to store more than 100GB, well, that's what spinning
rust is for: Add one.

So it's true, SSDs run fast and wear out faster, but the wear out
faster part is only if you use them the same way you use spinning rust.

 
SteveT

Steve Litt 
December 2018 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Edward Bartolo
Nevermind, I found that prepending a symlink with a 'K' in /etc/rcN.d
is to disable that script.

Thanks everyone, especially Dr Klepp.

-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
If you cannot make abstructions about details you do not understand
the concepts underlying them.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Edward Bartolo
Running "update-rc.d rsyslog disable 2" resulted in error messages
like the following:

ERROR MESSAGE:
insserv: warning: current start runlevel(s) A of script 'rsyslog'
overrides LSB defaults B

There were four lines with similar text but with A and B as follows:
a) A = (3 4 5); B = (2 3 4 5)
b) A = (0 1 2 6); B= (0 1 6)
c) A = (3 4 5); B = (2 3 4 5)
d) A = (0 1 2 6); B = (0 1 6)

Is this Ok?

Inspecting /etc/rcN.d, I found the rsyslog links are now prepended with a K.

Thanks for your helpful replies.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Alessandro Selli
On 03/12/18 at 10:50, Adam Borowski wrote:
> On Mon, Dec 03, 2018 at 10:33:44AM +0100, Alessandro Selli wrote:
>> On 03/12/18 at 10:05, Adam Borowski wrote:
>>> realtime greatly reduces atime writes, but it's still too much.
>>   I wouldn't say so.  Since relatime updates atime only relative to the
>> present ctime and mtime, it's only changed when one of those two is
>> changed.  That is, updating atime does not require a separate write
>> operation.
> That was the original design -- but alas, it was later changed so the atime
> is updated at least once a day.


  My experience is inconsistent with what you write:


[alessandro@wkstn02 ~]$ mount | grep ' on /home '
/dev/mapper/part6_crypt_home on /home type ext4 (rw,relatime,nobarrier)
[alessandro@wkstn02 ~]$ stat .xsession-errors.old
  File: .xsession-errors.old
  Size: 47036242Blocks: 91880  IO Block: 4096   regular file
Device: fd02h/64770dInode: 655383  Links: 1
Access: (0600/-rw---)  Uid: ( 1000/ alessandro)   Gid: ( 1000/ alessandro)
Access: 2018-07-06 13:22:22.312846358 +0200
Modify: 2018-07-06 13:08:36.392798307 +0200
Change: 2018-07-06 13:22:17.149512721 +0200
 Birth: -
[alessandro@wkstn02 ~]$ date
Mon Dec  3 11:18:47 CET 2018
[alessandro@wkstn02 ~]$ uname -r
4.19.5.wkstn02-0
[alessandro@wkstn02 ~]$ 
 

[...]

> Every inode has to be updated.


  Only when it has to be updated.  That is, only when attributes or data
must be.



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Rick Moen
Quoting Alessandro Selli (alessandrose...@linux.com):

>   Good idea.

Well, in the name of international amity

# touch NIENTE_E_MONTATO_QUI
# chattr +i NIENTE_E_MONTATO_QUI

;->

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Adam Borowski
On Mon, Dec 03, 2018 at 10:33:44AM +0100, Alessandro Selli wrote:
> On 03/12/18 at 10:05, Adam Borowski wrote:
> > realtime greatly reduces atime writes, but it's still too much.
> 
>   I wouldn't say so.  Since relatime updates atime only relative to the
> present ctime and mtime, it's only changed when one of those two is
> changed.  That is, updating atime does not require a separate write
> operation.

That was the original design -- but alas, it was later changed so the atime
is updated at least once a day.

> >  Case in
> > point: it's the likely culprit for wasting the SD card that started this
> > thread (on a mostly-read load).
> 
> 
> if that filesystem was mounted with the relatime option (or with no
> option at all, since relatime is the default), then it's very unlikely
> it caused any more writes that if it was fully disabled.

You still rewrite every inode once per day.

> >  And, update frequency of 1/day happens to
> > match the typical backup schedule, making it ruin snapshots just the same
> > as strictatime would.
> 
>   Uh?  How can atime "ruin snapshots"?

Every inode has to be updated.  That causes a lot of metadata churn, and
even takes significant space.  Changing this single number tends to cost
far more than a page worth of space -- usual snapshot tools (btrfs, lvm,
etc) CoW more than just the inode.  Thus, for some common loads we're
looking at 5% wasted disk space just for atimes.

> > So it's time to kill the nasty thing.
> 
>   If only it was any nasty.


Some folks say systemd isn't nasty.



Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Ivan was a worldly man: born in St. Petersburg, raised in
⢿⡄⠘⠷⠚⠋⠀ Petrograd, lived most of his life in Leningrad, then returned
⠈⠳⣄ to the city of his birth to die.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Alessandro Selli
On 03/12/18 at 10:05, Adam Borowski wrote:
> realtime greatly reduces atime writes, but it's still too much.


  I wouldn't say so.  Since relatime updates atime only relative to the
present ctime and mtime, it's only changed when one of those two is
changed.  That is, updating atime does not require a separate write
operation.  For this reason:


>  Case in
> point: it's the likely culprit for wasting the SD card that started this
> thread (on a mostly-read load).


if that filesystem was mounted with the relatime option (or with no
option at all, since relatime is the default), then it's very unlikely
it caused any more writes that if it was fully disabled.


>  And, update frequency of 1/day happens to
> match the typical backup schedule, making it ruin snapshots just the same
> as strictatime would.


  Uh?  How can atime "ruin snapshots"?


> So it's time to kill the nasty thing.


  If only it was any nasty.



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread g4sra

http://hacks.slashdirt.org/sw/flashybrid/

Someone with non-systemd will have to suck it and see.
That someone will be me if no-one else has done it by Valentines Day.


On 02/12/2018 23:11, Alessandro Selli wrote:
> OnIl 02/12/18 at 22:58, g4sra wrote:
>> I have found flashybrid extremely beneficial in the past, on switching
>> from Debian to Devuan Ascii it appears not to be in the repository, is
>> it in Beowulf ?. I am not aware of any dependencies it has on 
>> systemd.
> 
> 
>   It was removed from Debian on January 2017:
> 
> https://tracker.debian.org/pkg/flashybrid
> 
> 
>   Looks like development upstream stopped 11 years ago:
> 
> https://github.com/elcuco/flashybrid
> 
> Latest commit 2a0d291
> 
> on 23 Sep 2007
> 
> 
> 
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> 

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-03 Thread Adam Borowski
On Mon, Dec 03, 2018 at 02:05:29PM +1100, Erik Christiansen wrote:
> On 03.12.18 00:47, Adam Borowski wrote:
> > On Sun, Dec 02, 2018 at 11:53:39PM +0100, Alessandro Selli wrote:
> > > On 02/12/18 at 17:23, Adam Borowski wrote:
> > > > You'd want to set noatime on every machine
> > > > you control.
> > > 
> > > 
> > >   Some mail servers and clients do use it to determine if a mail was
> > > read after it arrived.  In this case, it'd be better to have it set on 
> > > /var.
> 
> TL;DR: Use relatime there, as noatime will break mutt.

Hmm...
https://gitlab.com/muttmua/mutt/commit/489a1c394c29e4b12b705b62da413f322406326f
https://github.com/neomutt/neomutt/commit/816095bfdb72caafd8845e8fb28cbc8c6afc114f

> > That's no more.  And, let me clarify: atime was used for mail:
> > * only with mbox (Maildir never suffered from this issue)
> > * only on the local machine
> > * only by the shell to say "You have new mail." vs "You have mail."
> >   -- not even by the mail client
> 
> Not true, according to the on-line manual for my current mutt
> installation:
> 
> » Other possible causes of Mutt not detecting new mail in these folders
> are backup tools (updating access times) or filesystems mounted without
> access time update support (for Linux systems, see the relatime
> option).«

In the very post you're responding to, I started with "That's no more.".

> > So the whole effort gave you just a single word in a message, that many
> > people even didn't notice.
> > 
> > And, popular local mail clients are already patched to update atime
> > explicitly.
> > 
> > Ie, atime for mail is an ex-reason.
> 
> A fine assertion, but wiser is to check the facts.

And even wiser to actually change things you don't like. :)

> It would seem then, that noatime will break mutt, but relatime is OK,
> and is now the default. IIUC.

realtime greatly reduces atime writes, but it's still too much.  Case in
point: it's the likely culprit for wasting the SD card that started this
thread (on a mostly-read load).  And, update frequency of 1/day happens to
match the typical backup schedule, making it ruin snapshots just the same
as strictatime would.

So it's time to kill the nasty thing.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Ivan was a wordly man: born in St. Petersburg, raised in
⢿⡄⠘⠷⠚⠋⠀ Petrograd, lived most of his life in Leningrad, then returned
⠈⠳⣄ to the city of his birth to die.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Erik Christiansen
On 03.12.18 00:47, Adam Borowski wrote:
> On Sun, Dec 02, 2018 at 11:53:39PM +0100, Alessandro Selli wrote:
> > On 02/12/18 at 17:23, Adam Borowski wrote:
> > > You'd want to set noatime on every machine
> > > you control.
> > 
> > 
> >   Some mail servers and clients do use it to determine if a mail was
> > read after it arrived.  In this case, it'd be better to have it set on /var.

TL;DR: Use relatime there, as noatime will break mutt.

> That's no more.  And, let me clarify: atime was used for mail:
> * only with mbox (Maildir never suffered from this issue)
> * only on the local machine
> * only by the shell to say "You have new mail." vs "You have mail."
>   -- not even by the mail client

Not true, according to the on-line manual for my current mutt
installation:

» Other possible causes of Mutt not detecting new mail in these folders
are backup tools (updating access times) or filesystems mounted without
access time update support (for Linux systems, see the relatime
option).«

> So the whole effort gave you just a single word in a message, that many
> people even didn't notice.
> 
> And, popular local mail clients are already patched to update atime
> explicitly.
> 
> Ie, atime for mail is an ex-reason.

A fine assertion, but wiser is to check the facts. A quick glance in "man
mount" shows:

»relatime
  Update inode access times relative to modify or change time.  Access
  time  is  only updated  if  the previous access time was earlier than
  the current modify or change time. (Similar to noatime, but doesn't
  break mutt or other applications  that  need to know if a file has
  been read since the last time it was modified.)

  Since  Linux  2.6.30,  the  kernel defaults to the behavior provided
  by this option (unless noatime was  specified), and the strictatime
  option is required  to  obtain traditional semantics. In addition,
  since Linux 2.6.30, the file's last access time is always  updated  if
  it  is more than 1 day old.
«

It would seem then, that noatime will break mutt, but relatime is OK,
and is now the default. IIUC.

Erik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Adam Borowski
On Sun, Dec 02, 2018 at 11:53:39PM +0100, Alessandro Selli wrote:
> On 02/12/18 at 17:23, Adam Borowski wrote:
> > You'd want to set noatime on every machine
> > you control.
> 
> 
>   Some mail servers and clients do use it to determine if a mail was
> read after it arrived.  In this case, it'd be better to have it set on /var.

That's no more.  And, let me clarify: atime was used for mail:
* only with mbox (Maildir never suffered from this issue)
* only on the local machine
* only by the shell to say "You have new mail." vs "You have mail."
  -- not even by the mail client

So the whole effort gave you just a single word in a message, that many
people even didn't notice.

And, popular local mail clients are already patched to update atime
explicitly.

Ie, atime for mail is an ex-reason.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Ivan was a wordly man: born in St. Petersburg, raised in
⢿⡄⠘⠷⠚⠋⠀ Petrograd, lived most of his life in Leningrad, then returned
⠈⠳⣄ to the city of his birth to die.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Alessandro Selli
OnIl 02/12/18 at 22:58, g4sra wrote:
> I have found flashybrid extremely beneficial in the past, on switching
> from Debian to Devuan Ascii it appears not to be in the repository, is
> it in Beowulf ?. I am not aware of any dependencies it has on 
> systemd.


  It was removed from Debian on January 2017:

https://tracker.debian.org/pkg/flashybrid


  Looks like development upstream stopped 11 years ago:

https://github.com/elcuco/flashybrid

Latest commit 2a0d291

on 23 Sep 2007


-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Alessandro Selli
On 02/12/18 at 21:04, Rick Moen wrote:
> I also recommend (while in single-user mode as the root user) doing this
> in each of your system's mountpoint directories:
>
> # touch NOTHING_IS_MOUNTED_HERE
> # chattr +i NOTHING_IS_MOUNTED_HERE
>
> That's saved me confusion quite a few times when I'm puzzled about one
> of those directories unexpectedly lacking the expected files.


  Good idea.  To address the same problem I often set the unmounted
mountpoint chmod 0.  However, I noticed this setting causes sshfs to
fail with the message:

fuse: failed to open mountpoint for reading: Permission denied


Your method does make sense.  It even works for root!  ☺



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Alessandro Selli
On 02/12/18 at 17:23, Adam Borowski wrote:
> You'd want to set noatime on every machine
> you control.


  Some mail servers and clients do use it to determine if a mail was
read after it arrived.  In this case, it'd be better to have it set on /var.



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Alessandro Selli
On 02/12/18 at 21:07, Dr. Nikolaus Klepp wrote:
> Am Sonntag, 2. Dezember 2018 schrieb Edward Bartolo:
>> On 02/12/2018, Dr. Nikolaus Klepp  wrote:
>> [...]
>>> Do not use swap.
>>> Use ramfs for /tmp and /var/tmp.
>>> Turn off logging.
>>> Mount / readonly.
>>> Use "noatime" mountoption.
>>>
>> How can I use ramfs for /tmp and /var/tmp?
> In your /etc/fstab:
> tmpfs   /tmptmpfs   relatime0   1
> tmpfs   /var/tmptmpfs   relatime0   1


  You'd better specify the mode=1777 mount option, to make sure the tmp
directory is going to have the Deletion Restriction Bit set.


>> And, also turn off logging?
> If you like a logfile that's available till shutdown:
> tmpfs   /var/logtmpfs   relatime0   1
>
> Or disable rsyslogd .. I think it was this sequence:
> # update-rc.d rsyslog disable 2
> # update-rc.d rsyslog disable 3
> # update-rc.d rsyslog disable 4
> # update-rc.d rsyslog disable 5

update-rc.d rsyslog disable

will work for all runlevels.


-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread golinux

It appears not:

https://pkginfo.devuan.org/cgi-bin/d1pkgweb-query?search=flashybrid=any


On 2018-12-02 15:58, g4sra wrote:

I have found flashybrid extremely beneficial in the past, on switching
from Debian to Devuan Ascii it appears not to be in the repository, is
it in Beowulf ?. I am not aware of any dependencies it has on 
systemd.

On 02/12/2018 10:41, Edward Bartolo wrote:

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.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread g4sra
I have found flashybrid extremely beneficial in the past, on switching
from Debian to Devuan Ascii it appears not to be in the repository, is
it in Beowulf ?. I am not aware of any dependencies it has on 
systemd.

On 02/12/2018 10:41, Edward Bartolo wrote:
> 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.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> 

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Gregory Nowak
On Sun, Dec 02, 2018 at 11:41:48AM +0100, Edward Bartolo wrote:
> 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.
> 

I have an rpi2 which I've been running for almost three years now, and
which stays up 24/7. I run fstrim once a week from a cron job, and the
sd card is still doing fine as far as I can tell. While this doesn't
minimize write cycles, it does reduce wear on the card by distributing
writes to different sectors. The other suggestions in this thread are
also good ones.

Greg


-- 
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-mana...@eu.org
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Dr. Nikolaus Klepp
Am Sonntag, 2. Dezember 2018 schrieb Edward Bartolo:
> On 02/12/2018, Dr. Nikolaus Klepp  wrote:
> [...]
> >
> > Do not use swap.
> > Use ramfs for /tmp and /var/tmp.
> > Turn off logging.
> > Mount / readonly.
> > Use "noatime" mountoption.
> >
> 
> How can I use ramfs for /tmp and /var/tmp?

In your /etc/fstab:
tmpfs   /tmptmpfs   relatime0   1
tmpfs   /var/tmptmpfs   relatime0   1



> And, also turn off logging?
If you like a logfile that's available till shutdown:
tmpfs   /var/logtmpfs   relatime0   1

Or disable rsyslogd .. I think it was this sequence:
# update-rc.d rsyslog disable 2
# update-rc.d rsyslog disable 3
# update-rc.d rsyslog disable 4
# update-rc.d rsyslog disable 5



> 
> Can anyone post a sample /etc/fstab as a hint as to what should it look like?
> 
> Thanks.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> 



-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Rick Moen
Quoting Alessandro Selli (alessandrose...@linux.com):

> All you need to do is putting this line in /etc/fstab:
> 
> tmpfs   /tmp    tmpfs   defaults,mode=1777  0 0

Seriously, yes, everyone running a system _just_ on flash media ought to 
be doing this and similar measures to reduce wear on the mass storage.

>   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).

I also recommend (while in single-user mode as the root user) doing this
in each of your system's mountpoint directories:

# touch NOTHING_IS_MOUNTED_HERE
# chattr +i NOTHING_IS_MOUNTED_HERE

That's saved me confusion quite a few times when I'm puzzled about one
of those directories unexpectedly lacking the expected files.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Rod Rodolico
There is an old article at

http://wiki.linuxservertech.com/index.php?action=artikel=9=173

which may help you. I wrote it when I was booting servers from USB
Thumbdrives. Again, it is an older article so use some caution when you
review it. But, I have servers using thumbdrives that have been running
for 5+ years.

Rod

On 12/02/2018 04:41 AM, Edward Bartolo wrote:
> 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.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> 

-- 
Rod Rodolico
Daily Data, Inc.
POB 140465
Dallas TX 75214-0465 US
http://dailydata.net
214.827.2170
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Bruce Ferrell

On 12/2/18 2:41 AM, Edward Bartolo wrote:

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.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Yeah, this IS one of the issues around flash/SSD storage... They run fast and 
wear out faster.

My suggestion for a Raspberry PI is to use a USB disk and use the info at this 
link:

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md

That will allow you to run Devuan from a USB drive attached to the PI and 
completely avoid the whole flash memory issue.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Edward Bartolo
On 02/12/2018, Dr. Nikolaus Klepp  wrote:
[...]
>
> Do not use swap.
> Use ramfs for /tmp and /var/tmp.
> Turn off logging.
> Mount / readonly.
> Use "noatime" mountoption.
>

How can I use ramfs for /tmp and /var/tmp?
And, also turn off logging?

Can anyone post a sample /etc/fstab as a hint as to what should it look like?

Thanks.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Adam Borowski
On Sun, Dec 02, 2018 at 12:06:03PM +0100, info at smallinnovations dot nl wrote:
> On 02-12-18 11:41, Edward Bartolo wrote:
> > 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.

> One dramatically sdcard saving option is to use noatime when mounting
> your sdcard in /etc/fstab like
> 
> /dev/mmcblk0p2  / ext4 defaults,noatime 0 0

Keeping the very concept of atime is _sabotage_.  It was one of the ideas
made when the world was young and when I/O was cheap compared to other
performance-related components.  You'd want to set noatime on every machine
you control.

Especially on:
* media with limited write cycles (<- you are here)
* thin storage
* CoW disk images
* filesystems with snapshots
* read caching

> It disables writing a timestamp when a file or directory has been
> accessed. Other options i know of are using JFFS2 made for flash kind of
> storage.

These days, I'd recommend f2fs -- much newer, faster, and doesn't differ
from a regular filesystem from a naive user's point of view.  And staying
naive saves your time.

> Using aufs or unionfs which in fact create a readonly fs with
> changes in RAM which can be write back to disk when your system shutdown
> in a orderly fashion.

Pretty risky, and requires non-negligible human effort.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Ivan was a wordly man: born in St. Petersburg, raised in
⢿⡄⠘⠷⠚⠋⠀ Petrograd, lived most of his life in Leningrad, then returned
⠈⠳⣄ to the city of his birth to die.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Arnt Karlsen
On Sun, 2 Dec 2018 12:16:34 +0100, Dr. wrote in message 
<201812021216.34883.dr.kl...@gmx.at>:

> Am Sonntag, 2. Dezember 2018 schrieb Edward Bartolo:
> > 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.  
> 
> Do not use swap. 
> Use ramfs for /tmp and /var/tmp. 
> Turn off logging. 

...or log to a log server.

> Mount / readonly. 
> Use "noatime" mountoption.


-- 
..med vennlig hilsen = with Kind Regards from Arnt Karlsen
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Alessandro Selli
On 02/12/18 on 13:08, info at smallinnovations dot nl wrote:
>
> If you disable journalling on ext4 you can just as well mount it with
> ext2 afaik.
>
> Grtz
>
> Nick
>

  No, ext2 is significantly slower than a journal-less ext4 filesystem.

  This must be due mainly to the fact that ext4 uses an improved
block-allocator algorithm, one that merges the allocation of a series of
blocks to the same file in one run instead of $FILE_SIZE/$BLOCK_SIZE
runs.  I recently run a comparison test on an old 1GB USB pendrive
connected to a USB-2 port, here you are with the log:


[alessandro@wkstn02 ~]$ cat bin/bomb_filesystem.sh
#!/bin/dash

TESTROOT=/mnt/loop
MAXDIRS=100
MAXFILES=10

if mountpoint --quiet "$TESTROOT"
then I=0
 while test "$I" -lt "$MAXDIRS"
 do mkdir "$TESTROOT/Dir_$I" || break
    I=$((I+1))
 done
 I=0
 while test $I -lt "$MAXDIRS"
 do J=0
    while test $J -lt "$MAXFILES"
    do dd count=$((1024+16*J)) if=/dev/zero
of="$TESTROOT/Dir_$I/file_$J"
   J=$((J+1))
    done
    I=$((I+1))
 done
else echo "ERROR: \"$TESTROOT\" does not exist or is not a mountpoint" >&2
 exit 1
fi


[root@wkstn02 ~]# mkfs.ext2 /dev/sdb
[root@wkstn02 ~]# mount /dev/sdb /mnt/loop
[root@wkstn02 ~]# chown alessandro /mnt/loop


[alessandro@wkstn02 ~]$ time (bomb_filesystem.sh ; sync)

real    10m35,149s
user    0m1,042s
sys 0m1,921s

[alessandro@wkstn02 ~]$ df /mnt/loop
File system Size Used Avail Use% Mounted on
/dev/sdb    953M  541M    364M  60% /mnt/loop


[alessandro@wkstn02 ~]$ time (\rm -r /mnt/loop/Dir_* ; sync)

real    0m2,133s
user    0m0,009s
sys 0m0,076s

[alessandro@wkstn02 ~]$ time (bomb_filesystem.sh ; sync)

real    11m10,261s
user    0m0,961s
sys 0m2,109s


[root@wkstn02 ~]# umount /dev/sdb
[root@wkstn02 ~]# mkfs.ext4 -O ^has_journal /dev/sdb
[root@wkstn02 ~]# mount /dev/sdb /mnt/loop
[root@wkstn02 ~]# chown alessandro /mnt/loop


[alessandro@wkstn02 ~]$ time (bomb_filesystem.sh ; sync)

real    3m39,434s
user    0m1,024s
sys 0m1,950s

[alessandro@wkstn02 ~]$ time (\rm -r /mnt/loop/Dir_* ; sync)

real    0m2,486s
user    0m0,002s
sys 0m0,082s


 

-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread info at smallinnovations dot nl
On 02-12-18 13:01, Alessandro Selli wrote:
>
>
> 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 
> VOIP SIP: dhatarat...@ekiga.net
> Chiave firma e cifratura PGP/GPG signing and encoding key:
>   BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE

If you disable journalling on ext4 you can just as well mount it with
ext2 afaik.

Grtz

Nick




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Lars Noodén
On 12/2/18 12:41 PM, Edward Bartolo wrote:
> [snip]
> So, the SD CARD, although brand new is now to be thrown away.
> [snip]

Is it still under warranty?  If so you can get a replacement.

In addition to the tips already mentioned, under-provisioning helps a
bit too.

/Lars
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Alessandro Selli

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 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread ael
On Sun, Dec 02, 2018 at 11:41:48AM +0100, Edward Bartolo wrote:
> 
> 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

Just in case you are not aware of this, there is a huge market in fake
and substandard SD cards, often with the firmware modified to
fraudulently claim a larger capacity than the chips actually present.
That said, I don't think that they often fail into a read only mode.
The only time that I encountered that problem, the supplier replaced the
card.

sdtool (https://github.com/BertoldVdb/sdtool) may be useful if you don't
know about it.


I always check incoming cards with f3 (http://oss.digirati.com.br/f3/)
which should detect fraudulent cards. Of course it uses up one
write/erase cycle, but that can't be helped.

So do you know that you have a genuine card purcahsed from a reliable
source?

Again, apologies if this is all old news.

ael

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Dr. Nikolaus Klepp
Am Sonntag, 2. Dezember 2018 schrieb Edward Bartolo:
> 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.

Do not use swap. 
Use ramfs for /tmp and /var/tmp. 
Turn off logging. 
Mount / readonly. 
Use "noatime" mountoption.



-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread info at smallinnovations dot nl
On 02-12-18 11:41, Edward Bartolo wrote:
> 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.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

One dramatically sdcard saving option is to use noatime when mounting
your sdcard in /etc/fstab like

/dev/mmcblk0p2  / ext4 defaults,noatime 0 0

It disables writing a timestamp when a file or directory has been
accessed. Other options i know of are using JFFS2 made for flash kind of
storage. Using aufs or unionfs which in fact create a readonly fs with
changes in RAM which can be write back to disk when your system shutdown
in a orderly fashion.

Grtz

Nick




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Devuan for Raspberry Pi fried SD CARD.

2018-12-02 Thread Edward Bartolo
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.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng