<< October 2019 | Home | December 2019 >>

NFS and friends on RPI with openmediavault


Since I'm still experimenting with kubernetes and docker and on the search for a good filesystem-backend, I can put the data on.

I first used a simple nfs-server then had problems with postgres, then I tried cephfs, which worked but seemed to be an overkill and I guess you need more power and memory to really use it effectively.

And now I switched back to NFS using (openmediavault)[https://www.openmediavault.org/].

OMV Screenshot

OMV is based on armbian and provides all you need to create an NFS/Samba/ftp/...-System outofthebox for you. So I now have two rpi4b setup with it. One with an two mirror-raids once two 256gb-usb3-sticks on usb3 and two 256gb on usb2 and on the other on 2TB-usb3-HD which will be my file-backend. Privately and for docker/k8s.

Tags : ,

VIM: deactivate automatic visualmode on mouse-selection


One of the most annoying things is for me when (VIM(editor))[https://www.vim.org/] is switching to visualmode when you use the mouse-select. Especially this is the case on (armbian-systems)[https://www.armbian.com/].

I stumbled over a (github-comment)[https://gist.github.com/u0d7i/01f78999feff1e2a8361#gistcomment-3008129] which has te solution. Just do this:

echo "syntax enable" >> ~/.vimrc
echo "set mouse-=a" >> ~/.vimrc

Do make it clear. I hate visualmode ;) Really, I do!

Tags : , ,

Build Urho3D on arm-device

As I'm building my little Urho3D based game-server to run on rpi and alike systems I tend to compile the whole stuff on the device itself. (Yeah,...I should have a look in just cross-compiling...). I often struggled to finish compilation due to problems with angelscript and assimp here is the cmake-call to ignore those:

cmake -DURHO3D_ANGELSCRIPT=0 -DURHO3D_SAMPLES=0 -DURHO3D_TOOLS=0 /path/to/urho3dsource

mount postgres data-folder on NFS

I struggled for some time getting postgres to run on docker/k8s with /var/lib/postgresql/data mounted on an nfs-server.

I reguallary ended up with

chown: changing ownership of '/var/lib/postgresql/data/base/**/**': Operation not permitted.

I'm no expert in nfs and its export-options but to make the story short I stumbled over a stackoverflow-entry that suggested to change the postgres-docker-image's uid/gid to the one that has write access of the NFS-folder.

Ok,...you need to create a new docker image for this, but finally. Thx to 'Eddie Parker' my Dockerfile ended up like this. Where my user has the uid 1000 and is in group 100:


FROM postgres:11.2
ENV TZ=America/Los_Angeles

# Make us the same gid/id as the nfs mount.
RUN sed -i 's/:999:/:1000:/g' /etc/group
RUN sed -i 's/:999:999:/:1000:100:/g' /etc/passwd

CMD [ "postgres", "-c", "max_connections=10000"]

Once you have this create a new image:

sudo docker build -t nfs/postgres:11.2 .

PS: I guess it would be fine to create a user with UID:999 gid:999 on the NFS-System which creates the data-directory.

<< October 2019 | Home | December 2019 >>