dysk kernel Module has been tested against 4.10.x++ kernel versions
The easiest way to quickly run dysk is to source a shortcut script. The script defines alias for installing dysk via a container. Also a shortcut for running dyskctl (cli) via a container
# *ALWAYS READ SCRIPTS BEFORE USING THEM* #
cd /tmp # keep it clean
wget -q https://raw.githubusercontent.com/khenidak/dysk/master/tools/dysk_shortcuts.sh && source dysk_shortcuts.sh
cd -
#run the install
install_dysk
# run the cli via
dyskctl
The below instructions are detailed for manual build/install experience or via running containers.
This docker image, downloads and build dysk kernel module based on your kernel version
- It has to run using
--privileged
because it installs a kernel module - directories
/usr/src
and/lib/modules
are needed for module install (and header downloads) - If you want to maintain a local version (to avoid clone then rebuild with every run) mount a host directory at this container
/tmp
. - The container image by default uses the first stable tag dysk had, you can override this with setting
DYSK_TAG
environment variable.
The image now depends on Ubuntu image, a slimer alpine version is coming soon
docker run --rm \
-it \
--privileged \
-v /usr/src:/usr/src \
-v /lib/modules:/lib/modules \
khenidak/dysk-installer:0.2
- Download kernel headers
# Debian
sudo apt-get install -y update
sudo apt-get install linux-headers-$(uname -r)
- Dependencies
sudo apt-get install -y build-essential
- Build module
cd ./module
make
You can use
make clean
to cleanup the build artifacts
Install
#manual
cd module
sudo insmod dysk.ko
#or (on repo root)
make install-module
# to check that module loaded successfully
lsmod | grep dysk
dmesg # Dysk leaves success init log line
A docker image is the easiest way to use the command line without clone + build (manual steps).
# run: list all dysks mounted on local box
docker run --rm \
-it --privileged \
-v /etc/ssl/certs:/etc/ssl/certs:ro \
khenidak/dysk-cli:0.1 \
list
# run a mount using auto create
docker run --rm \
-it --privileged \
-v /etc/ssl/certs:/etc/ssl/certs:ro \
khenidak/dysk-cli:0.1 \
mount auto-create -a {account-name} -k {account-key}
- Dependencies
curl -O https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz
# You should consider configuring your paths in bash your bash profile
export PATH="/usr/local/go/bin/:$PATH"
export GOPATH=$HOME/go
export PATH="$GOPATH/bin:$PATH" # add go bins to your path
go get github.com/golang/dep
cd $GOPATH/src/github.com/golang/dep
go install ./...
- Build cli
cd ./dyskctl # $GOPATH/src/github.com/khenidak/dysk/dyskctl
make deps && make build
#or on repo root
make build-cli
sudo rmmod dysk
Don't uninstall the module if you have dysk mounted (a limitation that should be soon removed)