February 7, 2016

ZFS snapshotting using znapzend

Introduction Besides many existing tools, i’ve discovered znapzend to be a very powerful tool to manage automatic snapshots including retention and cleanup for time bases snapshot plans. I’m using it with the Proxmox builtin ZFS on Linux to create snaphots and copy them to local and remote disks. This allows me to build some pseudo HA cluster without maintaining things like Ceph as i have the VM filesystems available on other machines. Read more

February 5, 2016

ZFS on Linux and Check_MK zfs_arc_cache

To allow Check_MK to inventorize and fetch data for the zfs_arc_cache plugin, just create a file like /usr/lib/check_mk_agent/plugins/zfs_arc_cache with the content from below and make it executable. #!/bin/sh echo "<<<zfs_arc_cache>>>" cat /proc/spl/kstat/zfs/arcstats | tail -n +3 | awk '{print $1" = "$NF}' You then should get some nice graphs showing all the stats.

October 16, 2015

ZFS on Linux and SAMBA4 ACL

Recently, i was trying to setup a SAMBA4 domain controller inside a LXC VM on Proxmox using ZFS. Kind a lot of fancy buzzwords and acronyms ;) However, domain provision failed due to missing acl flag on filesystem: Realm [LAN]: LAN.EXAMPLE.COM Domain [LAN]: Server Role (dc, member, standalone) [dc]: DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: DNS forwarder IP address (write 'none' to disable forwarding) [1.2.3.4]: Administrator password: Retype password: Looking up IPv4 addresses Looking up IPv6 addresses No IPv6 address will be assigned Setting up share.ldb Setting up secrets.ldb Setting up the registry Setting up the privileges database Setting up idmap db Setting up SAM db Setting up sam.ldb partitions and settings Setting up sam.ldb rootDSE Pre-loading the Samba 4 and AD schema Adding DomainDN: DC=lan,DC=example,DC=com Adding configuration container Setting up sam.ldb schema Setting up sam.ldb configuration data Setting up display specifiers Modifying display specifiers Adding users container Modifying users container Adding computers container Modifying computers container Setting up sam.ldb data Setting up well known security principals Setting up sam.ldb users and groups Setting up self join ERROR(<class 'samba.provision.ProvisioningError'>): Provision failed - ProvisioningError: Your filesystem or build does not support posix ACLs, which s3fs requires. Try the mounting the filesystem with the 'acl' option. File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/domain.py", line 442, in run nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode) File "/usr/local/samba/lib/python2.7/site-packages/samba/provision/__init__.py", line 2172, in provision skip_sysvolacl=skip_sysvolacl) File "/usr/local/samba/lib/python2.7/site-packages/samba/provision/__init__.py", line 1806, in provision_fill names.domaindn, lp, use_ntvfs) File "/usr/local/samba/lib/python2.7/site-packages/samba/provision/__init__.py", line 1558, in setsysvolacl raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. " Seems legit: Read more

May 25, 2015

Deploy a private Docker registry including mirror and web frontend

UPDATE 2016-02-29 Adjusted to registry v2 added web frontend ##Server Start the registry: docker run -d -p 5000:5000 --restart=always --name docker-registry -v /var/lib/docker-registry:/var/lib/registry registry:2 Start the mirror: docker run -d -p 5555:5000 --restart=always --name docker-mirror -v /var/lib/docker-mirror:/var/lib/registry -e STORAGE_PATH=/var/lib/registry -e STANDALONE=false -e MIRROR_SOURCE=https:/registry-1.docker.io -e MIRROR_SOURCE_INDEX=https://index.docker.io registry Start the web frontend: docker run -d --restart=always --name docker-registry-frontend -e ENV_DOCKER_REGISTRY_HOST=docker-registry.hq.packetwerk.com -e ENV_DOCKER_REGISTRY_PORT=5000 -e ENV_DOCKER_REGISTRY_USE_SSL=1 -p 80:80 konradkleine/docker-registry-frontend:v2 ##Client Edit /etc/default/docker and add DOCKER_OPTS like this: DOCKER_OPTS="–dns=ns1 –dns=ns2 –insecure-registry=docker-registry:5000 –registry-mirror=http://docker-registry:5555" Read more