[plug] Workaround to an OOM

Andrew Cooks acooks at gmail.com
Sat Feb 6 22:23:37 UTC 2016


On Sun, Feb 7, 2016 at 1:40 AM, Brad Campbell <brad at fnarfbargle.com> wrote:

> G'day all,
>
> I have an interesting backup solution at home. I have a WD Mybook Live
> with a 2TB drive. It's based on Debian Squeeze out of the box and the data
> partition is XFS. Back in 2012 I added LUKS encryption to it and moved the
> data partition to Ext4. That slowed the throughput to about 6MB/s but
> ensured if someone broke in and nicked it all the backup data was
> encrypted. It gets a key over the network on boot.
>
> The little box is a 400Mhz PPC with 256MB of ram. This machine has run
> flawlessly for the last 1180 days, but recently started doing something
> peculiar. I tracked it down to the filesystems and decided it was time to
> give it a fsck. The drive holds 60 days hardlinked rotating backups from
> about 15 different partitions, so there are a lot of inodes in use.
> e2fsck is almost immediately killed by the OOM checker.
>
> I tried adding an extra 500MB of swap, and after 2 days of running the
> fsck reached about 30%. I tried setting a scratch dir for e2fsck on the
> root partition, and that ran marginally faster than the swap solution. I
> tried putting the scratch partition on an nfs share, and that was about as
> fast. So approximately 4 days later I still had a partition in need of an
> fsck and was no closer to a finish.
>
> In the end I found a copy of nbd-server for an old Debian squeeze PPC
> distribution (did you know that Debian only maintains archives for i386 &
> x64 for oldoldstable?).
>
> I shared the block device with nbd, linked it up to my desktop and 5 hours
> later had a fsck'd disk I could re-mount and carry on. On my desktop e2fsck
> had about 1.2G resident during the run. No wonder it OOM on the poor NAS
> box.
>
> I thought it worth posting as it seemed a relatively different solution to
> an awkward problem.
>

Thanks for sharing!

It seems like you went through great lengths to avoid putting the drive in
your desktop pc and running fsck there. Was there a technical reason for
that? Did the fsck resolve the initial problem? I'm curious about the
encryption with key-over-network as well.

Please consider doing a lightning talk at the PLUG meeting on Tuesday!


> I really want to upgrade this poor box with something that has aes
> acceleration. Does anyone know of any affordable single board solutions (ie
> < $200) that are fanless? I've seen some nice late model Atom units, but
> they are either $$ or don't have SATA. There are some 64Bit ARM boards
> coming up that tick the boxes, but nothing available off the shelf yet. My
> other option is something like an Intel Nuc, but they are $$ too.


The new APU2 from PC Engines [1] meet the stated requirements, but the
enclosure doesn't have space for a 3.5" SATA drive. If you're willing to
drill a couple of holes in the APU enclosure you could mount the drive on
top, or you could use a separate USB enclosure for the drive. I have an
APU1 that I can show you and an APU2 on order.


1. http://pcengines.ch/apu2b4.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20160207/bfe8bcea/attachment.html>


More information about the plug mailing list