Skip to content

Instantly share code, notes, and snippets.

@Moeser
Moeser / btrfs-guide.md
Last active January 18, 2023 21:52 — forked from MaxXor/btrfs-guide.md
Btrfs guide for initial setup of an LUKS-encrypted btrfs raid with included recovery guide

Btrfs guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@Moeser
Moeser / Dockerfile
Created September 15, 2016 23:53
Dockerfile example of replacing alpine's php7-memcached package with one compiled from source
FROM alpine:edge
# Using this RUN line in place of where I normally would apk add php7-memcached
RUN echo '@community http://nl.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
apk update && \
# Add packages and build dependencies
apk add --no-cache tar sed grep curl wget gzip pcre ca-certificates \
build-base zlib-dev autoconf libmemcached-dev \
php7@community php7-dev@community php7-session@community && \
# Fetch the php7-memcached source and build/install/cleanup
curl -o php7-memcached.tar.gz -SL https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz && \