[plug] Workaround to an OOM

Brad Campbell brad at fnarfbargle.com
Sat Feb 6 14:40:35 UTC 2016


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.

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.

-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.


More information about the plug mailing list