Configuring swap for dummies

A cheatsheet for modifying swap on a linux machine Cheatsheet # See attached swaps sudo swapon --show # Create/Attach/Resize swap sudo swapoff /swap.img sudo fallocate -l 8G /swap.img sudo chmod 600 /swap.img sudo mkswap /swap.img sudo swapon /swap.img # Quick and dirty add swap to fstab echo '/swap.img none swap sw 0 0' | sudo tee -a /etc/fstab Swappiness # See swappiness cat /proc/sys/vm/swappiness # Set swappiness=1 sudo sysctl vm.swappiness=1 # Before you tee, you should grep for it instead....

Cannot mount cifs-drive over docker with SE-Linux enabled for docker

I have docker container which wants access to a drive on its host, which in turn is mounted with cifs from a server on the local network. If you mount it normally with a -v host:container and try to access it from the container, you get an access denied. If you try the old classic SE-Linux-friendly -v host:container:Z, it will look like this from the container: root@c3ada26b1d90:/# l /data/* /data/backup: ls: cannot access '/data/backup/config....

NFS Installation

Description: Install the NFS Kernel Server and allow mappings from the subnet 130.236.179.88/29 Implementation (Server-side): Login as root Install package nfs-kernel-server Add the following line to /etc/hosts.allow: portmap: 130.236.179.88/255.255.255.248 Add the following line to /etc/exports: /usr/local 130.236.179.88/29(ro,root_squash,subtree_check) Restart the services service portmap restart service nfs-kernel-server restart Implementation (Client-side): Login as root Install package nfs-common Attempt a mount: mount -o ro,vers=3 -t nfs server.d4.sysinst.ida.liu.se:/usr/local /usr/local If it works, add the following line to /etc/fstab: server....