• Maximising SD Card Life 24/7

    From mm0fmf@3:770/3 to All on Sat Mar 20 11:22:08 2021
    I've used Pi's since as soon as I could buy them but I've never run one
    24/7 before so I'd like to ensure I've done sufficient to maximise SD
    Card life.

    All this PI does is sit accepting SSH connections and acts as a gateway
    to allow tunnelling or SOCKS5 proxying. It also lets me send WOL magic
    packets to other local computers to wake them up so I don't need to
    leave those computers running 24/7. That's all working fine.

    However, I'd like to maximise the SC Card life where possible so I have
    mounted a few places onto tmpfs to minimise writes to the card. I have a
    couple of cron jobs running that tickle the dynamic DNS provider and
    another that reboots the Pi every 24 hours as a crude and simple way of ensuring not the tmpfs log space doesn't fill.

    The following are mounted onto tmpfs:

    tmpfs on /tmp type tmpfs (rw,nosuid,noatime,size=102400k)
    tmpfs on /var/spool/mqueue type tmpfs (rw,nosuid,noatime,size=30720k,mode=700,gid=12)
    tmpfs on /var/tmp type tmpfs (rw,nosuid,noatime,size=30720k)
    tmpfs on /var/log type tmpfs (rw,nosuid,noatime,size=102400k,mode=755)

    There is no swap running as all this does is SSH connection handling.

    I have plenty of old small (8Gb) SD Cards to replace the one in use but
    I don't want to have to be copying a new one more often than needed.

    Is there anything else that really needs doing or is this sufficient?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Elvidge@3:770/3 to All on Sat Mar 20 14:01:49 2021
    On 20/03/2021 11:22 am, mm0fmf wrote:
    I've used Pi's since as soon as I could buy them but I've never run one
    24/7 before so I'd like to ensure I've done sufficient to maximise SD
    Card life.

    All this PI does is sit accepting SSH connections and acts as a gateway
    to allow tunnelling or SOCKS5 proxying. It also lets me send WOL magic packets to other local computers to wake them up so I don't need to
    leave those computers running 24/7. That's all working fine.

    However, I'd like to maximise the SC Card life where possible so I have mounted a few places onto tmpfs to minimise writes to the card. I have a couple of cron jobs running that tickle the dynamic DNS provider and
    another that reboots the Pi every 24 hours as a crude and simple way of ensuring not the tmpfs log space doesn't fill.

    The following are mounted onto tmpfs:

    tmpfs on /tmp type tmpfs (rw,nosuid,noatime,size=102400k)
    tmpfs on /var/spool/mqueue type tmpfs (rw,nosuid,noatime,size=30720k,mode=700,gid=12)
    tmpfs on /var/tmp type tmpfs (rw,nosuid,noatime,size=30720k)
    tmpfs on /var/log type tmpfs (rw,nosuid,noatime,size=102400k,mode=755)

    There is no swap running as all this does is SSH connection handling.

    I have plenty of old small (8Gb) SD Cards to replace the one in use but
    I don't want to have to be copying a new one more often than needed.

    Is there anything else that really needs doing or is this sufficient?



    If you can, put the root filesystem on a USB connected thumbdrive or SSD.


    --
    Chris Elvidge
    England

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to Craig Dooley on Sat Mar 20 16:29:04 2021
    On 19.3.21 23.03, Craig Dooley wrote:
    BY: mm0fmf(3:770/3)


    I've used Pi's since as soon as I could buy them but I've never run one 24/7 before so I'd like to ensure I've done sufficient to maximise SD
    Card life.

    Not sure what Pi you have, but if it's a 4, have you thought about going with USB instead of SD card? I've currently got my BBS running on a RPi 4 with everything on a USB drive. 128 GB flash drive the size of my thumbnail plugged
    into one of the USB 3.0 ports. Works fine, and I don't have to worry about read/write cycles.

    -Craig


    I'm just curious: What makes a Flash memory on an USB interface
    more durable than a Flash memory on a SD card?

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mm0fmf@3:770/3 to Craig Dooley on Sat Mar 20 14:28:10 2021
    On 19/03/2021 21:03, Craig Dooley wrote:
    BY: mm0fmf(3:770/3)


    I've used Pi's since as soon as I could buy them but I've never run one 24/7 before so I'd like to ensure I've done sufficient to maximise SD
    Card life.

    Not sure what Pi you have, but if it's a 4, have you thought about going with USB instead of SD card? I've currently got my BBS running on a RPi 4 with everything on a USB drive. 128 GB flash drive the size of my thumbnail plugged
    into one of the USB 3.0 ports. Works fine, and I don't have to worry about read/write cycles.

    -Craig


    I meant to say it's a Pi Zero W but forgot.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jim Jackson@3:770/3 to Craig Dooley on Sat Mar 20 16:04:32 2021
    On 2021-03-19, Craig Dooley <nospam.Craig.Dooley@f126.n123.z1.fidonet.org> wrote:
    BY: mm0fmf(3:770/3)


    I've used Pi's since as soon as I could buy them but I've never run one 24/7 before so I'd like to ensure I've done sufficient to maximise SD
    Card life.

    Not sure what Pi you have, but if it's a 4, have you thought about going with USB instead of SD card? I've currently got my BBS running on a RPi 4 with everything on a USB drive. 128 GB flash drive the size of my thumbnail plugged
    into one of the USB 3.0 ports. Works fine, and I don't have to worry about read/write cycles.

    It's flash whether the interface is SD or USB - there is a write limit!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mm0fmf@3:770/3 to Tauno Voipio on Sat Mar 20 16:21:48 2021
    On 20/03/2021 14:29, Tauno Voipio wrote:
    On 19.3.21 23.03, Craig Dooley wrote:
    BY: mm0fmf(3:770/3)


    I've used Pi's since as soon as I could buy them but I've never run
    one
    24/7 before so I'd like to ensure I've done sufficient to maximise SD
    Card life.

    Not sure what Pi you have, but if it's a 4, have you thought about
    going with
    USB instead of SD card?  I've currently got my BBS running on a RPi 4
    with
    everything on a USB drive.  128 GB flash drive the size of my
    thumbnail plugged
    into one of the USB 3.0 ports.  Works fine, and I don't have to worry
    about
    read/write cycles.

    -Craig


    I'm just curious: What makes a Flash memory on an USB interface
    more durable than a Flash memory on a SD card?


    I don't know.

    My day job is writing semiconductor models (think QEMU-like). We've
    done loads of NAND, NOR, UFS, eMMC, SdCard/MMC device and controllers, MobileStorage, NVMe models for our customers with varying levels of
    realism. Our customers have never been keen to discuss wear levelling,
    it's considered commercially confidential by them and isn't released
    even under NDA.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Tauno Voipio on Sat Mar 20 16:53:40 2021
    On Sat, 20 Mar 2021 16:29:04 +0200
    Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:

    I'm just curious: What makes a Flash memory on an USB interface
    more durable than a Flash memory on a SD card?

    Nothing in principle, except the quality and type of the flash
    memory (there are a lot of types) and the on-board controller. All flash
    memory (including SLC SSDs) are subject to write wear due to the mechanism
    and write amplification due to large block sizes - how quickly they wear depends on the flash technology used, the sophistication of the controller (wear levelling, TRIM etc) and the quality of manufacture. Micro SD cards
    tend to be towards the bottom end of everything - NVMe SSDs sold for data centre use tend to be towards the top.

    USB sticks are very variable IME but the good ones are a lot better than any micro SD card.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Jim Jackson on Sat Mar 20 17:07:08 2021
    On Sat, 20 Mar 2021 16:04:32 +0000, Jim Jackson wrote:

    On 2021-03-19, Craig Dooley
    <nospam.Craig.Dooley@f126.n123.z1.fidonet.org> wrote:
    BY: mm0fmf(3:770/3)


    I've used Pi's since as soon as I could buy them but I've never run
    one m> 24/7 before so I'd like to ensure I've done sufficient to
    maximise SD m> Card life.

    Not sure what Pi you have, but if it's a 4, have you thought about
    going with USB instead of SD card? I've currently got my BBS running
    on a RPi 4 with everything on a USB drive. 128 GB flash drive the size
    of my thumbnail plugged into one of the USB 3.0 ports. Works fine, and
    I don't have to worry about read/write cycles.

    It's flash whether the interface is SD or USB - there is a write limit!

    IIRC the on-device controller on any type of SSD is a lot smarter than
    the ones fitted to a built-down-to-price semi-disposable SD card, and one
    place this shows up is in dealing with card wear, i.e EEPROM ageing
    defects. I don't think any SD card can remove a bad memory page from the
    active pages map and replace it with one of the spares - something most
    SSDs can do - because for starters SD memory pages are relatively large
    (4Kb?) and pricing says they don't have any list of spare pages or a
    controller that could handle remapping.

    I'm told that the better (enterprise grade) SSDs will drop into read-only
    mode when they find a prefefined unfixable number of defects. This means
    the data content can be retrieved without errors. Lower spec SSDs and all
    SD cards will merrily go on writing data well past that point.

    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Craig Dooley on Sat Mar 20 17:13:45 2021
    On Sat, 20 Mar 2021 11:42:38 +1300, Craig Dooley wrote:

    BY: Tauno Voipio(3:770/3)



    I'm just curious: What makes a Flash memory on an USB interface TV>
    more durable than a Flash memory on a SD card?

    I'm not really sure. it's my understanding that SD cards will wear out because of read/write cycles eventually. I've never heard that said of
    a USB flashdrive. But I'm not an expert on either.

    SSDs wear out too - eventually - just the same as an HDD. The difference
    is that SSDs data pages (a) survive many more read/zero/write cycles than
    those in SD cards and (b) have a set of spare data pages that can be
    remapped to replace failing ones. Cheap as chips SD cards don't do this
    either.


    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Folderol@3:770/3 to Nikolaj Lazic on Sat Mar 20 20:59:31 2021
    On Sat, 20 Mar 2021 20:47:39 -0000 (UTC)
    Nikolaj Lazic <nlazicBEZ_OVOGA@mudrac.ffzg.hr> wrote:

    Dana Sat, 20 Mar 2021 11:42:38 +1300, Craig Dooley <nospam.Craig.Dooley@f126.n123.z1.fidonet.org> napis'o:
    BY: Tauno Voipio(3:770/3)



    I'm just curious: What makes a Flash memory on an USB interface
    more durable than a Flash memory on a SD card?

    I'm not really sure. it's my understanding that SD cards will wear out because
    of read/write cycles eventually. I've never heard that said of a USB
    flashdrive. But I'm not an expert on either.

    I've got few of USB flash drives that died. Or got read only.

    I haven't got a singe failed one, and my oldest (still in use) is a massive 128M - from the days when that was the biggest you could get!

    I particularly like that it has a mechanical write protect switch and slim
    but tough case. I can't tell you the make - all the writing has long since worn away!

    --
    W J G

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Nikolaj Lazic@3:770/3 to All on Sat Mar 20 20:47:39 2021
    Dana Sat, 20 Mar 2021 11:42:38 +1300, Craig Dooley <nospam.Craig.Dooley@f126.n123.z1.fidonet.org> napis'o:
    BY: Tauno Voipio(3:770/3)



    I'm just curious: What makes a Flash memory on an USB interface
    more durable than a Flash memory on a SD card?

    I'm not really sure. it's my understanding that SD cards will wear out because
    of read/write cycles eventually. I've never heard that said of a USB flashdrive. But I'm not an expert on either.

    I've got few of USB flash drives that died. Or got read only.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mm0fmf@3:770/3 to Jim Jackson on Sat Mar 20 21:55:48 2021
    On 20/03/2021 11:35, Jim Jackson wrote:
    It sounds like you usage is a fit for running with the root file system readonly

    Thanks. I found an article from 2016 about making root read only FS for
    a Pi. I'll give that a test run tomorrow and see how it goes.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to none@invalid.com on Sat Mar 20 23:03:33 2021
    mm0fmf <none@invalid.com> wrote:
    On 20/03/2021 11:35, Jim Jackson wrote:
    It sounds like you usage is a fit for running with the root file system
    readonly

    Thanks. I found an article from 2016 about making root read only FS for
    a Pi. I'll give that a test run tomorrow and see how it goes.

    The "PiCore" version of Tiny Core Linux runs on the Pi with the core
    system entirely in RAM. It should be possible to have that boot from
    a read-only partition, though it might be easiest to remount it
    read-only after booting to avoid modifying the boot scripts.

    By remastering PiCore with all your required software "built-in" it
    would be possible to run everything in RAM and unmount the SD card
    entirely after boot.

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From nev young@3:770/3 to All on Sat Mar 20 23:40:25 2021
    On 20/03/2021 14:28, mm0fmf wrote:
    On 19/03/2021 21:03, Craig Dooley wrote:
    BY: mm0fmf(3:770/3)


    I've used Pi's since as soon as I could buy them but I've never run
    one
    24/7 before so I'd like to ensure I've done sufficient to maximise SD
    Card life.

    Not sure what Pi you have, but if it's a 4, have you thought about
    going with
    USB instead of SD card?  I've currently got my BBS running on a RPi 4
    with
    everything on a USB drive.  128 GB flash drive the size of my
    thumbnail plugged
    into one of the USB 3.0 ports.  Works fine, and I don't have to worry
    about
    read/write cycles.

    -Craig


    I meant to say it's a Pi Zero W but forgot.

    I wouldn't worry about it.
    I have 10 Pi zeros working 24/7 as CCTV cameras.
    Each day they record between 1-5GB of new images recovering space by
    removing images that are a few days old.
    The SD cards (32GB) wear out every 3 or 4 years.

    --
    Nev
    It causes me a great deal of regret and remorse
    that so many people are unable to understand what I write.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)