ZFS deduplication in linux

Posted on 8th Oct 2020 14:00:24

It is widely know that ZFS can compress and deduplicate. The deduplication works across the pool level and removes duplicate data blocks as they are written to disk. This results into having only unique blocks stored on the disk while the duplicate blocks are shared among the files.


Lets dig into some figures with 2 disks as you can see here my pool: zpool create -f tank mirror xvdb xvdc zfs set compression=on tank zfs set compression=lz4 tank

Read More

Ceph Deploy

Posted on 8th Oct 2020 13:58:27

Ceph - Object Storage

        - Block Storage

        - Filesystem

 

Pentru un setup ceph cluster avem nevoie de minim 4 noduri:

ceph-admin (pentru deploy), nod1(monitorizare), nod2 (osd), nod3(osd)

Read More

Ceph RBD

Posted on 8th Oct 2020 13:45:51

Ceph RADOS Block Device (RBD)

Ceph is a massively scalable, open source, distributed storage system. It is comprised of an object store, block store, and a POSIX-compliant distributed file system. The platform can auto-scale to the exabyte level and beyond. It runs on commodity hardware, is self-healing and self-managing, and has no single point of failure. Ceph is in the Linux kernel and is integrated with the OpenStack cloud operating system. Due to its open-source nature, you can install and use this portable storage platform in public or private clouds.

Read More

Installation of Kraken web gui

Posted on 8th Oct 2020 13:36:17

Kraken Install

Kraken is a Free ceph dashboard for monitoring and statistics.

Read More

Linux Bash - Choices and Loops

Posted on 18th Sep 2020 19:21:49

This Bash script is a way of displaying a CLI menu in blue color scheme. What we have here is a list of seven choices, each choice is an external command that feeds back various information. Play around with the commands and choices, and see what you can come up with. This script gives a good idea of what can be achieved with Bash scripts.

bash blue menu

#!/bin/bash

        E='echo -e';e='echo -en';trap "R;exit" 2
      ESC=$( $e "e")
     TPUT(){ $e "e[${1};${2}H";}
    CLEAR(){ $e "ec";}
    CIVIS(){ $e "e[?25l";}
     DRAW(){ $e "e%@e(0";}
    WRITE(){ $e "e(B";}
     MARK(){ $e "e[7m";}
   UNMARK(){ $e "e[27m";}
        R(){ CLEAR ;stty sane;$e "ece[37;44me[J";};
     HEAD(){ DRAW
             for each in $(seq 1 13);do
                $E "   x                                                                       x"
                done
                WRITE;MARK;TPUT 1 5
                $E "BASH SELECTION MENU                                                 ";UNMARK;}
                i=0; CLEAR; CIVIS;NULL=/dev/null
        FOOT(){ MARK;TPUT 13 5
                printf "ENTER - SELECT,NEXT                                             ";UNMARK;}
        ARROW(){ read -s -n3 key 2>/dev/null >&2
                if [[ $key = $ESC[A ]];then echo up;fi
                if [[ $key = $ESC[B ]];then echo dn;fi;}
        M0(){ TPUT  4 20; $e "Login Info";}
        M1(){ TPUT  5 20; $e "Network";}
        M2(){ TPUT  6 20; $e "Disk";}
        M3(){ TPUT  7 20; $e "Routing";}
        M4(){ TPUT  8 20; $e "Time";}
        M5(){ TPUT  9 20; $e "ABOUT";}
        M6(){ TPUT 10 20; $e "EXIT";}
        LM=6
        MENU(){ for each in $(seq 0 $LM);do M${each};done;}
        POS(){ if [[ $cur == up ]];then ((i--));fi
                 if [[ $cur == dn ]];then ((i++));fi
                 if [[ $i -lt 0 ]];then i=$LM;fi
                 if [[ $i -gt $LM ]];then i=0;fi;}
REFRESH(){ after=$((i+1)); before=$((i-1))
                if [[ $before -lt 0 ]];then before=$LM;fi
                if [[ $after -gt $LM ]];then after=0;fi
                if [[ $j -lt $i   ]];then UNMARK;M$before;else UNMARK;M$after;fi
                if [[ $after -eq 0 ]] || [ $before -eq $LM ];then
                UNMARK;M$before; M$after;fi;j=$i;UNMARK;M$before;M$after;}
        INIT(){ R;HEAD;FOOT;MENU;}
        SC(){ REFRESH;MARK;$S;$b;cur=`ARROW`;}
        ES(){ MARK;$e "ENTER = main menu ";$b;read;INIT;};INIT
        while [[ "$0" != " " ]]; do case $i in
        0) S=M0;SC;if [[ $cur == "" ]];then R;$e "n$(w      )n";ES;fi;;
        1) S=M1;SC;if [[ $cur == "" ]];then R;$e "n$(ip a      )n";ES;fi;;
        2) S=M2;SC;if [[ $cur == "" ]];then R;$e "n$(df -h     )n";ES;fi;;
        3) S=M3;SC;if [[ $cur == "" ]];then R;$e "n$(ip route      )n";ES;fi;;
        4) S=M4;SC;if [[ $cur == "" ]];then R;$e "n$(date      )n";ES;fi;;
        5) S=M5;SC;if [[ $cur == "" ]];then R;$e "n$($e by dan langas      )n";ES;fi;;
        6) S=M6;SC;if [[ $cur == "" ]];then R;exit 0;fi;;
esac;POS;done

Read More